I'm looking for the best in quality when converting videos.
I only want to use lossless audio and video encoders and a good container.
How do I enable lossless x264 vcodec for ffmpeg?
I currently use ffmpeg -i "inputvideo" -s 1280x720 -ar 48000 -threads 4 -vcodec libx264 -acodec copy -dsur_mode 2 -ac 6 "outputvideo720p.mkv"
I plan on using flac for the acodec by am unsure because I don't want to use quality if it switches to 16-bit instead of 24-bit
FFV1 is a video codec developed within FFmpeg. It is lossless, meaning that it compresses video without introducing quantization degradations. Therefore, FFV1 is a good choice for archiving and preservation.
The are many lossless video codecs, common ones include H. 264 Lossless, H. 265 Lossless, Motion JPEG Lossless, Apple Animation Quicktime RLE, Autodesk Animator Codec, and many more. Lossless, means that when you use this type of compression for your file you do not lose any of the file information.
The range of the CRF scale is 0–51, where 0 is lossless (for 8 bit only, for 10 bit use -qp 0), 23 is the default, and 51 is worst quality possible.
For the MP4 extension, if you input a 1080p file, FFmpeg will encode using the H. 264 video codec at about 9 to 10 Mbps, the AAC audio codec at around 130 Kbps, a keyframe interval of 250 frames, the High profile, and the medium x264 preset.
You can use x264 in lossless manner I think. As in here and here use these flags for ffmpeg:
ffmpeg -i input.avi -c:v libx264 -qp 0 output.mkv
In case you couldn't load libx264, remove ffmpeg and install from source with x264 enabled. Here is how to.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With