Can anyone suggest a command to encode video to h264 baseline profile (level 1)?
Here is a link for reference: http://blog.mediacoderhq.com/h264-profiles-and-levels/
I used this command but FFmpeg says it is Main profile, not Baseline.
ffmpeg -i <SOURCE> -vcodec libx264 -coder 0 -flags +loop+mv4 \
-partitions +parti4x4+parti8x8+parti4x4+partp8x8+partb8x8 -me_method hex -subq 7 \
-trellis 1 -refs 5 -bf 0 -flags2 +mixed_refs -coder 0 -me_range 16 -threads 2 \
-s 240x160 -b:v 64k -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 \
-qmin 10 -qmax 51 -qdiff 4 -strict experimental -acodec aac -ac 1 -ab 48000 \
-f mpegts udp://127.0.0.1:10006?pkt_size=1316
Best Answer
Make sure you've got the latest FFmpeg and libx264 – this is really important * – and then try something like:
This will result in:
Of course, you can supply the
-preset
and-tune
options to x264 as well. Refer tox264 --fullhelp
for more info.Here are the x264 options used:
* It works with FFmpeg 0.9 and x264 core 118. The
-vprofile
option was undocumented in FFmpeg, now it's-profile:v
. It now basically works just like-profile
, which again is supposed to replace-vpre
. It uses x264's built-in profiles instead of relying on.ffpreset
files.