[FFmpeg-user] Problem with setting x264 profile/ x264opts

Tim Nicholson tim.nicholson at bbc.co.uk
Mon Jan 23 10:23:39 CET 2012


I am trying to tweak some x264 options but am seeing the following 
behavour:-


ffmpegstatic -i glitz4-DV.mov \
-f lavfi -i "amovie=glitz4-DV.mov:si=1 [a1]; amovie=glitz4-DV.mov:si=2 
[a2]; [a1][a2] amerge, aformat=s16:stereo:all " \
-map 0:0 -map 1:0 -c:v libx264 -b:v 704k -r 25 \
-maxrate 704k -bufsize 5097k \
-c:a libfaac -b:a 96k -ar 48000 -ac 2 \
-y ./glitz4-DV-bitc.mp4

Works fine, and produces a file with the following parameters:-

[...]
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 
720x576 [SAR 64:45 DAR 16:9], 58 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc
     Metadata:
       creation_time   : 2011-12-20 10:15:06
       handler_name    : VideoHandler
     Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, 
s16, 83 kb/s


However if I try and add the high profile to the parameters it fails:-

ffmpegstatic -i glitz4-DV.mov \
-f lavfi -i "amovie=glitz4-DV.mov:si=1 [a1]; amovie=glitz4-DV.mov:si=2 
[a2]; [a1][a2] amerge, aformat=s16:stereo:all " \
-map 0:0 -map 1:0 -c:v libx264 -profile high -b:v 704k -r 25 \
-maxrate 704k -bufsize 5097k \
-c:a libfaac -b:a 96k -ar 48000 -ac 2 \
-y ./glitz4-DV-bitc.mp4


ffmpeg version N-36728-g794006f-by_Tim Copyright (c) 2000-2012 the 
FFmpeg developers
   built on Jan 12 2012 11:45:18 with gcc 4.6.2
   configuration: --extra-version=by_Tim --enable-static 
--disable-shared --enable-gpl --enable-nonfree --enable-version3 
--prefix=/mnt/msds-store-0/tim/ffmpeg-tux/usr/local 
--libdir=/mnt/msds-store-0/tim/ffmpeg-tux/usr/local/lib64 
--enable-runtime-cpudetect --extra-cflags='-static 
-I/mnt/msds-store-0/tim/ffmpeg-tux/usr/local/include' 
--extra-ldflags='-static 
-L/mnt/msds-store-0/tim/ffmpeg-tux/usr/local/lib64' 
--progs-suffix=static --enable-libfaac --enable-libx264 --enable-libfreetype
   libavutil      51. 34.100 / 51. 34.100
   libavcodec     53. 55.100 / 53. 55.100
   libavformat    53. 29.100 / 53. 29.100
   libavdevice    53.  4.100 / 53.  4.100
   libavfilter     2. 58.100 /  2. 58.100
   libswscale      2.  1.100 /  2.  1.100
   libswresample   0.  6.100 /  0.  6.100
   libpostproc    51.  2.100 / 51.  2.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'glitz4-DV.mov':
   Metadata:
     major_brand     : qt
     minor_version   : 512
     compatible_brands: qt
     creation_time   : 2011-12-20 10:15:06
     encoder         : Lavf53.29.100
   Duration: 00:00:30.00, start: 0.000000, bitrate: 33416 kb/s
     Stream #0:0(eng): Video: dvvideo (dvcp / 0x70637664), yuv420p, 
720x576 [SAR 64:45 DAR 16:9], 28800 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc
     Metadata:
       creation_time   : 2011-12-20 10:15:06
       handler_name    : DataHandler
     Stream #0:1(eng): Audio: pcm_s24le (lpcm / 0x6D63706C), 48000 Hz, 1 
channels, s32, 1152 kb/s
     Metadata:
       creation_time   : 2011-12-20 10:15:06
       handler_name    : DataHandler
     Stream #0:2(eng): Audio: pcm_s24le (lpcm / 0x6D63706C), 48000 Hz, 1 
channels, s32, 1152 kb/s
     Metadata:
       creation_time   : 2011-12-20 10:15:06
       handler_name    : DataHandler
     Stream #0:3(eng): Audio: pcm_s24le (lpcm / 0x6D63706C), 48000 Hz, 1 
