[FFmpeg-user] ffmpeg convert to wrong duration using dvd2concat
Etienne Desautels
etienne.desautels at gmail.com
Wed Jan 27 22:10:14 CET 2016
On 2016-01-27, at 14:02, Nicolas George wrote:
> I suggest you look in the concat file to see the size, offset and
> theoretical duration of each if these chapter, extract the corresponding
> segment (using plain file manipulation tools, not multimedia tools) into a
> separate file (one per chapter) and see what it contains and if it match the
> duration.
OK, I split the file in two (using dd) following the size and offset shown in the concat file. I then play them in VLC without problem and they have the correct duration. I also passed them to ffmpeg. Duration is correct but I have a video error with the second segment and audio error for both. Here's the output for each file:
ffmpeg -i seg1.mpg -f null /dev/null ffmpeg version N-75845-g079d553 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.4.3 (Ubuntu 4.4.3-4ubuntu5.1)
configuration: --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree
libavutil 55. 2.100 / 55. 2.100
libavcodec 57. 4.100 / 57. 4.100
libavformat 57. 3.100 / 57. 3.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 10.100 / 6. 10.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.100 / 2. 0.100
libpostproc 54. 0.100 / 54. 0.100
Input #0, mpeg, from 'seg1.mpg':
Duration: 00:04:57.54, start: 0.228411, bitrate: 8412 kb/s
Stream #0:0[0x1bf]: Data: dvd_nav_packet
Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv), 720x480 [SAR 8:9 DAR 4:3], 8000 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0:2[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 256 kb/s
Output #0, null, to '/dev/null':
Metadata:
encoder : Lavf57.3.100
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 720x480 [SAR 8:9 DAR 4:3], q=2-31, 200 kb/s, 29.97 fps, 29.97 tbn, 29.97 tbc
Metadata:
encoder : Lavc57.4.100 rawvideo
Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Metadata:
encoder : Lavc57.4.100 pcm_s16le
Stream mapping:
Stream #0:1 -> #0:0 (mpeg2video (native) -> rawvideo (native))
Stream #0:2 -> #0:1 (ac3 (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
[null @ 0x2ccb0c0] Encoder did not produce proper pts, making some up.
[ac3 @ 0x2cdc9a0] incomplete frame/A time=00:04:42.48 bitrate=N/A
frame= 8923 fps=1303 q=-0.0 Lsize=N/A time=00:04:57.73 bitrate=N/A
video:837kB audio:55794kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
ffmpeg -i seg2.mpg -f null /dev/null
ffmpeg version N-75845-g079d553 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.4.3 (Ubuntu 4.4.3-4ubuntu5.1)
configuration: --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree
libavutil 55. 2.100 / 55. 2.100
libavcodec 57. 4.100 / 57. 4.100
libavformat 57. 3.100 / 57. 3.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 10.100 / 6. 10.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.100 / 2. 0.100
libpostproc 54. 0.100 / 54. 0.100
Input #0, mpeg, from 'seg2.mpg':
Duration: 00:04:57.57, start: 297.796411, bitrate: 8405 kb/s
Stream #0:0[0x1bf]: Data: dvd_nav_packet
Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv), 720x480 [SAR 8:9 DAR 4:3], 8000 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0:2[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 256 kb/s
Output #0, null, to '/dev/null':
Metadata:
encoder : Lavf57.3.100
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 720x480 [SAR 8:9 DAR 4:3], q=2-31, 200 kb/s, 29.97 fps, 29.97 tbn, 29.97 tbc
Metadata:
encoder : Lavc57.4.100 rawvideo
Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Metadata:
encoder : Lavc57.4.100 pcm_s16le
Stream mapping:
Stream #0:1 -> #0:0 (mpeg2video (native) -> rawvideo (native))
Stream #0:2 -> #0:1 (ac3 (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
[ac3 @ 0x2df30c0] frame sync error
Error while decoding stream #0:2: Invalid data found when processing input
[null @ 0x2df9620] Application provided invalid, non monotonically increasing dts to muxer in stream 1: 3072 >= 3072
frame= 8912 fps=1324 q=-0.0 Lsize=N/A time=00:04:57.60 bitrate=N/A
video:836kB audio:55800kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Is this giving you any clues?
Regards,
Etienne Desautels
More information about the ffmpeg-user
mailing list