[MEncoder-users] Sound problem when transcoding and joining 2 mpg-files

Jan Ehrhardt phpdev at ehrhardt.nl
Fri Sep 21 15:44:20 CEST 2012


Jan Ehrhardt in gmane.comp.video.mencoder.user (Fri, 21 Sep 2012 12:07:36 +0200):
>It would solve my problems with transcoding and joining mpg-files. But
>sadly enough, FFmpeg's concat protocol does not work on all files. For
>instance, the Zoom Q3HD camera produces MP4-files (AVC1, AAC) that
>cannot be concatted by FFmpeg. It seems to go OK, but on playing it
>stops after the first one.
>
>I'll have to check yet how old and new MEncoders handle these files.

s/Zoom Q3HD/Panasonic HC-V10/
Source files:
http://x32.elijst.nl/S1000001.MP4 
http://x32.elijst.nl/S1000002.MP4

Old and new MEncoders transcode and join these MP4-files without
problem, FFMpeg does not.

ffmpeg.exe -i concat:"S1000001.MP4|S1000002.MP4"
	-vf scale=384:288 -aspect 4:3 -sws_flags bicubic
	-vcodec libx264 -b 320k -r 25
	-strict -2 -acodec aac -ab 96k -ac 2
	-x264opts [a lot] mp4concat-ffmpeg.mp4
produces
http://x32.elijst.nl/mp4concat-ffmpeg.mp4 
FFMpeg has all kinds of problems with these files and just stops
after the first file. Output at the end of this message.

mencoder -mc 1 -demuxer lavf -vf scale=384:288 -aspect 4:3 -sws 2
	-lavdopts fast:threads=8 -of lavf -lavfopts format=mp4
	-ovc x264 -x264encopts [a lot]
	-oac lavc -lavcopts acodec=libfaac:abitrate=96:aglobal=1
	-af volnorm -o mp4concat-old-mencoder.mp4 
	S1000001.MP4 S1000002.MP4
produces
http://x32.elijst.nl/mp4concat-old-mencoder.mp4 
or
http://x32.elijst.nl/mp4concat-new-mencoder.mp4 

Management summary: as long as MP4box is slow (in processing files
on a SD card) I cannot use FFmpeg to transcode and join these
MP4-files on the SD card itself.

Jan

ffmpeg version N-44123-g5d55830 Copyright (c) 2000-2012 the FFmpeg developers
  built on Sep  2 2012 20:23:29 with gcc 4.7.1 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-pthreads --enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libass --enable-libcelt --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype
