Opened 12 years ago

Closed 11 years ago

#1450 closed defect (fixed)

ffmpeg does not terminate after end of input (asyncts used)

Reported by: Vadim Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords: asyncts
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Hello.

I have an issue when using "asyncts" audio filter:

ffmpeg command line

ffmpeg -i /tmp/flv.flv -vn -af asyncts=compensate=1 -acodec libfaac -f mpegts -y /tmp/xxx.ts
ffmpeg -i /tmp/flv.flv -vn -af asyncts=compensate=1 -acodec libfaac -f mpegts -y /tmp/xxx.ts
ffmpeg version 0.11 Copyright (c) 2000-2012 the FFmpeg developers
  built on Jan 19 2012 07:34:53 with gcc 4.6.2
  configuration: --shlibdir=/usr/lib64 --prefix=/usr --mandir=/usr/share/man --libdir=/usr/lib64 --enable-shared --disable-static --enable-debug --disable-stripping --extra-cflags='-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -fPIC -I/usr/include/gsm' --enable-gpl --enable-x11grab --enable-version3 --enable-pthreads --enable-libfaac --enable-nonfree --enable-avfilter --enable-libpulse --enable-libvpx --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libxvid --enable-libx264 --enable-libschroedinger --enable-libgsm --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-postproc --enable-libdc1394 --enable-librtmp --enable-libfreetype
  libavutil      51. 54.100 / 51. 54.100
  libavcodec     54. 23.100 / 54. 23.100
  libavformat    54.  6.100 / 54.  6.100
  libavdevice    54.  0.100 / 54.  0.100
  libavfilter     2. 77.100 /  2. 77.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
Input #0, flv, from '/tmp/flv.flv':
  Metadata:
    encoder         : Lavf54.6.100
  Duration: 00:03:46.82, start: 0.000000, bitrate: 3265 kb/s
    Stream #0:0: Video: flv1, yuv420p, 1280x720, 200 kb/s, 50 tbr, 1k tbn, 1k tbc
    Stream #0:1: Audio: mp3, 44100 Hz, stereo, s16, 128 kb/s
[AVAudioResampleContext @ 0x64d4c0] Using s16p as internal sample format
[mpegts @ 0x62db60] muxrate VBR, pcr every 4 pkts, sdt every 200, pat/pmt every 40 pkts
Output #0, mpegts, to '/tmp/xxx.ts':
  Metadata:
    encoder         : Lavf54.6.100
    Stream #0:0: Audio: aac, 44100 Hz, stereo, s16, 128 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (mp3 -> libfaac)
Press [q] to stop, [?] for help
Error in av_buffersink_get_buffer_ref(): Invalid argument
size=    1612kB time=00:01:31.92 bitrate= 143.7kbits/s

Everything seems to be OK until source runs out of data (EOF and connnection close are tested) or user decides to abort ffmpeg execution (hits ctrl+c).
In both cases ffmpeg does not terminate and starts to produce huge amount of messages (thousands per second) to stderr:

...
[mpegts @ 0x62db60] Audio timestamp 20310724 < 20313155 invalid, cliping
[libfaac @ 0x62e320] Que input is backward in time
[mpegts @ 0x62db60] Audio timestamp 20310720 < 20313156 invalid, cliping
[libfaac @ 0x62e320] Que input is backward in time
[mpegts @ 0x62db60] Audio timestamp 20310716 < 20313157 invalid, cliping
[libfaac @ 0x62e320] Que input is backward in time
[mpegts @ 0x62db60] Audio timestamp 20310712 < 20313158 invalid, cliping
[mpegts @ 0x62db60] Audio timestamp 20310708 < 20313159 invalid, cliping
[libfaac @ 0x62e320] Que input is backward in time
[mpegts @ 0x62db60] Audio timestamp 20310704 < 20313160 invalid, cliping
[libfaac @ 0x62e320] Que input is backward in time
[mpegts @ 0x62db60] Audio timestamp 20310700 < 20313161 invalid, cliping
[libfaac @ 0x62e320] Que input is backward in time
...

until kill or ctrl+c is issued by user.

Problem occurs only when asyncts filter is used:

