[FFmpeg-user] Can't copy ripped DVD stream due to timestamp issues

Alex initrd.gz at gmail.com
Wed Jun 27 04:50:20 EEST 2018


I'm trying to concatenate several VOB files that I ripped from a DVD I
bought, but FFMPEG refuses to do stream copying on them, even without
concatenation.

The basic command I'm trying, with output, is:

> ffmpeg -y -i VTS_01_1.VOB -c copy VTS_01_1.mkv
ffmpeg version 4.0.1 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 8.1.1 (GCC) 20180531
  configuration: --prefix=/usr --disable-debug --disable-static
--disable-stripping --enable-avresample --enable-fontconfig
--enable-gmp --enable-gnutls --enable-gpl --enable-ladspa
--enable-libass --enable-libbluray --enable-libdrm
--enable-libfreetype --enable-libfribidi --enable-libgsm
--enable-libiec61883 --enable-libmodplug --enable-libmp3lame
--enable-libopencore_amrnb --enable-libopencore_amrwb
--enable-libopenjpeg --enable-libopus --enable-libpulse
--enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora
--enable-libv4l2 --enable-libvidstab --enable-libvorbis
--enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvenc
--enable-omx --enable-shared --enable-version3
  libavutil      56. 14.100 / 56. 14.100
  libavcodec     58. 18.100 / 58. 18.100
  libavformat    58. 12.100 / 58. 12.100
  libavdevice    58.  3.100 / 58.  3.100
  libavfilter     7. 16.100 /  7. 16.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  1.100 /  5.  1.100
  libswresample   3.  1.100 /  3.  1.100
  libpostproc    55.  1.100 / 55.  1.100
Input #0, mpeg, from 'VTS_01_1.VOB':
  Duration: 00:05:05.91, start: 0.280633, bitrate: 28072 kb/s
    Stream #0:0[0x1bf]: Data: dvd_nav_packet
    Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, top
first), 720x480 [SAR 8:9 DAR 4:3], 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, matroska, to 'VTS_01_1.mkv':
  Metadata:
    encoder         : Lavf58.12.100
    Stream #0:0: Video: mpeg2video (Main) (mpg2 / 0x3267706D),
yuv420p(tv, top first), 720x480 [SAR 8:9 DAR 4:3], q=2-31, 29.97 fps,
29.97 tbr, 1k tbn, 90k tbc
    Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo,
fltp, 256 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (copy)
  Stream #0:2 -> #0:1 (copy)
Press [q] to stop, [?] for help
[matroska @ 0x55970f3fddc0] Timestamps are unset in a packet for
stream 0. This is deprecated and will stop working in the future. Fix
your code to set the timestamps properly
[matroska @ 0x55970f3fddc0] Non-monotonous DTS in output stream 0:0;
previous: 63564, current: 63533; changing to 63564. This may result in
incorrect timestamps in the output file.
[matroska @ 0x55970f3fddc0] Can't write packet with unknown timestamp
av_interleaved_write_frame(): Invalid argument
[matroska @ 0x55970f3fddc0] Can't write packet with unknown timestamp
Error writing trailer of VTS_01_1.mkv: Invalid argument
frame= 1914 fps=0.0 q=-1.0 Lsize=   42043kB time=00:01:03.73
bitrate=5404.0kbits/s speed= 220x
video:40043kB audio:1987kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: 0.032562%
Conversion failed!

I did some searching around on how to nuke the timestamps from orbit,
but I can't find how to really do it. I've tried combinations of `-r
29.97`, `-vsync drop`, and `-fflags +genpts`:

> ffmpeg -y -r 29.97 -vsync drop -fflags +genpts -i VTS_01_1.VOB -c copy VTS_01_1.mkv
ffmpeg version 4.0.1 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 8.1.1 (GCC) 20180531
  configuration: --prefix=/usr --disable-debug --disable-static
--disable-stripping --enable-avresample --enable-fontconfig
--enable-gmp --enable-gnutls --enable-gpl --enable-ladspa
--enable-libass --enable-libbluray --enable-libdrm
--enable-libfreetype --enable-libfribidi --enable-libgsm
--enable-libiec61883 --enable-libmodplug --enable-libmp3lame
--enable-libopencore_amrnb --enable-libopencore_amrwb
--enable-libopenjpeg --enable-libopus --enable-libpulse
--enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora
--enable-libv4l2 --enable-libvidstab --enable-libvorbis
--enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvenc
--enable-omx --enable-shared --enable-version3
  libavutil      56. 14.100 / 56. 14.100
  libavcodec     58. 18.100 / 58. 18.100
  libavformat    58. 12.100 / 58. 12.100
  libavdevice    58.  3.100 / 58.  3.100
  libavfilter     7. 16.100 /  7. 16.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  1.100 /  5.  1.100
  libswresample   3.  1.100 /  3.  1.100
  libpostproc    55.  1.100 / 55.  1.100
Input #0, mpeg, from 'VTS_01_1.VOB':
  Duration: 00:05:05.91, start: 0.280633, bitrate: 28072 kb/s
    Stream #0:0[0x1bf]: Data: dvd_nav_packet
    Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, top
first), 720x480 [SAR 8:9 DAR 4:3], 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, matroska, to 'VTS_01_1.mkv':
  Metadata:
    encoder         : Lavf58.12.100
    Stream #0:0: Video: mpeg2video (Main) (mpg2 / 0x3267706D),
yuv420p(tv, top first), 720x480 [SAR 8:9 DAR 4:3], q=2-31, 29.97 fps,
29.97 tbr, 1k tbn, 29.97 tbc
    Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo,
fltp, 256 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (copy)
  Stream #0:2 -> #0:1 (copy)
Press [q] to stop, [?] for help
[matroska @ 0x565112939d00] Timestamps are unset in a packet for
stream 0. This is deprecated and will stop working in the future. Fix
your code to set the timestamps properly
av_interleaved_write_frame(): Invalid argument
frame=    1 fps=0.0 q=-1.0 Lsize=       1kB time=00:00:00.00
bitrate=N/A speed=   0x
video:52kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: unknown
Conversion failed!

Is there a way that I can concatenate these videos, even if I have to
recompute the timestamps?

-- 
Sincerely,
Alex Parrill


More information about the ffmpeg-user mailing list