[FFmpeg-trac] #3211(documentation:new): Wront example on ffmpeg-filters 6.2 adelay

FFmpeg trac at avcodec.org
Mon Dec 9 20:26:26 CET 2013


#3211: Wront example on ffmpeg-filters 6.2 adelay
-------------------------------------+-------------------------------------
             Reporter:  Fusl         |                     Type:  defect
               Status:  new          |                 Priority:  minor
            Component:               |                  Version:
  documentation                      |  unspecified
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Hi,

 i studied the [http://ffmpeg.org/ffmpeg-filters.html ffmpeg-filters] page,
 especially the [http://ffmpeg.org/ffmpeg-filters.html#adelay 6.2 adelay]
 part a few days ago and tried out the example... This is what i get and
 below is how it should be (fixed):

 {{{
  fusl at thinkbook  ~   ffmpeg -loglevel debug -i testin.mp3 -af
 'adelay=1000:1000' testout.mp3
 ffmpeg version N-58852-g4dfc8f6 Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Dec  7 2013 13:24:02 with gcc 4.8 (SUSE Linux)
   configuration: --enable-gpl --enable-libx264 --enable-libmp3lame
 --enable-nonfree --enable-libaacplus --enable-x11grab
   libavutil      52. 56.100 / 52. 56.100
   libavcodec     55. 45.100 / 55. 45.100
   libavformat    55. 22.100 / 55. 22.100
   libavdevice    55.  5.102 / 55.  5.102
   libavfilter     3. 92.100 /  3. 92.100
   libswscale      2.  5.101 /  2.  5.101
   libswresample   0. 17.104 /  0. 17.104
   libpostproc    52.  3.100 / 52.  3.100
 Splitting the commandline.
 Reading option '-loglevel' ... matched as option 'loglevel' (set logging
 level) with argument 'debug'.
 Reading option '-i' ... matched as input file with argument 'testin.mp3'.
 Reading option '-af' ... matched as option 'af' (set audio filters) with
 argument 'adelay=1000:1000'.
 Reading option 'testout.mp3' ... matched as output file.
 Finished splitting the commandline.
 Parsing a group of options: global .
 Applying option loglevel (set logging level) with argument debug.
 Successfully parsed a group of options.
 Parsing a group of options: input file testin.mp3.
 Successfully parsed a group of options.
 Opening an input file: testin.mp3.
 [mp3 @ 0x2270900] Format mp3 probed with size=2048 and score=51
 [mp3 @ 0x2270900] id3v2 ver:4 flags:00 len:35
 [mp3 @ 0x2270900] pad 576 0
 [mp3 @ 0x2270900] Before avformat_find_stream_info() pos: 227 bytes
 read:32768 seeks:0
 [mp3 @ 0x2270900] demuxer injecting skip 1105
 [mp3 @ 0x2271840] skip 1105 samples due to side data
 [mp3 @ 0x2271840] skip 1105/1152 samples
 [mp3 @ 0x2270900] max_analyze_duration 5000000 reached at 5015510
 microseconds
 [mp3 @ 0x2270900] After avformat_find_stream_info() pos: 82147 bytes
 read:98304 seeks:0 frames:194
 Input #0, mp3, from 'testin.mp3':
   Metadata:
     encoder         : Lavf55.22.100
   Duration: 00:00:10.00, start: 0.000000, bitrate: 128 kb/s
     Stream #0:0, 194, 1/14112000: Audio: mp3, 44100 Hz, stereo, s16p, 128
 kb/s
 Successfully opened the file.
 Parsing a group of options: output file testout.mp3.
 Applying option af (set audio filters) with argument adelay=1000:1000.
 Successfully parsed a group of options.
 Opening an output file: testout.mp3.
 Successfully opened the file.
 detected 2 logical cores
 [Parsed_adelay_0 @ 0x2289c60] Setting 'delays' to value '1000'
 [Parsed_adelay_0 @ 0x2289c60] No option name near '1000'
 [AVFilterGraph @ 0x22b0fe0] Error initializing filter 'adelay' with args
 '1000:1000'
 Error opening filters!
 [AVIOContext @ 0x22b12c0] Statistics: 0 seeks, 0 writeouts
 [AVIOContext @ 0x2278fc0] Statistics: 98304 bytes read, 0 seeks
 }}}

 Working (fixed example by changing ':' to '|'):
 {{{
  fusl at thinkbook  ~   ffmpeg -loglevel debug -i testin.mp3 -af
 'adelay=1000|1000' testout.mp3
 ffmpeg version N-58852-g4dfc8f6 Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Dec  7 2013 13:24:02 with gcc 4.8 (SUSE Linux)
   configuration: --enable-gpl --enable-libx264 --enable-libmp3lame
 --enable-nonfree --enable-libaacplus --enable-x11grab
   libavutil      52. 56.100 / 52. 56.100
   libavcodec     55. 45.100 / 55. 45.100
   libavformat    55. 22.100 / 55. 22.100
   libavdevice    55.  5.102 / 55.  5.102
   libavfilter     3. 92.100 /  3. 92.100
   libswscale      2.  5.101 /  2.  5.101
   libswresample   0. 17.104 /  0. 17.104
   libpostproc    52.  3.100 / 52.  3.100
 Splitting the commandline.
 Reading option '-loglevel' ... matched as option 'loglevel' (set logging
 level) with argument 'debug'.
 Reading option '-i' ... matched as input file with argument 'testin.mp3'.
 Reading option '-af' ... matched as option 'af' (set audio filters) with
 argument 'adelay=1000|1000'.
 Reading option 'testout.mp3' ... matched as output file.
 Finished splitting the commandline.
 Parsing a group of options: global .
 Applying option loglevel (set logging level) with argument debug.
 Successfully parsed a group of options.
 Parsing a group of options: input file testin.mp3.
 Successfully parsed a group of options.
 Opening an input file: testin.mp3.
 [mp3 @ 0x190b900] Format mp3 probed with size=2048 and score=51
 [mp3 @ 0x190b900] id3v2 ver:4 flags:00 len:35
 [mp3 @ 0x190b900] pad 576 0
 [mp3 @ 0x190b900] Before avformat_find_stream_info() pos: 227 bytes
 read:32768 seeks:0
 [mp3 @ 0x190b900] demuxer injecting skip 1105
 [mp3 @ 0x190c840] skip 1105 samples due to side data
 [mp3 @ 0x190c840] skip 1105/1152 samples
 [mp3 @ 0x190b900] max_analyze_duration 5000000 reached at 5015510
 microseconds
 [mp3 @ 0x190b900] After avformat_find_stream_info() pos: 82147 bytes
 read:98304 seeks:0 frames:194
 Input #0, mp3, from 'testin.mp3':
   Metadata:
     encoder         : Lavf55.22.100
   Duration: 00:00:10.00, start: 0.000000, bitrate: 128 kb/s
     Stream #0:0, 194, 1/14112000: Audio: mp3, 44100 Hz, stereo, s16p, 128
 kb/s
 Successfully opened the file.
 Parsing a group of options: output file testout.mp3.
 Applying option af (set audio filters) with argument adelay=1000|1000.
 Successfully parsed a group of options.
 Opening an output file: testout.mp3.
 Successfully opened the file.
 detected 2 logical cores
 [Parsed_adelay_0 @ 0x1924c60] Setting 'delays' to value '1000|1000'
 [graph 0 input from stream 0:0 @ 0x1925300] Setting 'time_base' to value
 '1/44100'
 [graph 0 input from stream 0:0 @ 0x1925300] Setting 'sample_rate' to value
 '44100'
 [graph 0 input from stream 0:0 @ 0x1925300] Setting 'sample_fmt' to value
 's16p'
 [graph 0 input from stream 0:0 @ 0x1925300] Setting 'channel_layout' to
 value '0x3'
 [graph 0 input from stream 0:0 @ 0x1925300] tb:1/44100 samplefmt:s16p
 samplerate:44100 chlayout:0x3
 [audio format for output stream 0:0 @ 0x1925ac0] Setting 'sample_fmts' to
 value 's32p|fltp|s16p'
 [audio format for output stream 0:0 @ 0x1925ac0] Setting 'sample_rates' to
 value '44100|48000|32000|22050|24000|16000|11025|12000|8000'
 [audio format for output stream 0:0 @ 0x1925ac0] Setting 'channel_layouts'
 to value '0x4|0x3'
 [AVFilterGraph @ 0x194bfe0] query_formats: 4 queried, 9 merged, 0 already
 done, 0 delayed
 Output #0, mp3, to 'testout.mp3':
   Metadata:
     TSSE            : Lavf55.22.100
     Stream #0:0, 0, 1/90000: Audio: mp3 (libmp3lame), 44100 Hz, stereo,
 s16p
 Stream mapping:
   Stream #0:0 -> #0:0 (mp3 -> libmp3lame)
 Press [q] to stop, [?] for help
 [mp3 @ 0x190c840] skip 1105 samples due to side data
 [mp3 @ 0x190c840] skip 1105/1152 samples
 [output stream 0:0 @ 0x1925be0] EOF on sink link output stream
 0:0:default.
 No more output streams to write to, finishing.
 [libmp3lame @ 0x191c0c0] Trying to remove 828 more samples than there are
 in the queue
 size=     172kB time=00:00:11.02 bitrate= 128.2kbits/s
 video:0kB audio:172kB subtitle:0 global headers:0kB muxing overhead
 0.128701%
 383 frames successfully decoded, 0 decoding errors
 [AVIOContext @ 0x194c2c0] Statistics: 2 seeks, 424 writeouts
 [AVIOContext @ 0x1913fc0] Statistics: 160305 bytes read, 0 seeks
 }}}

 So, it's just the example {{{adelay=1500:0:500}}} which confused me and
 could confuse other users also. Fixing the example could also save lifes
 where developers could very quickly become angry, when something which
 should work does not work. :)

--
Ticket URL: <https://trac.ffmpeg.org/ticket/3211>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list