Forum Discussion
How can I convert HEVC to MP4 on Windows 11 without losing quality
Alright, so you want to use a script-based approach to convert hevc to mp4 without losing quality. The good news is that it's actually pretty straightforward, and the secret weapon is using a tool called FF mpeg with the right commands.
The core idea for a script that can convert hevc to mp4 without losing quality is to tell FF mpeg to just "copy" the video and audio streams instead of re-encoding them. This is called a remux, and it's basically just repackaging the video data into a new container without touching the actual quality. Here's a super simple example of a batch script (you can save this as a .bat file on Windows):
batch
for %%f in (*. mkv) do ff mpeg -i "%%f" -c copy "%%~nf. mp4"
What this does is look for every .mkv file in the folder (you'd change that to whatever your HEVC files are, like .mov or .m4v), and remux it into an MP4 container. The -c copy part is the magic keyword that tells FF mpeg to copy everything—video, audio, subtitles—without re-encoding, which means zero quality loss and it's super fast. If you're converting files from a Mac or iPhone, there's also a neat package called iphone-to-pixel that uses this exact concept to remux HEVC files to MP4 while preserving quality and metadata. Just keep in mind that sometimes the resulting MP4 might not play perfectly on every device, and you might need to add a tag like -tag:v hvc1 to the command for better Apple compatibility.