[FFmpeg-user] Problem with amerge

Tim Nicholson nichot20 at yahoo.com
Fri May 31 11:05:21 CEST 2013


Been updating some of my scripts to use amerge with filter_complex
instead of -f lavfi and hit an issue.

The following command line works properly (except that seeking is not
frame accurate, but thats another issue):-

ffmpeg -f lavfi -i \
"amovie='Pipeline_test/BPR10407_01.mov':si=2 [a1];
amovie='Pipeline_test/BPR10407_01.mov':si=3 [a2];
[a1][a2] amerge, aformat=sample_fmts=s16:channel_layouts=stereo" \
-i 'Pipeline_test/BPR10407_01.mov' \
-map 1:v -map 0:a \
-vf "crop=720:576:0:32, setdar=4/3, scale=720:576:interl=1 [scaled];
movie='dog-.png' [logo]; [scaled][logo] overlay=80:60" \
-target pal-dvd -b:v 8000k -minrate 8000k -maxrate 8000k \
-flags +ildct+ilme -top 1 \
-b:a 192k -ar 44100 \
-ss 1089.280 -t 53.20 \
-y 'coded/out.mpg'


However the updated version produces an error and the resulting file has
a large "echo" offset between the 2 audio channels. I have highlighted
the error line which is  near the bottom:-

ffmpeg \
> -i 'Pipeline_test/BPR10407_01.mov' \
> -filter_complex "crop=720:576:0:32, setdar=4/3, scale=720:576:interl=1
[scaled];
> movie='dog.png' [logo]; [scaled][logo] overlay=80:60 [v_out];
> [0:2][0:3] amerge=inputs=2,
aformat=sample_fmts=s16:channel_layouts=stereo [a_out]" \
> -map '[v_out]' -map '[a_out]' \
> -target pal-dvd -b:v 8000k -minrate 8000k -maxrate 8000k \
> -flags +ildct+ilme -top 1 \
> -b:a 192k -ar 44100 \
> -ss 1089.280 -t 53.20 \
> -y 'out.mpg'
ffmpeg version N-53704-g9d56ccf-by_Tim Copyright (c) 2000-2013 the
FFmpeg developers
  built on May 31 2013 08:54:31 with gcc 4.7 (SUSE Linux)
  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
--samples=../fate-suite/ --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=_May-31 --disable-ffserver --enable-libfaac
--enable-libfdk-aac --enable-libx264 --enable-libfreetype --disable-ffplay
  libavutil      52. 34.100 / 52. 34.100
  libavcodec     55. 12.102 / 55. 12.102
  libavformat    55.  8.102 / 55.  8.102
  libavdevice    55.  2.100 / 55.  2.100
  libavfilter     3. 73.100 /  3. 73.100
  libswscale      2.  3.100 /  2.  3.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2724bc0] Stream #0: not enough frames to
estimate rate; consider increasing probesize
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2724bc0] Stream #2: not enough frames to
estimate rate; consider increasing probesize


[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2724bc0] Stream #3: not enough frames to
estimate rate; consider increasing probesize


[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2724bc0] Stream #4: not enough frames to
estimate rate; consider increasing probesize


[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2724bc0] Stream #5: not enough frames to
estimate rate; consider increasing probesize


[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2724bc0] Stream #6: not enough frames to
estimate rate; consider increasing probesize


Guessed Channel Layout for  Input Stream #0.2 : mono



Guessed Channel Layout for  Input Stream #0.3 : mono



Guessed Channel Layout for  Input Stream #0.4 : mono



Guessed Channel Layout for  Input Stream #0.5 : mono



Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
'/mnt/EON-1/Media_hub/Yad_Vashem/Pipeline_test/BPR10407_01.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 537134592
    compatible_brands: qt
    creation_time   : 2013-05-24 14:45:19
  Duration: 00:23:56.76, start: 0.000000, bitrate: 53152 kb/s
    Stream #0:0(eng): Data: none (tmcd / 0x64636D74)
    Metadata:
      timecode        : 00:02:40:20
    Stream #0:1(eng): Video: mpeg2video (4:2:2) (mx5p / 0x7035786D),
yuv422p, 720x608 [SAR 152:135 DAR 4:3], 50073 kb/s, SAR 16:15 DAR 24:19,
25 fps, 25 tbr, 25 tbn, 50 tbc
    Metadata:
      timecode        : 00:02:40:20
    Stream #0:2(eng): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz,
mono, s16, 768 kb/s
    Metadata:
      timecode        : 00:02:40:20
    Stream #0:3(eng): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz,
mono, s16, 768 kb/s
    Metadata:
      timecode        : 00:02:40:20
    Stream #0:4(eng): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz,
mono, s16, 768 kb/s
    Metadata:
      timecode        : 00:02:40:20
    Stream #0:5(eng): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz,
mono, s16, 768 kb/s
    Metadata:
      timecode        : 00:02:40:20
    Stream #0:6(eng): Subtitle: eia_608 (c608 / 0x38303663)
[Parsed_amerge_5 @ 0x2736b20] No channel layout for input 1
[Parsed_amerge_5 @ 0x2736b20] Input channel layouts overlap: output
layout will be determined by the number of distinct input channels
Output #0, dvd, to 'out.mpg':
  Metadata:
    major_brand     : qt
    minor_version   : 537134592
    compatible_brands: qt
    encoder         : Lavf55.8.102
    Stream #0:0: Video: mpeg2video, yuv420p, 720x576 [SAR 16:15 DAR
4:3], q=2-31, 8000 kb/s, 90k tbn, 25 tbc
    Stream #0:1: Audio: ac3, 44100 Hz, stereo, fltp, 192 kb/s
Stream mapping:
  Stream #0:1 (mpeg2video) -> crop
  Stream #0:2 (pcm_s16be) -> amerge:in0
  Stream #0:3 (pcm_s16be) -> amerge:in1
  overlay -> Stream #0:0 (mpeg2video)
  aformat -> Stream #0:1 (ac3)
Press [q] to stop, [?] for help
Error while decoding stream #0:2: Cannot allocate memory <------ERROR
    Last message repeated 6 times
ac-tex damaged at 43 131.6 size=   54070kB time=00:00:53.17
bitrate=8329.2kbits/s
[mpeg2video @ 0x27271e0] Warning MVs not available
[mpeg2video @ 0x27271e0] concealing 1082 DC, 1082 AC, 1082 MV errors in
I frame
frame= 1330 fps=5.0 q=21.8 Lsize=   54218kB time=00:00:53.21
bitrate=8346.5kbits/s
video:52056kB audio:1247kB subtitle:0 global headers:0kB muxing overhead
1.715243%

-- 
Tim


More information about the ffmpeg-user mailing list