[FFmpeg-user] coding in 2 pass with libx264

aple ex exampte01 at hotmail.fr
Sat Dec 10 14:16:09 CET 2011






Hi ffpmeg users,

I 'm sorry if the questions is already asked but if it is, I don't find it.
I try to encode in 2 pass with libx264 but ffmpeg failed because it's not possible with crf.
How can I disable it ?
I have tried with the -fastfirstpass option in ffmpeg but that's fail.

I join the complete output console :

[test at ltest ffmpeg]$ ./ffmpeg -i /data/8femmes.ts -pass 1 -c:v libx264 -fastfirstpass 0.2  -preset slower  -passlogfile /home/test/passguepar2d.txt  -f rawvideo -y /dev/null ffmpeg version 0.8.7.git-HEAD-2483f53, Copyright (c) 2000-2011 the FFmpeg developers
  built on Dec 10 2011 14:09:20 with gcc 4.6.1 20110908 (Red Hat 4.6.1-9)
  configuration: --arch=x86_64 --cpu=64 --disable-ffserver --enable-extra-warnings --enable-pic --enable-nonfree --enable-version3 --enable-hardcoded-tables --enable-libopenjpeg --enable-gpl --enable-libfreetype --enable-avformat --enable-avfilter --enable-libmp3lame --enable-pthreads --enable-libxvid --enable-libtheora --enable-libvorbis --enable-postproc --enable-libspeex --enable-bzlib --enable-zlib --enable-stripping --enable-libdc1394 --enable-libschroedinger --enable-libgsm --enable-libvpx --enable-x11grab --enable-librtmp --enable-sram --enable-libfaac --enable-vdpau --enable-swscale --enable-fastdiv --enable-decoder=srt --enable-encoder=srt --enable-muxer=srt --enable-demuxer=srt --enable-vaapi --enable-libx264 --enable-libopencv --enable-optimizations --enable-runtime-cpudetect --enable-openal --enable-libdirac --enable-libaacplus --enable-libvo-aacenc --enable-libopencore-amrnb --enable-libmodplug --enable-libcdio --enable-libv4l2 --enable-libass
  libavutil    51. 32. 0 / 51. 32. 0
  libavcodec   53. 42. 0 / 53. 42. 0
  libavformat  53. 24. 0 / 53. 24. 0
  libavdevice  53.  4. 0 / 53.  4. 0
  libavfilter   2. 52. 0 /  2. 52. 0
  libswscale    2.  1. 0 /  2.  1. 0
  libpostproc  51.  2. 0 / 51.  2. 0
[h264 @ 0x256c7e0] non-existing PPS referenced
[h264 @ 0x256c7e0] non-existing PPS 0 referenced
[h264 @ 0x256c7e0] decode_slice_header error
[h264 @ 0x256c7e0] no frame!
[h264 @ 0x256c7e0] non-existing PPS referenced
[h264 @ 0x256c7e0] non-existing PPS 0 referenced
[h264 @ 0x256c7e0] decode_slice_header error
[h264 @ 0x256c7e0] no frame!
[h264 @ 0x256c7e0] non-existing PPS referenced
[h264 @ 0x256c7e0] non-existing PPS 0 referenced
[h264 @ 0x256c7e0] decode_slice_header error
[h264 @ 0x256c7e0] no frame!
[h264 @ 0x256c7e0] non-existing PPS referenced
[h264 @ 0x256c7e0] non-existing PPS 0 referenced
[h264 @ 0x256c7e0] decode_slice_header error
[h264 @ 0x256c7e0] no frame!
[aac @ 0x256d1e0] Sample rate index in program config element does not match the sample rate index configured by the container.
[aac @ 0x256d1e0] Input buffer exhausted before END element found
[h264 @ 0x256c7e0] non-existing PPS referenced
[h264 @ 0x256c7e0] non-existing PPS 0 referenced
[h264 @ 0x256c7e0] decode_slice_header error
[h264 @ 0x256c7e0] no frame!
[h264 @ 0x256c7e0] non-existing PPS referenced
[h264 @ 0x256c7e0] non-existing PPS 0 referenced
[h264 @ 0x256c7e0] decode_slice_header error
[h264 @ 0x256c7e0] no frame!
[h264 @ 0x256c7e0] non-existing PPS referenced
[h264 @ 0x256c7e0] non-existing PPS 0 referenced
[h264 @ 0x256c7e0] decode_slice_header error
[h264 @ 0x256c7e0] no frame!
[h264 @ 0x256c7e0] non-existing PPS referenced
[h264 @ 0x256c7e0] non-existing PPS 0 referenced
[h264 @ 0x256c7e0] decode_slice_header error
[h264 @ 0x256c7e0] no frame!
[aac @ 0x256e6c0] channel element 2.1 is not allocated
[h264 @ 0x256c7e0] non-existing PPS referenced
[h264 @ 0x256c7e0] non-existing PPS 0 referenced
[h264 @ 0x256c7e0] decode_slice_header error
[h264 @ 0x256c7e0] no frame!
[h264 @ 0x256c7e0] non-existing PPS referenced
[h264 @ 0x256c7e0] non-existing PPS 0 referenced
[h264 @ 0x256c7e0] decode_slice_header error
[h264 @ 0x256c7e0] no frame!
[h264 @ 0x256c7e0] non-existing PPS referenced
[h264 @ 0x256c7e0] non-existing PPS 0 referenced
[h264 @ 0x256c7e0] decode_slice_header error
[h264 @ 0x256c7e0] no frame!
[h264 @ 0x256c7e0] non-existing PPS referenced
[h264 @ 0x256c7e0] non-existing PPS 0 referenced
[h264 @ 0x256c7e0] decode_slice_header error
[h264 @ 0x256c7e0] no frame!
[mpegts @ 0x2568ae0] max_analyze_duration 5000000 reached at 5013333
[mpegts @ 0x2568ae0] PES packet size mismatch
    Last message repeated 2 times
