[FFmpeg-user] Issue with -async parameter (and maybe with asf container)

Massimo Battistel battistel at gmail.com
Mon Jun 9 11:54:58 CEST 2014


Hello,
you can download sample from here:

http://www.datafilehost.com/d/cd51b0ca

This is related with "Video with copyright" discussion.

The following command line works fine:
ffmpeg -i sample.asf -acodec pcm_s16le -ac 2 -f asf - > nul


But adding "-async 1000" gives me a big issue and ffmpeg never ends (and
uses ~700MB of memory):

ffmpeg -i sample.asf -acodec pcm_s16le -ac 2 -async 1000 -f asf - > nul

ffmpeg version N-63176-g1fb4685 Copyright (c) 2000-2014 the FFmpeg
developers
  built on May 15 2014 22:05:35 with gcc 4.8.2 (GCC)
  configuration: --disable-static --enable-shared --enable-gpl
--enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib
--enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv
--enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype
--enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug
--enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libopenjpeg --enable-libopus --enable-librtmp
--enable-libschroedinger --enable-libsoxr --enable-libspeex
--enable-libtheora --enable-libtwolame --enable-libvidstab
--enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis
--enable-libvpx --enable-libwavpack --enable-libx264 --enable-libx265
--enable-libxavs --enable-libxvid --enable-decklink --enable-zlib
  libavutil      52. 83.100 / 52. 83.100
  libavcodec     55. 62.100 / 55. 62.100
  libavformat    55. 38.100 / 55. 38.100
  libavdevice    55. 13.101 / 55. 13.101
  libavfilter     4.  5.100 /  4.  5.100
  libswscale      2.  6.100 /  2.  6.100
  libswresample   0. 19.100 /  0. 19.100
  libpostproc    52.  3.100 / 52.  3.100
Input #0, asf, from 'sample.asf':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41
    encoder         : Lavf55.38.100
  Duration: 00:26:18.69, start: 0.000000, bitrate: 399 kb/s
    Stream #0:0: Audio: aac ([255][0][0][0] / 0x00FF), 48000 Hz, stereo,
fltp, 317 kb/s
-async is forwarded to lavfi similarly to -af
aresample=async=1000:min_hard_comp=0.100000:first_pts=0.
Output #0, asf, to 'pipe:':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41
    WM/EncodingSettings: Lavf55.38.100
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz,
stereo, s16, 1536 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (aac -> pcm_s16le)
Press [q] to stop, [?] for help
size=   30604kB time=00:01:44.46 bitrate=2399.8kbits/s
size=   60848kB time=00:03:27.70 bitrate=2399.9kbits/s
size=   91054kB time=00:05:10.80 bitrate=2399.9kbits/s
size=  122785kB time=00:06:59.11 bitrate=2399.9kbits/s
size=  159766kB time=00:09:05.34 bitrate=2400.0kbits/s
size=  194223kB time=00:11:02.95 bitrate=2400.0kbits/s
[asf @ 00660a80] Non-monotonous DTS in output stream 0:0; previous: 760021,
current: 0; changing to 760022. This may result in incorrect timestamps in
the output file.
[asf @ 00660a80] Non-monotonous DTS in output stream 0:0; previous: 760022,
current: 21; changing to 760023. This may result in incorrect timestamps in
the output file.
size=  222679kB time=00:12:40.04 bitrate=2400.1kbits/s
size=  222679kB time=00:12:40.04 bitrate=2400.1kbits/s
size=  222679kB time=00:12:40.04 bitrate=2400.1kbits/s
size=  222679kB time=00:12:40.04 bitrate=2400.1kbits/s
size=  222679kB time=00:12:40.04 bitrate=2400.1kbits/s
size=  222679kB time=00:12:40.04 bitrate=2400.1kbits/s
size=  222679kB time=00:12:40.04 bitrate=2400.1kbits/s
size=  222679kB time=00:12:40.04 bitrate=2400.1kbits/s
size=  222679kB time=00:12:40.04 bitrate=2400.1kbits/s
size=  222679kB time=00:12:40.04 bitrate=2400.1kbits/s
size=  222679kB time=00:12:40.04 bitrate=2400.1kbits/s
size=  222679kB time=00:12:40.04 bitrate=2400.1kbits/s
size=  222679kB time=00:12:40.04 bitrate=2400.1kbits/s
size=  222679kB time=00:12:40.04 bitrate=2400.1kbits/s
size=  222679kB time=00:12:40.04 bitrate=2400.1kbits/s
size=  222679kB time=00:12:40.04 bitrate=2400.1kbits/s
size=  222679kB time=00:12:40.04 bitrate=2400.1kbits/s
size=  222679kB time=00:12:40.04 bitrate=2400.1kbits/s
size=  222679kB time=00:12:40.04 bitrate=2400.1kbits/s
size=  222679kB time=00:12:40.04 bitrate=2400.1kbits/s
size=  222679kB time=00:12:40.04 bitrate=2400.1kbits/s
size=  222679kB time=00:12:40.04 bitrate=2400.1kbits/s
size=  222679kB time=00:12:40.04 bitrate=2400.1kbits/s
size=  222679kB time=00:12:40.04 bitrate=2400.1kbits/s
size=  222679kB time=00:12:40.04 bitrate=2400.1kbits/s
size=  222682kB time=00:12:40.04 bitrate=2400.1kbits/s

video:0kB audio:142516kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 56.250317%

I had to stop it with 'q' key.


An interesting fact is that if you extract the raw audio track (no asf
container):

ffmpeg -i sample.asf -acodec copy sample.aac

then the issue disappear:

ffmpeg -i sample.aac -acodec pcm_s16le -ac 2 -async 1000 -f asf - > nul

The previous command line works fine.


This makes me think that issue could be related to asf muxer/demuxer.


thanks,
MB


More information about the ffmpeg-user mailing list