# ffmpeg -i /tmp/flv.flv -vn -acodec libfaac -f mpegts -y /tmp/xxx.ts
ffmpeg version 0.11 Copyright (c) 2000-2012 the FFmpeg developers
  built on Jan 19 2012 07:34:53 with gcc 4.6.2
  configuration: --shlibdir=/usr/lib64 --prefix=/usr --mandir=/usr/share/man --libdir=/usr/lib64 --enable-shared --disable-static --enable-debug --disable-stripping --extra-cflags='-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -fPIC -I/usr/include/gsm' --enable-gpl --enable-x11grab --enable-version3 --enable-pthreads --enable-libfaac --enable-nonfree --enable-avfilter --enable-libpulse --enable-libvpx --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libxvid --enable-libx264 --enable-libschroedinger --enable-libgsm --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-postproc --enable-libdc1394 --enable-librtmp --enable-libfreetype
  libavutil      51. 54.100 / 51. 54.100
  libavcodec     54. 23.100 / 54. 23.100
  libavformat    54.  6.100 / 54.  6.100
  libavdevice    54.  0.100 / 54.  0.100
  libavfilter     2. 77.100 /  2. 77.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
Input #0, flv, from '/tmp/flv.flv':
  Metadata:
    encoder         : Lavf54.6.100
  Duration: 00:03:46.82, start: 0.000000, bitrate: 3265 kb/s
    Stream #0:0: Video: flv1, yuv420p, 1280x720, 200 kb/s, 50 tbr, 1k tbn, 1k tbc
    Stream #0:1: Audio: mp3, 44100 Hz, stereo, s16, 128 kb/s
[mpegts @ 0x62db60] muxrate VBR, pcr every 4 pkts, sdt every 200, pat/pmt every 40 pkts
Output #0, mpegts, to '/tmp/xxx.ts':
  Metadata:
    encoder         : Lavf54.6.100
    Stream #0:0: Audio: aac, 44100 Hz, stereo, s16, 128 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (mp3 -> libfaac)
Press [q] to stop, [?] for help
size=    3964kB time=00:03:45.74 bitrate= 143.8kbits/s
video:0kB audio:3526kB global headers:0kB muxing overhead 12.399394%

Change History (10)

comment:1 by Carl Eugen Hoyos, 12 years ago

Is this only reproducible with libfaac or also with the native aac encoder?

comment:2 by Carl Eugen Hoyos, 12 years ago

Is the problem also reproducible with current git head?

in reply to:  1 ; comment:3 by Vadim, 12 years ago

Replying to cehoyos:

Is this only reproducible with libfaac or also with the native aac encoder?

ffmpeg -i /tmp/flv.flv -strict -2 -vn -af asyncts=compensate=1 -codec:a aac -f mpegts -y /tmp/xxx.ts

Produce the same.

in reply to:  2 comment:4 by Vadim, 12 years ago

Replying to cehoyos:

Is the problem also reproducible with current git head?

I've just tried 0.11.1. Same results.

ffmpeg
ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers
  built on Jun 15 2012 05:22:47 with gcc 4.6.2
  configuration: --shlibdir=/usr/lib64 --prefix=/usr --mandir=/usr/share/man --libdir=/usr/lib64 --enable-shared --disable-static --enable-debug --disable-stripping --extra-cflags='-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -fPIC -I/usr/include/gsm' --enable-gpl --enable-x11grab --enable-version3 --enable-pthreads --enable-libfaac --enable-nonfree --enable-avfilter --enable-libpulse --enable-libvpx --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libxvid --enable-libx264 --enable-libschroedinger --enable-libgsm --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-postproc --enable-libdc1394 --enable-librtmp --enable-libfreetype --enable-avresample
  libavutil      51. 54.100 / 51. 54.100
  libavcodec     54. 23.100 / 54. 23.100
  libavformat    54.  6.100 / 54.  6.100
  libavdevice    54.  0.100 / 54.  0.100
  libavfilter     2. 77.100 /  2. 77.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
Hyper fast Audio and Video encoder

comment:5 by Carl Eugen Hoyos, 12 years ago

Please test current git head, if you cannot use git, please download a snapshot, see http://ffmpeg.org/download.html

in reply to:  3 comment:6 by Carl Eugen Hoyos, 12 years ago

Replying to lvm:

Replying to cehoyos:

Is this only reproducible with libfaac or also with the native aac encoder?

