I typically use FFmpeg for conversions. It’s a bit more confusing to use than Handbrake, but I find that it’s faster, and the output is generally a higher quality too. Another benefit over Handbrake is that Handbrake will try to re-transcode the entire video; whereas FFmpeg can simply repackage the video and audio tracks into any other format container. In other words, it can convert your file to a compatible file type without losing any video quality.
If you just need to convert it from
.avi to, for example,
.mp4, you can do that really easily and quickly with this command (remove the square brackets and add the file name):
ffmpeg -i "[source file].avi" -c:v copy -c:a copy "[output file].mp4"
(In layman’s terms, this means “Run FFmpeg. Use [source file].avi as the input file. Copy the video and audio tracks without transcoding them, and output them into [output file].mp4”)
If you need to convert the audio codec -
aac audio tends to work well when I’m editing - you could do that with:
ffmpeg -i "[source file].avi" -c:v copy -c:a:1 aac "[output file].mp4"
(Run FFmpeg. Use [source file].avi as the input file. Copy the video track without transcoding it. Convert the 1st audio track to .aac, and output the video and the audio track into [output file].mp4")
Except if it’s a codec issue beyond container, then it’s not solving the issue. If something is an avi, it’s not likely H.264 even though the new container of mp4 would suggest that. If a program, especially a non-linear editor, can’t read a file, it’s far more likely a codec issue than a container issue.
Also, transcoding doesn’t lose quality just because it’s changing formats. For example, to use ProRes codecs as an example, you cannot add quality that wasn’t there. So, some people will transcode H.264 into ProRes 422 or ProRes 422 HQ for editing, and scoff at using ProRes 422 LT: all have higher bandwidth than H.264 and will not have any quality loss. Look at the data rates capable from codecs, if the source codec is at a lower rate than the destination codec, you won’t lose quality (unless you set the transcode to compress the file or something). Using something too much higher in bandwidth will just create an unnecessarily large file.
FFmpeg is a good tool, but if you’re deep enough in knowing how to use codecs and such, I feel like you’d be using better tools anyway. That’s why I generally don’t recommend it to people.
Disagree on the gatekeeping of tools, FFmpeg is the perfect tool for working with re-encoding codecs, it’s not just for changing containers. There’d be no reason to need anything else other than FFmpeg and your video editor in the context of fan editing movies, working with ProRes, h264, etc. From my memory handbrake only encodes in distribution formats which is built on compression which means losing quality, and that’s what he was referring to, so I agree, I do not recommend that program for people who want to edit movies. If you want to avoid editing h264 because it can be buggy and slow, then go with a good visually/near lossless format that’s built for editing, like ProRes or DNxHD and the specific format depends on your needs, but the unnecessarily large file is the whole point so that you can have it an editing format without losing visible data, you can even use a proxy if your computer is too slow.
Not gatekeeping, it’s just a difficult tool to learn for beginners, and if you’re not a beginner you likely have better tools. That’s all I was getting at.
Most NLEs come with encoders (Final Cut has Compressor, Premiere has Media Encoder, DaVinci Resolve has it built into the main app, etc.) that are far more robust and capable, while also easier to use. My original comment was more that Handbrake can read most things, and give you an H.264 of the same quality of the source, and if you’re on a setup where you can’t edit with H.264 you can use one of those other tools instead.
I do this for a living, and I started with fan-editing. I’m just trying to give advice for every skill level, and I think giving command-line instructions for FFmpeg is not really accessible to every skill level.
I guess, just disagree at the core - because I think ffmpeg is quite easy to learn. You tell it what to do and it does exactly that, plenty of resources online. People are just scared of command prompts.
Are you referring to turning ProRes into h264 for editing because that doesn’t make any sense to me so I don’t think you are, but if you need to watch something that’s ProRes and need it in h264 then why not just export it as h264 in the first place, no additional handbrake is needed.
Also you’d be surprised, plenty of professional editors use ffmpeg in their work flow, I just think it’s giving the wrong idea to say “there’s better tools out there” because ffmpeg is one of those better tools for being free to use, the learning curve can be tough for some maybe, and yeah Disney’s not gonna bust out ffmpeg for the next Star wars films but to any editors out there ffmpeg is very solid and will fulfill all your needs for free even past just doing fan edits.
If anyone needs help setting it up feel free to DM me, I mainly use it for repackaging video and audio into different containers very quickly, or adding custom audio tracks like DTS-HD MA onto an Mp4 or Mkv that I can’t get out of premiere.