nsaglo.blogg.se

Ffmpeg h264 codec
Ffmpeg h264 codec












ffmpeg h264 codec

In the most basic of explainations, we're calling FFmpeg, telling it to take the video bigBuckBunny.mp4 and convert it into an MP4 file, yes it's already an MP4 so there is actually little use in doing this other than to learn, which is exactly what we're doing so don't worry. Now if you save that, ( following the locations outlined here) and double click the batch file to run it, making sure you've moved the downloaded video into the same location as FFmpeg, it'll convert the video "bigBuckBunny.mp4" into "bigBuckBunny-converted.mp4".īut what's actually happening? I'm sure those of you who dable with FFmpeg will easily understand without me having to explain, but for those who wish to learn more, keep reading. Now lets create a new script: ffmpeg -i bigBuckBunny.mp4 -c:v libx264 -crf 18 -preset:v veryslow -c:a aac -b:a 128k bugBuckBunny-converted.mp4

ffmpeg h264 codec

So first off we need a video to convert, any video will do but I'll be using Big Buck Bunnys MP4 video found here, I've actually gone for the 4K version but anything will do, and for the purpose of this guide I've renamed it to "bigBuckBunny.mp4".

ffmpeg h264 codec

Since the internet is full of guides for H.264, there's little to no point in me creating another one, instead we'll go through the process of creating a batch file which will give us a multi-use ability to convert any video we want into a high quality, or low quality it's your choice, video file using the H.264 codec, plus some audio, all using FFmpeg. If your source is lossy so is your output.H.264 is a great codec, ofcourse it's been superceeded by it's more powerful brother H.265 but it's still very much in use and certainly will not be going away anytime soon, so there's no reason to abandon it yet.

ffmpeg h264 codec

Note: Video/audio output can only be as good as the video/audio input. To learn more about it and how presets affect the quality or encoding speed, check the H.264 encoding guide on the FFmpeg wiki. To set the quality, use -crf 23, where lower is better, and values from 18-28 are considered a good range.įfmpeg uses libx264's own preset system. Tests have shown this library functions comparatively if not more efficiently than Apple's Compressor or Episode, although both these programs have powerful features that ffmpeg does not have. Wikipedia has related information at X264īefore using this in a production system please obtain the necessary licenses, you are warned! Wikipedia has related information at H.264/MPEG-4 AVC It's not natively supported in ffmpeg, so you will need to build ffmpeg with support for the external library, x264. It is heavier on encoding and decoding than preceding formats but results in much higher picture quality from smaller files. It is currently being used in formats such as Blu-ray, MP4, Flash (F4V), HTML5and most modern portable devices. H.264 is arguably the cutting edge of video compression codecs.














Ffmpeg h264 codec