Input #0, mpegts, from '/data/8femmes.ts':
  Duration: 02:00:00.04, start: 4577.324778, bitrate: 4806 kb/s
  Program 56126 
    Stream #0:0[0x44]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1440x1080 [SAR 4:3 DAR 16:9], 27.48 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x45](fra): Audio: aac ([15][0][0][0] / 0x000F), 48000 Hz, stereo, s16, 112 kb/s
    Stream #0:2[0x46](fra): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
    Stream #0:3[0x47](deu): Audio: aac ([15][0][0][0] / 0x000F), 48000 Hz, stereo, s16, 69 kb/s
[buffer @ 0x256ef80] w:1440 h:1080 pixfmt:yuv420p tb:1/1000000 sar:4/3 sws_param:
[libx264 @ 0x256b140] using SAR=4/3
[libx264 @ 0x256b140] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
[libx264 @ 0x256b140] profile High, level 5.0
Output #0, rawvideo, to '/dev/null':
  Metadata:
    encoder         : Lavf53.24.0
    Stream #0:0: Video: h264, yuv420p, 1440x1080 [SAR 4:3 DAR 16:9], q=-1--1, pass 1, 90k tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> libx264)
Press [q] to stop, [?] for help
[h264 @ 0x256c7e0] reference picture missing during reorder
    Last message repeated 3 times
[h264 @ 0x256c7e0] Missing reference picture
[h264 @ 0x256c7e0] decode_slice_header error
[h264 @ 0x256c7e0] concealing 6120 DC, 6120 AC, 6120 MV errors
[h264 @ 0x256c7e0] Missing reference picture
    Last message repeated 2 times
[h264 @ 0x256c7e0] reference picture missing during reorder
    Last message repeated 1 times
[h264 @ 0x256c7e0] Missing reference picture
    Last message repeated 1 times