--enable-libgsm --enable-libmp3lame --enable-libnut --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libutvideo --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis
--enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      51. 70.100 / 51. 70.100
  libavcodec     54. 55.100 / 54. 55.100
  libavformat    54. 25.104 / 54. 25.104
  libavdevice    54.  2.100 / 54.  2.100
  libavfilter     3. 15.102 /  3. 15.102
  libswscale      2.  1.101 /  2.  1.101
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
[h264 @ 03bf5920] AVC: nal size 29034
[h264 @ 03bf5920] no frame!
[h264 @ 03bf5920] AVC: nal size -1922622160
[h264 @ 03bf5920] no frame!
[h264 @ 03bf5920] AVC: nal size -531498059
[h264 @ 03bf5920] no frame!
[h264 @ 03bf5920] AVC: nal size -168804334
[h264 @ 03bf5920] no frame!
[h264 @ 03bf5920] AVC: nal size 1650737613
[h264 @ 03bf5920] no frame!
[h264 @ 03bf5920] AVC: nal size 8388608
[h264 @ 03bf5920] no frame!
[h264 @ 03bf5920] AVC: nal size -862150784
[h264 @ 03bf5920] no frame!
[h264 @ 03bf5920] AVC: nal size 2126981594
[h264 @ 03bf5920] no frame!
[h264 @ 03bf5920] AVC: nal size 1344536332
[h264 @ 03bf5920] no frame!
[h264 @ 03bf5920] AVC: nal size -1077805632
[h264 @ 03bf5920] no frame!
[h264 @ 03bf5920] AVC: nal size -77514979
[h264 @ 03bf5920] no frame!
[h264 @ 03bf5920] AVC: nal size 135200853
[h264 @ 03bf5920] no frame!
[h264 @ 03bf5920] AVC: nal size 820139573
[h264 @ 03bf5920] no frame!
[h264 @ 03bf5920] AVC: nal size 259299403
[h264 @ 03bf5920] no frame!
[h264 @ 03bf5920] AVC: nal size 1476381464
[h264 @ 03bf5920] no frame!
[h264 @ 03bf5920] AVC: nal size -1347386985
[h264 @ 03bf5920] no frame!
[h264 @ 03bf5920] AVC: nal size -1613502833
[h264 @ 03bf5920] no frame!
[h264 @ 03bf5920] AVC: nal size -2069083297
[h264 @ 03bf5920] no frame!
[h264 @ 03bf5920] AVC: nal size -229004721
[h264 @ 03bf5920] no frame!
[h264 @ 03bf5920] AVC: nal size 942723670
[h264 @ 03bf5920] no frame!
[h264 @ 03bf5920] AVC: nal size -573046408
[h264 @ 03bf5920] no frame!
[h264 @ 03bf5920] AVC: nal size 1414228237
[h264 @ 03bf5920] no frame!
[h264 @ 03bf5920] AVC: nal size 250171837
[h264 @ 03bf5920] no frame!
[h264 @ 03bf5920] AVC: nal size -986042530
[h264 @ 03bf5920] no frame!
[h264 @ 03bf5920] AVC: nal size -1035486555
[h264 @ 03bf5920] no frame!
[aac @ 01f5dba0] channel element 3.12 is not allocated
[h264 @ 03bf5920] AVC: nal size 14394
[h264 @ 03bf5920] AVC: nal size 1637483542
[h264 @ 03bf5920] no frame!
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'concat:\DCIM\100VBPBH\S1000001.MP4|\DCIM\100VBPBH\S1000002.MP4':
  Metadata:
    minor_version   : 1
    major_brand     : mp42
    compatible_brands: mp42avc1
  Duration: 00:00:05.00, start: 0.000000, bitrate: 20761 kb/s
    Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 6121 kb/s, 50 fps, 50 tbr, 60k tbn, 100 tbc
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 246 kb/s
    Stream #0:2(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 6170 kb/s, 50 fps, 50 tbr, 60k tbn, 100 tbc
    Stream #0:3(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 237 kb/s
Please use -b:a or -b:v, -b is ambiguous
[libx264 @ 045502a0] using SAR=1/1
[libx264 @ 045502a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX
[libx264 @ 045502a0] profile Constrained Baseline, level 3.0
[libx264 @ 045502a0] 264 - core 125 r2208 d9d2288 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=1:0:0 analyse=0x1:0x110 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16
chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=90 keyint_min=12 scenecut=0
intra_refresh=0 rc_lookahead=15 rc=abr mbtree=1 bitrate=320 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=51 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to '/DCIM/mp4concat-ffmpeg.mp4':
  Metadata:
    minor_version   : 1
    major_brand     : mp42
    compatible_brands: mp42avc1
    encoder         : Lavf54.25.104
    Stream #0:0(eng): Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 384x288 [SAR 1:1 DAR 4:3], q=-1--1, 320 kb/s, 25 tbn, 25 tbc
    Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, flt, 96 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> libx264)
  Stream #0:1 -> #0:1 (aac -> aac)
Press [q] to stop, [?] for help
frame=   91 fps=0.0 q=36.0 size=     141kB time=00:00:03.45 bitrate= 333.6kbits/s dup=0 drop=86    
frame=  182 fps=182 q=36.0 size=     334kB time=00:00:06.95 bitrate= 393.4kbits/s dup=0 drop=176    
frame=  253 fps=182 q=-1.0 Lsize=     536kB time=00:00:10.12 bitrate= 433.6kbits/s dup=0 drop=247    

