[FFmpeg-trac] #1180(undetermined:new): video cutting/extraction leads to various a/v sync (when possible)
FFmpeg
trac at avcodec.org
Mon Apr 9 18:05:01 CEST 2012
#1180: video cutting/extraction leads to various a/v sync (when possible)
-------------------------------------+-------------------------------------
Reporter: ubitux | Owner:
Type: defect | Status: new
Priority: normal | Component:
Version: | undetermined
unspecified | Keywords:
Blocked By: | Blocking:
Reproduced by developer: 0 | Analyzed by developer: 0
-------------------------------------+-------------------------------------
Using a random AVI (http://samples.ffmpeg.org/avi/GoneNutty.avi) and
trying to extract a scene leads to various a/v sync issues:
{{{
% ./ffmpeg -i ~/samples/GoneNutty.avi -ss 120 -c copy -y cut.avi
ffmpeg version N-39647-g1d13032 Copyright (c) 2000-2012 the FFmpeg
developers
built on Apr 9 2012 17:52:37 with gcc 4.7.0 20120324 (prerelease)
configuration: --enable-libfreetype --enable-gpl --enable-libmp3lame
--enable-libvorbis --enable-libxvid --enable-libx264 --enable-libvpx
--enable-libtheora --enable-x11grab --enable-libopenjpeg --enable-libass
--enable-libmodplug
libavutil 51. 45.100 / 51. 45.100
libavcodec 54. 14.100 / 54. 14.100
libavformat 54. 3.100 / 54. 3.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 67.101 / 2. 67.101
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 10.100 / 0. 10.100
libpostproc 52. 0.100 / 52. 0.100
[mpeg4 @ 0x1aed720] Invalid and inefficient vfw-avi packed B frames
detected
Input #0, avi, from '/home/ubitux/samples/GoneNutty.avi':
Metadata:
encoder : Nandub v1.0rc2
Duration: 00:04:38.84, start: 0.000000, bitrate: 1345 kb/s
Stream #0:0: Video: mpeg4 (DX50 / 0x30355844), yuv420p, 640x352 [SAR
1:1 DAR 20:11], 25 fps, 25 tbr, 25 tbn, 30k tbc
Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, s16,
192 kb/s
Output #0, avi, to 'cut.avi':
Metadata:
ISFT : Lavf54.3.100
Stream #0:0: Video: mpeg4 (DX50 / 0x30355844), yuv420p, 640x352 [SAR
1:1 DAR 20:11], q=2-31, 25 fps, 25 tbn, 25 tbc
Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, 192
kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 3879 fps=0.0 q=-1.0 Lsize= 23751kB time=00:02:38.84
bitrate=1224.9kbits/s
video:19808kB audio:3723kB global headers:0kB muxing overhead 0.935748%
}}}
Playback results with different players:
- ffplay: invalid frame rate, playback mostly broken
- MPlayer: no video is displayed for a few seconds, and then video starts
(with -correct-pts the video is freezed for a while)
- VLC: samples rate seems insanely high, no video at first, then the video
starts, and sounds is still way too fast
- mplayer2: seems to actually deal with it pretty well
Even though mplayer2 seems to handle it, I believe the file is broken and
something should be fixed.
Note: specifying -ss before the input doesn't work:
{{{
./ffmpeg -ss 120 -i ~/samples/GoneNutty.avi -c copy -y cut2.avi
ffmpeg version N-39647-g1d13032 Copyright (c) 2000-2012 the FFmpeg
developers
built on Apr 9 2012 17:52:37 with gcc 4.7.0 20120324 (prerelease)
configuration: --enable-libfreetype --enable-gpl --enable-libmp3lame
--enable-libvorbis --enable-libxvid --enable-libx264 --enable-libvpx
--enable-libtheora --enable-x11grab --enable-libopenjpeg --enable-libass
--enable-libmodplug
libavutil 51. 45.100 / 51. 45.100
libavcodec 54. 14.100 / 54. 14.100
libavformat 54. 3.100 / 54. 3.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 67.101 / 2. 67.101
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 10.100 / 0. 10.100
libpostproc 52. 0.100 / 52. 0.100
[mpeg4 @ 0x2857720] Invalid and inefficient vfw-avi packed B frames
detected
Input #0, avi, from '/home/ubitux/samples/GoneNutty.avi':
Metadata:
encoder : Nandub v1.0rc2
Duration: 00:04:38.84, start: 0.000000, bitrate: 1345 kb/s
Stream #0:0: Video: mpeg4 (DX50 / 0x30355844), yuv420p, 640x352 [SAR
1:1 DAR 20:11], 25 fps, 25 tbr, 25 tbn, 30k tbc
Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, s16,
192 kb/s
Output #0, avi, to 'cut2.avi':
Metadata:
ISFT : Lavf54.3.100
Stream #0:0: Video: mpeg4 (DX50 / 0x30355844), yuv420p, 640x352 [SAR
1:1 DAR 20:11], q=2-31, 25 fps, 25 tbn, 25 tbc
Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, 192
kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[avi @ 0x2858fe0] Application provided invalid, non monotonically
increasing dts to muxer in stream 1: -14 >= -14
av_interleaved_write_frame(): Invalid argument
}}}
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1180>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list