[h264 @ 0x256c7e0] reference picture missing during reorder
[h264 @ 0x256c7e0] Missing reference picture
frame=  252 fps=  5 q=-1.0 Lsize=       0kB time=00:00:10.00 bitrate=   0.0kbits/s dup=34 drop=0    
video:4898kB audio:0kB global headers:0kB muxing overhead -100.000000%
[libx264 @ 0x256b140] frame I:3     Avg QP:18.82  size: 77317
[libx264 @ 0x256b140] frame P:116   Avg QP:23.53  size: 28018
[libx264 @ 0x256b140] frame B:133   Avg QP:25.79  size: 11527
[libx264 @ 0x256b140] consecutive B-frames: 23.8%  9.5% 23.8% 42.9%
[libx264 @ 0x256b140] mb I  I16..4: 27.6% 59.0% 13.3%
[libx264 @ 0x256b140] mb P  I16..4: 10.3% 14.4%  3.2%  P16..4: 25.6%  5.7%  3.1%  0.2%  0.0%    skip:37.4%
[libx264 @ 0x256b140] mb B  I16..4:  0.8%  1.2%  0.2%  B16..8: 33.4%  4.5%  1.1%  direct: 6.2%  skip:52.6%  L0:39.4% L1:49.3% BI:11.3%
[libx264 @ 0x256b140] 8x8 transform intra:52.4% inter:75.9%
[libx264 @ 0x256b140] direct mvs  spatial:95.5% temporal:4.5%
[libx264 @ 0x256b140] coded y,uvDC,uvAC intra: 48.2% 54.0% 15.7% inter: 11.7% 20.7% 1.8%
[libx264 @ 0x256b140] i16 v,h,dc,p: 20% 34%  5% 41%
[libx264 @ 0x256b140] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17%  9% 17%  8%  9% 12%  7% 11%  9%
[libx264 @ 0x256b140] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu:  8% 69%  6%  3%  3%  3%  2%  3%  4%
[libx264 @ 0x256b140] i8c dc,h,v,p: 29% 34% 24% 13%
[libx264 @ 0x256b140] Weighted P-Frames: Y:11.2% UV:9.5%
[libx264 @ 0x256b140] ref P L0: 61.3% 11.3% 15.4%  4.5%  2.6%  1.9%  1.5%  1.0%  0.4%  0.0%
[libx264 @ 0x256b140] ref B L0: 86.6%  8.9%  2.5%  0.8%  0.6%  0.4%  0.2%
[libx264 @ 0x256b140] ref B L1: 95.8%  4.2%
[libx264 @ 0x256b140] kb/s:3980.22

[test at ltest ffmpeg]$  ./ffmpeg -i /data/8femmes.ts -pass 2 -c:v libx264  -passlogfile /home/test/passguepar2d.txt -an -sn /data/test8.h264
ffmpeg version 0.8.7.git-HEAD-2483f53, Copyright (c) 2000-2011 the FFmpeg developers
  built on Dec 10 2011 14:09:20 with gcc 4.6.1 20110908 (Red Hat 4.6.1-9)
  configuration: --arch=x86_64 --cpu=64 --disable-ffserver --enable-extra-warnings --enable-pic --enable-nonfree --enable-version3 --enable-hardcoded-tables --enable-libopenjpeg --enable-gpl --enable-libfreetype --enable-avformat --enable-avfilter --enable-libmp3lame --enable-pthreads --enable-libxvid --enable-libtheora --enable-libvorbis --enable-postproc --enable-libspeex --enable-bzlib --enable-zlib --enable-stripping --enable-libdc1394 --enable-libschroedinger --enable-libgsm --enable-libvpx --enable-x11grab --enable-librtmp --enable-sram --enable-libfaac --enable-vdpau --enable-swscale --enable-fastdiv --enable-decoder=srt --enable-encoder=srt --enable-muxer=srt --enable-demuxer=srt --enable-vaapi --enable-libx264 --enable-libopencv --enable-optimizations --enable-runtime-cpudetect --enable-openal --enable-libdirac --enable-libaacplus --enable-libvo-aacenc --enable-libopencore-amrnb --enable-libmodplug --enable-libcdio --enable-libv4l2 --enable-libass
  libavutil    51. 32. 0 / 51. 32. 0
  libavcodec   53. 42. 0 / 53. 42. 0
  libavformat  53. 24. 0 / 53. 24. 0
  libavdevice  53.  4. 0 / 53.  4. 0
  libavfilter   2. 52. 0 /  2. 52. 0
  libswscale    2.  1. 0 /  2.  1. 0
  libpostproc  51.  2. 0 / 51.  2. 0
