[FFmpeg-user] pts/dts error using reset_timestamps while splitting a DVD

Owen Jones riots6 at gmail.com
Sat Jan 19 09:58:27 CET 2013


I am trying to split an mpeg2 video from a DVD. First I just copy the video to disk which seems to work fine:

beefy:VIDEO_TS riots$ ffmpeg -i VTS_01_1.VOB -segment_format mpeg -acodec copy -vcodec copy ~/Desktop/temp.mov
ffmpeg version 1.1 Copyright (c) 2000-2013 the FFmpeg developers
  built on Jan  8 2013 10:22:35 with Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)
  configuration: --enable-nonfree --enable-gpl --enable-version3 --enable-postproc --enable-swscale --enable-avfilter --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libfaac --enable-libxvid --enable-libx264 --enable-libvpx --enable-hardcoded-tables --enable-shared --enable-pthreads --disable-indevs --cc=clang
  libavutil      52. 13.100 / 52. 13.100
  libavcodec     54. 86.100 / 54. 86.100
  libavformat    54. 59.106 / 54. 59.106
  libavdevice    54.  3.102 / 54.  3.102
  libavfilter     3. 32.100 /  3. 32.100
  libswscale      2.  1.103 /  2.  1.103
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[mpeg @ 0x7fa00b006600] max_analyze_duration 5000000 reached at 5000000
Input #0, mpeg, from 'VTS_01_1.VOB':
  Duration: 00:00:10.60, start: 0.235211, bitrate: 803800 kb/s
    Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x576 [SAR 16:15 DAR 4:3], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 256 kb/s
[mov @ 0x7fa00b02f200] track 1: codec frame size is not set
Output #0, mov, to '/Volumes/Beefy HD2/Users/riots/Desktop/temp.mov':
  Metadata:
    encoder         : Lavf54.59.106
    Stream #0:0: Video: mpeg2video (m2v1 / 0x3176326D), yuv420p, 720x576 [SAR 16:15 DAR 4:3], q=2-31, 25 fps, 90k tbn, 90k tbc
    Stream #0:1: Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, stereo, 256 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=47061 fps=258 q=-1.0 Lsize= 1014774kB time=00:31:22.07 bitrate=4417.0kbits/s    
video:954678kB audio:58815kB subtitle:0 global headers:0kB muxing overhead 0.126359%

Then when I try splitting the video I get an error "pts (-5375) < dts (385)"

beefy:VIDEO_TS riots$ ffmpeg -i ~/Desktop/temp.mov -vcodec copy -acodec copy -map 0 -f segment -segment_times 0:5:00 -reset_timestamps 1 ~/Desktop/split_%02d.mov
ffmpeg version 1.1 Copyright (c) 2000-2013 the FFmpeg developers
  built on Jan  8 2013 10:22:35 with Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)
  configuration: --enable-nonfree --enable-gpl --enable-version3 --enable-postproc --enable-swscale --enable-avfilter --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libfaac --enable-libxvid --enable-libx264 --enable-libvpx --enable-hardcoded-tables --enable-shared --enable-pthreads --disable-indevs --cc=clang
  libavutil      52. 13.100 / 52. 13.100
  libavcodec     54. 86.100 / 54. 86.100
  libavformat    54. 59.106 / 54. 59.106
  libavdevice    54.  3.102 / 54.  3.102
  libavfilter     3. 32.100 /  3. 32.100
  libswscale      2.  1.103 /  2.  1.103
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Volumes/Beefy HD2/Users/riots/Desktop/temp.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 512
    compatible_brands: qt  
    encoder         : Lavf54.59.106
  Duration: 00:31:22.15, start: 0.000000, bitrate: 4416 kb/s
    Stream #0:0(eng): Video: mpeg2video (Main) (m2v1 / 0x3176326D), yuv420p, 720x576 [SAR 16:15 DAR 4:3], 4155 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
    Metadata:
      handler_name    : DataHandler
    Stream #0:1(eng): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, stereo, fltp, 256 kb/s
    Metadata:
      handler_name    : DataHandler
[mov @ 0x7ff49402e000] track 1: codec frame size is not set
Output #0, segment, to '/Volumes/Beefy HD2/Users/riots/Desktop/split_%02d.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 512
    compatible_brands: qt  
    encoder         : Lavf54.59.106
    Stream #0:0(eng): Video: mpeg2video (m2v1 / 0x3176326D), yuv420p, 720x576 [SAR 16:15 DAR 4:3], q=2-31, 4155 kb/s, 25 fps, 90k tbn, 25 tbc
    Metadata:
      handler_name    : DataHandler
    Stream #0:1(eng): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, stereo, 256 kb/s
    Metadata:
      handler_name    : DataHandler
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
track 1: codec frame size is not set time=00:04:51.77 bitrate=N/A    
[mov @ 0x7ff49402e000] pts (-5375) < dts (385) in stream 1
av_interleaved_write_frame(): Invalid argument

If I don't use the reset_timestamps option then ffmpeg runs fine, but the second split file appears to have 5 minutes of blank video at the start. If there's any other way someone can suggest splitting DVDs without transcoding I'd be very grateful, I have a lot of DVDs I want to rip and split.

Regards
Owen



More information about the ffmpeg-user mailing list