ffmpeg -i /tmp/flv.flv -strict -2 -vn -af asyncts=compensate=1 -codec:a aac -f mpegts -y /tmp/xxx.ts

Produce the same.

Please always provide complete, uncut console output.

comment:7 by Florian Vallee, 12 years ago

Hi guys, I believe I have the same issue with current git head

Command line :

ffmpeg -v debug -i ./sample.ts -vn -af asyncts=compensate=1 -acodec pcm_s16le -sn -y out.wav
(see full log at the bottom of this comment)

Sample file is available to grab here : http://ey3ball.net/ffmpeg/sample.ts

Result : data is encoded properly, but when ffmpeg exits, it hangs indefinitely (CPU going up to 100% usage)

Looking at what happens in gdb, it seems that ffmpeg is stuck in an infinite loop in poll_filters because the asyncts filter won't return AVERROR_EOF.

I looked at the filter code and the only function that seem to matter for EOS is request_frame.
In this function AVERROR_EOF is detected, however in the event of an EOS, the request_frame function will always return 0 instead of forwarding the EOS to the caller.
I made the very simple following fix :

diff --git a/libavfilter/af_asyncts.c b/libavfilter/af_asyncts.c
index 6322b24..724f62e 100644
--- a/libavfilter/af_asyncts.c
+++ b/libavfilter/af_asyncts.c
@@ -131,7 +131,6 @@ static int request_frame(AVFilterLink *link)
                            nb_samples, NULL, 0, 0);
         buf->pts = s->pts;
         ff_filter_samples(link, buf);
-        return 0;
     }
 
     return ret;

Which seem to work.

As I have no experience whatsoever with the ffmpeg codebase, can someone more familiar with it please confirm this is correct ?

Thank you

(full application log below)

ffmpeg version N-41780-g5a90e55 Copyright (c) 2000-2012 the FFmpeg developers
  built on Jun 21 2012 00:29:23 with gcc 4.6.3
  configuration: --prefix=/home/florian/avtools/build --extra-cflags=-I/home/florian/avtools/build/include --extra-ldflags=-L/home/florian/avtools/build/lib --enable-gpl --enable-nonfree --enable-libaacplus --enable-libfaac --enable-libmp3lame --enable-libx264 --enable-version3 --enable-avresample
  libavutil      51. 59.100 / 51. 59.100
  libavcodec     54. 27.100 / 54. 27.100
  libavformat    54.  9.100 / 54.  9.100
  libavdevice    54.  0.100 / 54.  0.100
  libavfilter     2. 82.100 /  2. 82.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
[mpegts @ 0x17f9120] Format mpegts probed with size=2048 and score=100
[mpegts @ 0x17f9120] stream=0 stream_type=2 pid=208 prog_reg_desc=
[mpegts @ 0x17f9120] stream=1 stream_type=3 pid=212 prog_reg_desc=
[mpegts @ 0x17f9120] stream=2 stream_type=6 pid=21c prog_reg_desc=
[mpegts @ 0x17f9120] stream=3 stream_type=5 pid=23a prog_reg_desc=
[mpegts @ 0x17f9120] stream=4 stream_type=b pid=23b prog_reg_desc=
[mpegts @ 0x17f9120] stream=5 stream_type=c pid=23c prog_reg_desc=
[mpegts @ 0x17f9120] stream=6 stream_type=80 pid=23d prog_reg_desc=
[mpegts @ 0x17f9120] stream=7 stream_type=80 pid=23e prog_reg_desc=
[mpegts @ 0x17f9120] File position before avformat_find_stream_info() is 0
[mpegts @ 0x17f9120] parser not found for codec none, packets or times may be invalid.
    Last message repeated 4 times
[mpeg2video @ 0x1819900] mpeg_decode_postinit() failure
    Last message repeated 5 times
[mpegts @ 0x17f9120] first_dts 2420443943 not matching first dts 2420456903 in que 
    Last message repeated 4 times
[mpeg2video @ 0x1819900] mpeg_decode_postinit() failure
[mpegts @ 0x17f9120] first_dts 2420443943 not matching first dts 2420469863 in que 
    Last message repeated 4 times
[mpegts @ 0x17f9120] first_dts 2420443943 not matching first dts 2420482823 in que 
    Last message repeated 4 times
[mpegts @ 0x17f9120] first_dts 2420443943 not matching first dts 2420495783 in que 
    Last message repeated 4 times