channels, s32, 1152 kb/s
     Metadata:
       creation_time   : 2011-12-20 10:15:06
       handler_name    : DataHandler
     Stream #0:4(eng): Audio: pcm_s24le (lpcm / 0x6D63706C), 48000 Hz, 1 
channels, s32, 1152 kb/s
     Metadata:
       creation_time   : 2011-12-20 10:15:06
       handler_name    : DataHandler
[amovie @ 0x178e660] seek_point:0 format_name:(null) 
file_name:glitz4-DV.mov stream_index:1
[amovie @ 0x178d7e0] seek_point:0 format_name:(null) 
file_name:glitz4-DV.mov stream_index:2
[amerge @ 0x17e2e80] Inputs overlap: output layout will be meaningless
[aformat @ 0x17e76c0] auto-inserting filter 'auto-inserted aconvert 0' 
between the filter 'Parsed_amerge_2' and the filter 'Parsed_aformat_3'
[amerge @ 0x17e2e80] in1:mono + in2:mono -> out:stereo
[aconvert @ 0x1796c60] fmt:s32 cl:stereo planar:0 -> fmt:s16 cl:stereo 
planar:0
[lavfi @ 0x179c820] Estimating duration from bitrate, this may be inaccurate
Input #1, lavfi, from 'amovie=glitz4-DV.mov:si=1 [a1]; 
amovie=glitz4-DV.mov:si=2 [a2]; [a1][a2] amerge, aformat=s16:stereo:all ':
   Duration: N/A, start: 0.000000, bitrate: N/A
     Stream #1:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
[buffer @ 0x178ddc0] w:720 h:576 pixfmt:yuv420p tb:1/1000000 sar:64/45 
sws_param:
[libx264 @ 0x17e5620] using SAR=64/45
[libx264 @ 0x17e5620] using cpu capabilities: MMX2 SSE2Fast SSSE3 
FastShuffle Cache64
[libx264 @ 0x17e5620] profile High, level 3.0
[libx264 @ 0x17e5620] 264 - core 118 r2092 6eac7c3 - H.264/MPEG-4 AVC 
codec - Copyleft 2003-2011 - http://www.videolan.org/x264.html - 
options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 
psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 
8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 
threads=12 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 
constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 
weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 
intra_refresh=0 rc_lookahead=40 rc=cbr mbtree=1 bitrate=704 ratetol=1.0 
qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=704 vbv_bufsize=5097 
nal_hrd=none ip_ratio=1.40 aq=1:1.00
[NULL @ 0x17f7e20] [Eval @ 0x7fffd2fc8580] Undefined constant or missing 
'(' in 'high'
[NULL @ 0x17f7e20] Unable to parse option value "high"
[NULL @ 0x17f7e20] Error setting option profile to value high.
Output #0, mp4, to './glitz4-DV-bitc.mp4':
   Metadata:
     major_brand     : qt
     minor_version   : 512
     compatible_brands: qt
     creation_time   : 2011-12-20 10:15:06
     encoder         : Lavf53.29.100
     Stream #0:0(eng): Video: h264, yuv420p, 720x576 [SAR 64:45 DAR 
16:9], q=-1--1, 704 kb/s, 90k tbn, 25 tbc
     Metadata:
       creation_time   : 2011-12-20 10:15:06
       handler_name    : DataHandler
     Stream #0:1: Audio: none, 48000 Hz, 2 channels, s16, 128 kb/s
Stream mapping:
   Stream #0:0 -> #0:0 (dvvideo -> libx264)
   Stream #1:0 -> #0:1 (pcm_s16le -> libfaac)
Error while opening encoder for output stream #0:1 - maybe incorrect 
parameters such as bit_rate, rate, width or height

I get the same error if I try the form "-x264opts profile=high" and also 
if I try other options such as "-x264opts tune=film" although things like:-

"-x264opts keyint=123:min-keyint=20"

work.

Can anyone suggest why these settings do not work? It looks almost as if 
only numeric, and not string parameters are working.
-- 
Tim

http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
					


More information about the ffmpeg-user mailing list