[FFmpeg-user] Problems with '-frames' option

Tim Nicholson nichot20 at yahoo.com
Thu Jan 24 16:15:02 CET 2013


Whilst attempting to limit the coded frames using the following:-

tim at V-devel2:~/test> ffmpeg_Jan-24 -i in.mov -frames 43245 -y -f mov
-map 0:v -map 0:a -flags +ildct -vf "scale=iw:ih:interl=1,
format=yuv422p10le" -c:v prores_kostya -profile:v 3 -c:a copy
-chunk_duration 20000 out.mov
ffmpeg version N-49242-gb4581e9-by_Tim Copyright (c) 2000-2013 the
FFmpeg developers
  built on Jan 24 2013 14:16:58 with gcc 4.6 (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=_Jan-24 --disable-ffserver --enable-libfaac
--enable-libfdk-aac --enable-libx264 --enable-libfreetype --disable-ffplay
  libavutil      52. 15.102 / 52. 15.102
  libavcodec     54. 90.100 / 54. 90.100
  libavformat    54. 61.104 / 54. 61.104
  libavdevice    54.  3.102 / 54.  3.102
  libavfilter     3. 33.100 /  3. 33.100
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
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 'in.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 537134592
    compatible_brands: qt
    creation_time   : 2013-01-14 17:43:10
  Duration: 00:28:49.84, start: 0.000000, bitrate: 170969 kb/s
    Stream #0:0(eng): Data: none (tmcd / 0x64636D74)
    Metadata:
      timecode        : 09:59:00:00
    Stream #0:1(eng): Video: rawvideo (2vuy / 0x79757632), uyvy422,
720x576, 165888 kb/s, SAR 16:15 DAR 4:3, 25 fps, 25 tbr, 25 tbn, 25 tbc
    Metadata:
      timecode        : 09:59:00:00
    Stream #0:2(eng): Audio: pcm_s24be (in24 / 0x34326E69), 48000 Hz,
mono, s32, 1152 kb/s
    Metadata:
      timecode        : 09:59:00:00
    Stream #0:3(eng): Audio: pcm_s24be (in24 / 0x34326E69), 48000 Hz,
mono, s32, 1152 kb/s
    Metadata:
      timecode        : 09:59:00:00
    Stream #0:4(eng): Audio: pcm_s24be (in24 / 0x34326E69), 48000 Hz,
mono, s32, 1152 kb/s
    Metadata:
      timecode        : 09:59:00:00
    Stream #0:5(eng): Audio: pcm_s24be (in24 / 0x34326E69), 48000 Hz,
mono, s32, 1152 kb/s
    Metadata:
      timecode        : 09:59:00:00
Output #0, mov, to 'out.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 537134592
    compatible_brands: qt
    encoder         : Lavf54.61.104
    Stream #0:0(eng): Video: prores (apch / 0x68637061), yuv422p10le,
720x576 [SAR 16:15 DAR 4:3], q=2-31, 200 kb/s, 12800 tbn, 25 tbc
    Metadata:
      timecode        : 09:59:00:00
    Stream #0:1(eng): Audio: pcm_s24be (in24 / 0x34326E69), 48000 Hz,
mono, 1152 kb/s
    Metadata:
      timecode        : 09:59:00:00
    Stream #0:2(eng): Audio: pcm_s24be (in24 / 0x34326E69), 48000 Hz,
mono, 1152 kb/s
    Metadata:
      timecode        : 09:59:00:00
    Stream #0:3(eng): Audio: pcm_s24be (in24 / 0x34326E69), 48000 Hz,
mono, 1152 kb/s
    Metadata:
      timecode        : 09:59:00:00
    Stream #0:4(eng): Audio: pcm_s24be (in24 / 0x34326E69), 48000 Hz,
mono, 1152 kb/s
    Metadata:
      timecode        : 09:59:00:00
Stream mapping:
  Stream #0:1 -> #0:0 (rawvideo -> prores_kostya)
  Stream #0:2 -> #0:1 (copy)
  Stream #0:3 -> #0:2 (copy)
  Stream #0:4 -> #0:3 (copy)
  Stream #0:5 -> #0:4 (copy)
Press [q] to stop, [?] for help
qrame=30133 fps= 16 q=0.0 size= 7143839kB time=00:20:05.32
bitrate=48553.4kbits/s
^CKilled

I find that after around 2000 frames have been coded, the output file
ceases to grow, and instead ffmpeg's memory usage grows at around 10M/s
until the computer runs out of memory. Once this state is reached ffmpeg
does not respond to a [q] in the terminal or a SIGTERM, but only a SIGKILL.

Changing the -frames to -frames:v solve the problem, however this only
stops writing the video stream, and I wish to stop writing all of them,
and according to the documentation the :stream_specifier is optional as
with other options.

I have gone back to a previous build of ffmpeg (dcbf72836) and that
behaves the same way.

Before I log this on trak does anyone have any thoughts on the validity
of what I am trying to do?
-- 
Tim


More information about the ffmpeg-user mailing list