[FFmpeg-trac] #6263(undetermined:new): MPEG TS: A/V async issue when remuxing. Plays fine in MPV
FFmpeg
trac at avcodec.org
Sat Mar 25 00:34:10 EET 2017
#6263: MPEG TS: A/V async issue when remuxing. Plays fine in MPV
-------------------------------------+-------------------------------------
Reporter: peter_b | Type: defect
Status: new | Priority: normal
Component: | Version:
undetermined | unspecified
Keywords: mpegts | Blocked By:
async vsync | Reproduced by developer: 0
Blocking: |
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug:
I have off-the-air recordings: H.264/AAC in an MPEG-TS (.ts) file.
For archiving, I uncompress the audio to pcm_s16le, and the container to
MKV.
I have a file where audio/video goes completely out of sync after a
certain position in the video.
I've isolated the culprit part of the video using "dd".
I've tried the following commands:
{{{
$FFMPEG -i $IN -c copy ${OUT}-copy.ts
$FFMPEG -i $IN -c copy -vsync passthrough ${OUT}-vsync_pass.ts
$FFMPEG -i $IN -c copy -vsync cfr ${OUT}-vsync_cfr.ts
$FFMPEG -i $IN -c copy -vsync vfr ${OUT}-vsync_vfr.ts
$FFMPEG -i $IN -c copy -vsync drop ${OUT}-vsync_drop.ts
$FFMPEG -i $IN -c:v copy -c:a pcm_s16le ${OUT}-pcm_s16le.ts
$FFMPEG -i $IN -c:v copy -c:a pcm_s16le -af "aresample=async=1000"
${OUT}-aresample.mkv
}}}
None of them produce a clean output :(
The commercial clip starting at offset 26s seems to be defect.
The file plays fine in [http://mpv.io/ MPV Media Player], so I guess there
must be a way to fix the timestamps somehow?
Here's the complete, uncut (*) console output from the first of the above
commands I've tried:
{{{
$ ffmpeg -i nd_vs_v-cut2.ts -c copy out.ts
}}}
(*) I've removed a long number of repeating "decode_slice_header error"
messages, since they were identical to the first one.
{{{
ffmpeg version N-84661-g66c1c9b Copyright (c) 2000-2017 the FFmpeg
developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
configuration: --prefix=/usr/local --enable-gpl --enable-nonfree
--enable-version3 --enable-postproc --enable-swscale --enable-avfilter
--enable-pthreads --enable-bzlib --enable-zlib --enable-decoder=png
--enable-encoder=png --samples=../fate-suite --enable-libfreetype
--enable-libschroedinger --enable-libopenjpeg --disable-decoder=jpeg2000
--enable-libvpx --enable-libvorbis --enable-libx264
libavutil 55. 51.100 / 55. 51.100
libavcodec 57. 86.103 / 57. 86.103
libavformat 57. 67.100 / 57. 67.100
libavdevice 57. 3.101 / 57. 3.101
libavfilter 6. 78.100 / 6. 78.100
libswscale 4. 3.101 / 4. 3.101
libswresample 2. 4.100 / 2. 4.100
libpostproc 54. 2.100 / 54. 2.100
[h264 @ 0x3f6e040] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3f6e040] decode_slice_header error
[h264 @ 0x3f6e040] no frame!
[h264 @ 0x3f6e040] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x3f6e040] decode_slice_header error
[h264 @ 0x3f6e040] no frame!
[h264 @ 0x3f6e040] non-existing PPS 0 referenced
...
...
...
Input #0, mpegts, from 'nd_vs_v-cut2.ts':
Duration: 00:03:18.03, start: 434.773333, bitrate: 1440 kb/s
Program 1
Stream #0:0[0x101]: Audio: aac (HE-AAC) ([15][0][0][0] / 0x000F),
48000 Hz, stereo, fltp, 59 kb/s
Stream #0:1[0x102]: Video: h264 (High) ([27][0][0][0] / 0x001B),
yuv420p(progressive), 1280x720, 30 fps, 29.97 tbr, 90k tbn, 60 tbc
Stream #0:2[0x103]: Data: timed_id3 (ID3 / 0x20334449)
Output #0, mpegts, to 'out/out.ts':
Metadata:
encoder : Lavf57.67.100
Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B),
yuv420p(progressive), 1280x720, q=2-31, 30 fps, 29.97 tbr, 90k tbn, 90k
tbc
Stream #0:1: Audio: aac (HE-AAC) ([15][0][0][0] / 0x000F), 48000 Hz,
stereo, fltp, 59 kb/s
Stream mapping:
Stream #0:1 -> #0:0 (copy)
Stream #0:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
[mpegts @ 0x3f68360] DTS 8589934592 < 8590832488 out of
orderitrate=4346.8kbits/s speed=30.8x
[mpegts @ 0x3f68360] DTS 55209870 < 8592634286 out of order9
bitrate=2633.7kbits/s speed=46.9x
frame= 2589 fps=1058 q=-1.0 Lsize= 35793kB time=00:01:37.25
bitrate=3014.9kbits/s speed=39.7x
video:32062kB audio:838kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: 8.791791%
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/6263>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list