[mpegts @ 0x17f9120] first_dts 2420443943 not matching first dts 2420508743 in que 
    Last message repeated 4 times
[mpegts @ 0x17f9120] first_dts 2420443943 not matching first dts 2420521703 in que 
    Last message repeated 4 times
[mpegts @ 0x17f9120] first_dts 2420443943 not matching first dts 2420534663 in que 
    Last message repeated 4 times
[mpegts @ 0x17f9120] first_dts 2420443943 not matching first dts 2420547623 in que 
    Last message repeated 4 times
[mpegts @ 0x17f9120] first_dts 2420443943 not matching first dts 2420560583 in que 
    Last message repeated 4 times
[mpegts @ 0x17f9120] first_dts 2420443943 not matching first dts 2420573543 in que 
    Last message repeated 4 times
[mpegts @ 0x17f9120] PES packet size mismatch
[mpegts @ 0x17f9120] first_dts 2420443943 not matching first dts 2420586503 in que 
    Last message repeated 3 times
[mpegts @ 0x17f9120] Could not find codec parameters (Unknown: none ([5][0][0][0] / 0x0005))
[mpegts @ 0x17f9120] Could not find codec parameters (Unknown: none ([11][0][0][0] / 0x000B))
[mpegts @ 0x17f9120] Could not find codec parameters (Unknown: none ([12][0][0][0] / 0x000C))
[mpegts @ 0x17f9120] Could not find codec parameters (Unknown: none ([128][0][0][0] / 0x0080))
    Last message repeated 1 times
[NULL @ 0x182d2c0] start time is not set in estimate_timings_from_pts
[NULL @ 0x1833640] start time is not set in estimate_timings_from_pts
[NULL @ 0x18399c0] start time is not set in estimate_timings_from_pts
[NULL @ 0x183fd40] start time is not set in estimate_timings_from_pts
[NULL @ 0x18460c0] start time is not set in estimate_timings_from_pts
[NULL @ 0x184c480] start time is not set in estimate_timings_from_pts
[mpegts @ 0x17f9120] PES packet size mismatch
[mpegts @ 0x17f9120] File position after avformat_find_stream_info() is 0
Input #0, mpegts, from './sample.ts':
  Duration: 00:00:02.15, start: 26893.821589, bitrate: 3897 kb/s
  Program 257 
    Metadata:
      service_name    : France 2
      service_provider: GR1 
  Program 260 
    Metadata:
      service_name    : France 5
      service_provider: GR1 
  Program 261 
    Metadata:
      service_name    : ?France Ô
      service_provider: GR1 
    Stream #0:0[0x208], 44, 1/90000: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p, 544x576 [SAR 32:17 DAR 16:9], 1/50, 15000 kb/s, 28.38 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x212](fra), 72, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16, 192 kb/s
    Stream #0:2[0x21c](fra), 0, 1/90000: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) (hearing impaired)
    Stream #0:3[0x23a], 0, 1/90000: Unknown: none ([5][0][0][0] / 0x0005)
    Stream #0:4[0x23b], 0, 1/90000: Unknown: none ([11][0][0][0] / 0x000B)
    Stream #0:5[0x23c], 0, 1/90000: Unknown: none ([12][0][0][0] / 0x000C)
    Stream #0:6[0x23d], 0, 1/90000: Unknown: none ([128][0][0][0] / 0x0080)
    Stream #0:7[0x23e], 0, 1/90000: Unknown: none ([128][0][0][0] / 0x0080)
  Program 262
    Metadata:
      service_name    : LCP
      service_provider: GR1
  Program 273
    Metadata:
      service_name    : France 3
      service_provider: GR1
  Program 511
