[FFmpeg-devel] [PATCH v2] dvdvideo: add DVD-Video demuxer, powered by libdvdnav and libdvdread

Marth64 marth64 at proxyid.net
Wed Jan 10 18:48:09 EET 2024


To elaborate slightly: GENPTS is working within each segment, whose start
and end times I have from NAV packets

On Wed, Jan 10, 2024 at 10:25 Marth64 <marth64 at proxyid.net> wrote:

> Thank you, Nicolas. I had tinkered with concat this way in the past as
> PGCs are indeed just a bunch of segments mushed together, but I had run
> into issues specifically with (1) concerns about forced subtitles that pop
> up mid stream and (2) unable to figure out custom IO with it. Since dvdnav
> is driving the navigation and reading of the disc, I do not have the luxury
> of knowing VOB addresses for a perfect read of the title (without fully
> playing back). So I don’t have a list of files and sectors to give concat.
> As DVD also has cell commands that drive direction of the stream, this
> complicates it further. The structure revealed by dvdread alone is not
> enough to properly play back; the dvdnav VM plays a key role. Finally, I
> had also worry about oddities when having demuxer->submuxer->subsubdemuxer.
>
> In my approach (using mpeg demux directly) there doesn’t seem to be any
> issue with concatenation/handling the gaps, and I am flushing the
> subdemuxer when they occur. Just the GENPTS sticks out as being a non-ideal
> thing to do.
>
> That said, I will take another look and see if I misunderstood at the time.
>
> Best,
>
> On Wed, Jan 10, 2024 at 04:17 Nicolas George <george at nsup.org> wrote:
>
>> Marth64 (12024-01-10):
>> > I will add that I still had to maintain a dependency on GENPTS for the
>> > inner MPEG demuxer. This is because dvdnav_get_current_time() does not
>> > provide exact stream-level PTS. However, the crashing/hanging is fixed
>> (by
>> > parsing NAV packets), and the output is produced smoothly. GENPTS fills
>> in
>> > the blanks.
>> >
>> > If anyone can think of a better way, please let me know. Right now, it
>> > works well.
>>
>> You could imitate what tools/dvd2concat does internally: use
>> libdvdread to get the structure of the DVD but let the concat demuxer
>> handle all the actual demuxing work.
>>
>> Regards,
>>
>> --
>>   Nicolas George
>>
>


More information about the ffmpeg-devel mailing list