[h264 @ 0x27897e0] non-existing PPS referenced
[h264 @ 0x27897e0] non-existing PPS 0 referenced
[h264 @ 0x27897e0] decode_slice_header error
[h264 @ 0x27897e0] no frame!
[h264 @ 0x27897e0] non-existing PPS referenced
[h264 @ 0x27897e0] non-existing PPS 0 referenced
[h264 @ 0x27897e0] decode_slice_header error
[h264 @ 0x27897e0] no frame!
[h264 @ 0x27897e0] non-existing PPS referenced
[h264 @ 0x27897e0] non-existing PPS 0 referenced
[h264 @ 0x27897e0] decode_slice_header error
[h264 @ 0x27897e0] no frame!
[h264 @ 0x27897e0] non-existing PPS referenced
[h264 @ 0x27897e0] non-existing PPS 0 referenced
[h264 @ 0x27897e0] decode_slice_header error
[h264 @ 0x27897e0] no frame!
[aac @ 0x278a1e0] Sample rate index in program config element does not match the sample rate index configured by the container.
[aac @ 0x278a1e0] Input buffer exhausted before END element found
[h264 @ 0x27897e0] non-existing PPS referenced
[h264 @ 0x27897e0] non-existing PPS 0 referenced
[h264 @ 0x27897e0] decode_slice_header error
[h264 @ 0x27897e0] no frame!
[h264 @ 0x27897e0] non-existing PPS referenced
[h264 @ 0x27897e0] non-existing PPS 0 referenced
[h264 @ 0x27897e0] decode_slice_header error
[h264 @ 0x27897e0] no frame!
[h264 @ 0x27897e0] non-existing PPS referenced
[h264 @ 0x27897e0] non-existing PPS 0 referenced
[h264 @ 0x27897e0] decode_slice_header error
[h264 @ 0x27897e0] no frame!
[h264 @ 0x27897e0] non-existing PPS referenced
[h264 @ 0x27897e0] non-existing PPS 0 referenced
[h264 @ 0x27897e0] decode_slice_header error
[h264 @ 0x27897e0] no frame!
[aac @ 0x278b6c0] channel element 2.1 is not allocated
[h264 @ 0x27897e0] non-existing PPS referenced
[h264 @ 0x27897e0] non-existing PPS 0 referenced
[h264 @ 0x27897e0] decode_slice_header error
[h264 @ 0x27897e0] no frame!
[h264 @ 0x27897e0] non-existing PPS referenced
[h264 @ 0x27897e0] non-existing PPS 0 referenced
[h264 @ 0x27897e0] decode_slice_header error
[h264 @ 0x27897e0] no frame!
[h264 @ 0x27897e0] non-existing PPS referenced
[h264 @ 0x27897e0] non-existing PPS 0 referenced
[h264 @ 0x27897e0] decode_slice_header error
[h264 @ 0x27897e0] no frame!
[h264 @ 0x27897e0] non-existing PPS referenced
[h264 @ 0x27897e0] non-existing PPS 0 referenced
[h264 @ 0x27897e0] decode_slice_header error
[h264 @ 0x27897e0] no frame!
[mpegts @ 0x2785ae0] max_analyze_duration 5000000 reached at 5013333
[mpegts @ 0x2785ae0] PES packet size mismatch
    Last message repeated 2 times
Input #0, mpegts, from '/data/8femmes.ts':
  Duration: 02:00:00.04, start: 4577.324778, bitrate: 4806 kb/s
  Program 56126 
    Stream #0:0[0x44]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1440x1080 [SAR 4:3 DAR 16:9], 27.48 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x45](fra): Audio: aac ([15][0][0][0] / 0x000F), 48000 Hz, stereo, s16, 112 kb/s
    Stream #0:2[0x46](fra): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
    Stream #0:3[0x47](deu): Audio: aac ([15][0][0][0] / 0x000F), 48000 Hz, stereo, s16, 69 kb/s
[buffer @ 0x278bee0] w:1440 h:1080 pixfmt:yuv420p tb:1/1000000 sar:4/3 sws_param:
[libx264 @ 0x278c8a0] using SAR=4/3
[libx264 @ 0x278c8a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
[libx264 @ 0x278c8a0] constant rate-factor is incompatible with 2pass.
Output #0, h264, to '/data/test8.h264':
    Stream #0:0: Video: h264, yuv420p, 1440x1080 [SAR 4:3 DAR 16:9], q=-1--1, pass 2, 90k tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> libx264)
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

I try to add a -qcomp option but the result is the same ...
Thanks in advance for your solutions.
 		 	   		  


More information about the ffmpeg-user mailing list