[asyncts @ 0x1850f80] Setting entry with key 'compensate' to value '1'
[abuffer source @ 0x186eac0] Setting entry with key 'time_base' to value '1/90000'
[abuffer source @ 0x186eac0] Setting entry with key 'sample_rate' to value '48000'
[abuffer source @ 0x186eac0] Setting entry with key 'sample_fmt' to value 's16'
[abuffer source @ 0x186eac0] Setting entry with key 'channel_layout' to value '0x3'
[abuffer @ 0x186f020] tb:1/90000 samplefmt:s16 samplerate: 48000 ch layout:0x3
[aformat @ 0x186f7e0] Setting entry with key 'sample_fmts' to value 's16'
[AVAudioResampleContext @ 0x17fbee0] Using s16p as internal sample format
[AVAudioResampleContext @ 0x17fbee0] audio_convert: found function: s16  to s16p (C)
[AVAudioResampleContext @ 0x17fbee0] audio_convert: found function: s16p to s16  (C)
[AVAudioResampleContext @ 0x17fbee0] resample: s16p from 48000 Hz to 48000 Hz
Output #0, wav, to 'out.wav':
  Metadata:
    encoder         : Lavf54.9.100
    Stream #0:0(fra), 0, 1/48000: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (mp2 -> pcm_s16le)
Press [q] to stop, [?] for help
Error in av_buffersink_get_buffer_ref(): Invalid argument
[Parsed_asyncts_0 @ 0x186b020] Compensating -9 samples per second.
[Parsed_asyncts_0 @ 0x186b020] Compensating 0 samples per second.
    Last message repeated 3 times
[mpegts @ 0x17f9120] first_dts 2420443943 not matching first dts 2420456903 in que
    Last message repeated 4 times
[Parsed_asyncts_0 @ 0x186b020] Compensating 0 samples per second.
    Last message repeated 5 times
[mpegts @ 0x17f9120] first_dts 2420443943 not matching first dts 2420469863 in que
    Last message repeated 4 times
[Parsed_asyncts_0 @ 0x186b020] Compensating 0 samples per second.
    Last message repeated 5 times
[mpegts @ 0x17f9120] first_dts 2420443943 not matching first dts 2420482823 in que
    Last message repeated 4 times
[Parsed_asyncts_0 @ 0x186b020] Compensating 0 samples per second.
    Last message repeated 5 times
[mpegts @ 0x17f9120] first_dts 2420443943 not matching first dts 2420495783 in que
    Last message repeated 4 times
[Parsed_asyncts_0 @ 0x186b020] Compensating 0 samples per second.
    Last message repeated 5 times
[mpegts @ 0x17f9120] first_dts 2420443943 not matching first dts 2420508743 in que
    Last message repeated 4 times
[Parsed_asyncts_0 @ 0x186b020] Compensating 0 samples per second.
    Last message repeated 5 times
[mpegts @ 0x17f9120] first_dts 2420443943 not matching first dts 2420521703 in que
    Last message repeated 4 times
[Parsed_asyncts_0 @ 0x186b020] Compensating 0 samples per second.
    Last message repeated 5 times
[mpegts @ 0x17f9120] first_dts 2420443943 not matching first dts 2420534663 in que
    Last message repeated 4 times
[Parsed_asyncts_0 @ 0x186b020] Compensating 0 samples per second.
    Last message repeated 5 times
[mpegts @ 0x17f9120] first_dts 2420443943 not matching first dts 2420547623 in que
    Last message repeated 4 times
[Parsed_asyncts_0 @ 0x186b020] Compensating 0 samples per second.
    Last message repeated 5 times
[mpegts @ 0x17f9120] first_dts 2420443943 not matching first dts 2420560583 in que
    Last message repeated 4 times
[Parsed_asyncts_0 @ 0x186b020] Compensating 0 samples per second.
    Last message repeated 5 times
[mpegts @ 0x17f9120] first_dts 2420443943 not matching first dts 2420573543 in que
    Last message repeated 4 times
[Parsed_asyncts_0 @ 0x186b020] Compensating 0 samples per second.
    Last message repeated 5 times
[mpegts @ 0x17f9120] PES packet size mismatch
[mpegts @ 0x17f9120] first_dts 2420443943 not matching first dts 2420586503 in que
    Last message repeated 3 times
[Parsed_asyncts_0 @ 0x186b020] Compensating 0 samples per second.
    Last message repeated 4 times
[mp2 @ 0x1826f40] incomplete frame
Error while decoding stream #0:1: Invalid data found when processing input
No more inputs to read from, finishing.
Last edited 12 years ago by Florian Vallee (previous) (diff)

comment:8 by Michael Niedermayer, 12 years ago

instead of asyncts you can also use aresample

comment:9 by Peter B., 12 years ago

I'm experiencing the same issue with current git head (N-43520-gd8c3170).
Input is a raw DV stream with 2 audio channels (32kHz PCM).

