4

I am using FFmbc (a FFmpeg derivative) to transcode some video files to H264 (in a mov wrapper).

I want to specify baseline profile (to reduce CPU usage) but can't figure out how. There doesn't seem to be a simple option to specify this - I understand the profile is derived from whatever options I have specified.

However most examples are for FFmpeg and FFmbc rejects them.

The suggestion to use "-flags2 +bpyramid+wpred+mixed_refs-dct8x8" gives the errors:

[NULL @ 0x101093600] [Eval @ 0x7fff5fbfce20] Undefined constant or missing '(' in 'bpyramid'
[NULL @ 0x101093600] Unable to parse option value "bpyramid+wpred+mixed_refs-dct8x8"
[NULL @ 0x101093600] Error setting option flags2 to value +bpyramid+wpred+mixed_refs-dct8x8.

What am I missing here?

4 Answers 4

6

Note: This is for recent FFmpeg, not FFmbc, which doesn't use the same option syntax (yet)

You need to use the -profile:v option, which has been introduced in FFmpeg 0.9 (afaik) and is now standard in 1.0.

ffmpeg -i input.mp4 -c:v libx264 -preset fast -profile:v baseline out.mov

Why? -profile was used (and prioritized) for AAC encoding. It's simply ambiguous, therefore you need the stream specfier :v.

2
  • that's for ffmpeg, ffmbc hasn't moved to the newer "-vprofile" style syntax yet.
    – stib
    Dec 20, 2012 at 6:12
  • You're right. Back when I wrote this FFmpeg was about to change the whole thing and everything was a little confusing. +1 to you.
    – slhck
    Dec 20, 2012 at 6:19
4

-profile baseline seems to work for me, using libx264. I use the libx264 presets - for example "slow" gives me the options listed below. there's fast, slow, veryslow and placebo (might be more, can't remember).

stib$ ffmbc -i test.mov -vcodec libx264 -preset slow -profile baseline -acodec libfaac -ab 96k -crf 19 test.mp4
...
[libx264 @ 0x101858c00] profile Constrained Baseline, level 3.1
[libx264 @ 0x101858c00] 264 - core 120 - H.264/MPEG-4 AVC codec - Copyleft 2003-2011 - http://www.videolan.org/x264.html - options: cabac=0 ref=5 deblock=1:0:0 analyse=0x1:0x111 me=umh subme=8 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=50 rc=crf mbtree=1 crf=19.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'test.mp4'
0

I also had this issue. I removed the extra space chars present in preset file and it worked for me.

0

To set the baseline profile us the following ffmpeg options. Mobile apps like Neighboors by Ring use baseline profile.

ffmpeg -i in_video.mp4 -vcodec libx264 -acodec aac -b:a 256k -vf scale=1280:720 -profile:v baseline out_video.mp4

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.