[FFmpeg-trac] #933(undetermined:reopened): A/V desynch when transcoding A/V files with timestamps non starting from 0 with -copyts
FFmpeg
trac at avcodec.org
Wed Nov 21 20:42:55 CET 2012
#933: A/V desynch when transcoding A/V files with timestamps non starting from 0
with -copyts
-------------------------------------+-------------------------------------
Reporter: saste | Owner:
Type: defect | Status: reopened
Priority: normal | Component:
Version: git-master | undetermined
Keywords: timestamp | Resolution:
desynch mpegts | Blocked By:
Blocking: | Reproduced by developer: 1
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Changes (by saste):
* status: closed => reopened
* resolution: worksforme =>
Comment:
Command:
{{{
ffmpeg -copyts -i ~/s/columbia-intro.ts -acodec libfaac -y columbia-
intro.out.ts
ffmpeg version N-46969-g64dc383 Copyright (c) 2000-2012 the FFmpeg
developers
built on Nov 21 2012 20:32:53 with gcc 4.6 (Ubuntu/Linaro
4.6.3-1ubuntu5)
configuration: --enable-pic --enable-fontconfig --enable-libschroedinger
--enable-libass --enable-version3 --prefix=/home/stefano --enable-librtmp
--enable-libx264 --enable-libfaac --disable-shared --enable-static
--enable-debug=3 --enable-pthreads --enable-libvorbis --enable-gpl
--enable-nonfree --enable-libmp3lame --enable-libtheora --enable-gpl
--enable-x11grab --enable-frei0r --enable-libspeex --enable-libcaca
--enable-libflite --enable-libfreetype --enable-libopencv --enable-
libopencore-amrnb --enable-libopencore-amrnb --disable-optimizations
--disable-mmx
libavutil 52. 8.100 / 52. 8.100
libavcodec 54. 74.100 / 54. 74.100
libavformat 54. 37.100 / 54. 37.100
libavdevice 54. 3.100 / 54. 3.100
libavfilter 3. 23.101 / 3. 23.101
libswscale 2. 1.102 / 2. 1.102
libswresample 0. 17.101 / 0. 17.101
libpostproc 52. 2.100 / 52. 2.100
[mpegts @ 0x1ba1950] max_analyze_duration 5000000 reached at 5000000
Input #0, mpegts, from '/home/stefano/s/columbia-intro.ts':
Duration: 00:00:08.03, start: 12.928000, bitrate: 1005 kb/s
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B),
yuv420p, 720x576 [SAR 64:45 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x101]: Audio: aac ([15][0][0][0] / 0x000F), 48000 Hz,
5.1, s16, 176 kb/s
Stream #0:2[0x102]: Audio: aac ([15][0][0][0] / 0x000F), 48000 Hz,
5.1, s16, 12 kb/s
Output #0, mpegts, to 'columbia-intro.out.ts':
Metadata:
encoder : Lavf54.37.100
Stream #0:0: Video: mpeg2video, yuv420p, 720x576 [SAR 64:45 DAR 16:9],
q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream #0:1: Audio: aac, 48000 Hz, 5.1, s16, 128 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (h264 -> mpeg2video)
Stream #0:1 -> #0:1 (aac -> libfaac)
Press [q] to stop, [?] for help
frame= 525 fps= 55 q=31.0 Lsize= 1545kB time=00:00:20.96 bitrate=
604.0kbits/s dup=325 drop=0
video:1172kB audio:188kB subtitle:0 global headers:0kB muxing overhead
13.591660%
}}}
Now if you ffprobe the file with;
{{{
ffprobe columbia-intro.out.ts -show_packets -of compact | less
}}}
you see there are a lot of video packets at the beginning, and the first
audio packet is in:
{{{
packet|codec_type=audio|stream_index=1|pts=1287600|pts_time=14.306667|dts=1287600|dts_time=14.306667|duration=N/A|duration_time=N/A|convergence_duration=N/A|convergence_duration_time=N/A|size=448|pos=910108|flags=K
}}}
The file is now playable with ffplay (I remember it wasnt'), but if you
ffprobe the file you get:
{{{
ffprobe columbia-intro.out.ts
ffprobe version N-46969-g64dc383 Copyright (c) 2007-2012 the FFmpeg
developers
built on Nov 21 2012 20:32:53 with gcc 4.6 (Ubuntu/Linaro
4.6.3-1ubuntu5)
configuration: --enable-pic --enable-fontconfig --enable-libschroedinger
--enable-libass --enable-version3 --prefix=/home/stefano --enable-librtmp
--enable-libx264 --enable-libfaac --disable-shared --enable-static
--enable-debug=3 --enable-pthreads --enable-libvorbis --enable-gpl
--enable-nonfree --enable-libmp3lame --enable-libtheora --enable-gpl
--enable-x11grab --enable-frei0r --enable-libspeex --enable-libcaca
--enable-libflite --enable-libfreetype --enable-libopencv --enable-
libopencore-amrnb --enable-libopencore-amrnb --disable-optimizations
--disable-mmx
libavutil 52. 8.100 / 52. 8.100
libavcodec 54. 74.100 / 54. 74.100
libavformat 54. 37.100 / 54. 37.100
libavdevice 54. 3.100 / 54. 3.100
libavfilter 3. 23.101 / 3. 23.101
libswscale 2. 1.102 / 2. 1.102
libswresample 0. 17.101 / 0. 17.101
libpostproc 52. 2.100 / 52. 2.100
[mpegts @ 0x34fe270] max_analyze_duration 5000000 reached at 5000000
[mpegts @ 0x34fe270] Could not find codec parameters for stream 1 (Audio:
aac ([15][0][0][0] / 0x000F), 0 channels, s16): unspecified sample rate
Consider increasing the value for the 'analyzeduration' and 'probesize'
options
[NULL @ 0x35027e0] start time is not set in estimate_timings_from_pts
Input #0, mpegts, from 'columbia-intro.out.ts':
Duration: 00:00:20.96, start: 1.400000, bitrate: 604 kb/s
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002),
yuv420p, 720x576 [SAR 64:45 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x101]: Audio: aac ([15][0][0][0] / 0x000F), 0 channels,
s16
}}}
so the problem is still there.
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/933#comment:9>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list