Uncut commandline and console output:

ffmpeg -i input.dv -vcodec copy -acodec pcm_s16le -filter_complex "asyncts=compensate=1" output.avi
ffmpeg version N-43520-gd8c3170 Copyright (c) 2000-2012 the FFmpeg developers
  built on Aug 13 2012 15:48:58 with gcc 4.4.5 (Debian 4.4.5-8)
  configuration: --prefix=/usr/local --enable-gpl --enable-nonfree --enable-version3 --enable-postproc --enable-swscale --enable-avfilter --enable-pthreads --enable-bzlib --enable-libmp3lame --enable-libvorbis --enable-libxvid --enable-zlib --enable-libopenjpeg --enable-decoder=png --enable-encoder=png --enable-libfreetype --enable-avresample --enable-libschroedinger
  libavutil      51. 69.100 / 51. 69.100
  libavcodec     54. 52.100 / 54. 52.100
  libavformat    54. 23.100 / 54. 23.100
  libavdevice    54.  2.100 / 54.  2.100
  libavfilter     3.  9.100 /  3.  9.100
  libswscale      2.  1.101 /  2.  1.101
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
[dv @ 0x9ab7500] Estimating duration from bitrate, this may be inaccurate
Guessed Channel Layout for  Input Stream #0.1 : stereo
Guessed Channel Layout for  Input Stream #0.2 : stereo
Input #0, dv, from 'input.dv':
  Metadata:
    timecode        : 00:00:00:00
  Duration: 00:04:00.00, start: 0.000000, bitrate: 28800 kb/s
    Stream #0:0: Video: dvvideo, yuv420p, 720x576 [SAR 16:15 DAR 4:3], 28800 kb/s, 25 tbr, 25 tbn, 25 tbc
    Stream #0:1: Audio: pcm_s16le, 32000 Hz, stereo, s16, 1024 kb/s
    Stream #0:2: Audio: pcm_s16le, 32000 Hz, stereo, s16, 1024 kb/s
File 'output.avi' already exists. Overwrite ? [y/N] y
Output #0, avi, to 'output.avi':
  Metadata:
    ISMP            : 00:00:00:00
    ISFT            : Lavf54.23.100
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 32000 Hz, stereo, s16, 1024 kb/s
    Stream #0:1: Video: dvvideo (dvsd / 0x64737664), yuv420p, 720x576 [SAR 16:15 DAR 4:3], q=2-31, 28800 kb/s, 25 tbn, 25 tbc
Stream mapping:
  Stream #0:1 (pcm_s16le) -> asyncts
  asyncts -> Stream #0:0 (pcm_s16le)
  Stream #0:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 1712 fps=238 q=-1.0 size=  248478kB time=00:01:08.27 bitrate=29811.9kbits/s

Which is then followed by a waterfall of lines like this:

[avi @ 0x9ab1960] Audio timestamp 7644097 < 7653394 invalid, cliping
[avi @ 0x9ab1960] Audio timestamp 7644097 < 7653395 invalid, cliping
[avi @ 0x9ab1960] Audio timestamp 7644097 < 7653396 invalid, cliping
[avi @ 0x9ab1960] Audio timestamp 7644097 < 7653397 invalid, cliping
[avi @ 0x9ab1960] Audio timestamp 7644097 < 7653398 invalid, cliping
[avi @ 0x9ab1960] Audio timestamp 7644097 < 7653399 invalid, cliping
[avi @ 0x9ab1960] Audio timestamp 7644097 < 7653400 invalid, cliping
[avi @ 0x9ab1960] Audio timestamp 7644097 < 7653401 invalid, cliping
[avi @ 0x9ab1960] Audio timestamp 7644097 < 7653402 invalid, cliping
[...]

Until aborted with Ctrl+C.

in reply to:  7 comment:10 by Carl Eugen Hoyos, 11 years ago

Keywords: libfaac removed
Resolution: fixed
Status: newclosed

Replying to ey3ball:

Command line :

ffmpeg -v debug -i ./sample.ts -vn -af asyncts=compensate=1 -acodec pcm_s16le -sn -y out.wav

The problem is fixed in current git head (and 1.0).

Please note that asyncts is a deprecated filter, aresample is recommended instead.

Note: See TracTickets for help on using tickets.