video:411kB audio:118kB subtitle:0 global headers:0kB muxing overhead 1.277504%
[libx264 @ 045502a0] frame I:3     Avg QP:29.13  size:  8200
[libx264 @ 045502a0] frame P:250   Avg QP:33.43  size:  1583
[libx264 @ 045502a0] mb I  I16..4: 31.1%  0.0% 68.9%
[libx264 @ 045502a0] mb P  I16..4:  3.2%  0.0%  0.0%  P16..4: 42.3% 11.5%  1.5%  0.0%  0.0%    skip:41.5%
[libx264 @ 045502a0] final ratefactor: 30.32
[libx264 @ 045502a0] coded y,uvDC,uvAC intra: 31.0% 32.7% 11.8% inter: 17.0% 9.9% 0.1%
[libx264 @ 045502a0] i16 v,h,dc,p: 30% 40% 16% 14%
[libx264 @ 045502a0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 25% 14%  9%  5%  5%  7%  6%  6%
[libx264 @ 045502a0] i8c dc,h,v,p: 51% 22% 22%  5%
[libx264 @ 045502a0] kb/s:332.27

The NAL messages disappear if I -i S1000001.MP4 or -i S1000002.MP4,
but then I am once again confronted with the slowness of MP4box on
SD cards.

ffmpeg version N-44123-g5d55830 Copyright (c) 2000-2012 the FFmpeg developers
  built on Sep  2 2012 20:23:29 with gcc 4.7.1 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-pthreads --enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libass --enable-libcelt --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype
--enable-libgsm --enable-libmp3lame --enable-libnut --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libutvideo --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis
--enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      51. 70.100 / 51. 70.100
  libavcodec     54. 55.100 / 54. 55.100
  libavformat    54. 25.104 / 54. 25.104
  libavdevice    54.  2.100 / 54.  2.100
  libavfilter     3. 15.102 /  3. 15.102
  libswscale      2.  1.101 /  2.  1.101
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '\DCIM\100VBPBH\S1000001.MP4':
  Metadata:
    major_brand     : mp42
    minor_version   : 1
    compatible_brands: mp42avc1
  Duration: 00:00:10.00, start: 0.000000, bitrate: 6841 kb/s
    Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 6121 kb/s, 50 fps, 50 tbr, 60k tbn, 100 tbc
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 246 kb/s
Please use -b:a or -b:v, -b is ambiguous
[libx264 @ 01df82e0] using SAR=1/1
[libx264 @ 01df82e0] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX
[libx264 @ 01df82e0] profile Constrained Baseline, level 3.0
[libx264 @ 01df82e0] 264 - core 125 r2208 d9d2288 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=1:0:0 analyse=0x1:0x110 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16
chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=90 keyint_min=12 scenecut=0
intra_refresh=0 rc_lookahead=15 rc=abr mbtree=1 bitrate=320 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=51 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to '/DCIM/mp4concat-ffmpeg.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 1
    compatible_brands: mp42avc1
    encoder         : Lavf54.25.104
    Stream #0:0(eng): Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 384x288 [SAR 1:1 DAR 4:3], q=-1--1, 320 kb/s, 25 tbn, 25 tbc
    Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, flt, 96 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> libx264)
  Stream #0:1 -> #0:1 (aac -> aac)
Press [q] to stop, [?] for help
frame=   98 fps=0.0 q=35.0 size=     152kB time=00:00:03.45 bitrate= 360.7kbits/s dup=0 drop=92    
frame=  184 fps=184 q=36.0 size=     339kB time=00:00:06.95 bitrate= 399.6kbits/s dup=0 drop=178    
frame=  253 fps=182 q=-1.0 Lsize=     536kB time=00:00:10.12 bitrate= 433.6kbits/s dup=0 drop=247    

video:411kB audio:118kB subtitle:0 global headers:0kB muxing overhead 1.277504%
[libx264 @ 01df82e0] frame I:3     Avg QP:29.13  size:  8200
[libx264 @ 01df82e0] frame P:250   Avg QP:33.43  size:  1583
[libx264 @ 01df82e0] mb I  I16..4: 31.1%  0.0% 68.9%
[libx264 @ 01df82e0] mb P  I16..4:  3.2%  0.0%  0.0%  P16..4: 42.3% 11.5%  1.5%  0.0%  0.0%    skip:41.5%
[libx264 @ 01df82e0] final ratefactor: 30.32
[libx264 @ 01df82e0] coded y,uvDC,uvAC intra: 31.0% 32.7% 11.8% inter: 17.0% 9.9% 0.1%
[libx264 @ 01df82e0] i16 v,h,dc,p: 30% 40% 16% 14%
[libx264 @ 01df82e0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 25% 14%  9%  5%  5%  7%  6%  6%
[libx264 @ 01df82e0] i8c dc,h,v,p: 51% 22% 22%  5%
[libx264 @ 01df82e0] kb/s:332.27



More information about the MEncoder-users mailing list