DVD transcoding: "pts has no value"

Linux howto's, compile information, information on whatever we learned on working with linux, MACOs and - of course - Products of the big evil....
Post Reply
User avatar
peter_b
Chatterbox
Posts: 383
Joined: Tue Nov 12, 2013 2:05 am

DVD transcoding: "pts has no value"

Post by peter_b »

[PROBLEM]
I'm trying to extract a certain range from a VOB file on a DVD for use in a news production.
The DVDs were recorded in-house, using a hardware DVD-recorder.
I've ripped the iso (using dvdisaster) and can play the videos without problems in VLC, mplayer, etc.

Now it should be easy, but it's not:
1) VLC does not offer to do a codec "copy". So I can't use it.
2) mencoder:

Code: Select all

$ mencoder -dvd-device "my_dvd.iso" dvd://0 -oac copy -ovc copy -o test.mkv
There are many error messages about duplicating frames, etc...
The resulting file is playing back jerky and A/V async.
3) Avidemux:
Avidemux segfaults and exists, upon trying to load the ISO.


[SOLUTION]
It seems that there's something wrong the with PTS in the original DVD's MPEG stream...
Thanks to a ticket by Dave Rice on FFmpeg's trac, that contained a solution:

I've mounted the iso and remuxed the desired VOB file using FFmpeg - and additional flags:

Code: Select all

$ ffmpeg -fflags +genpts -i input.vob -c copy output.mkv
The resulting Matroska file works fine.

If you need an AVI container, you can do the following:

Code: Select all

$ ffmpeg -fflags +genpts -i input.vob -c:v copy -c:a pcm_s16le output.avi
This transcodes the lossy-encoded audio track to uncompressed (PCM, stereo 16bits), in order to avoid issues with variable bitrate in AVI.
Post Reply