[FFmpeg-devel] [PATCH v3] avformat/dvd: new dvd:// protocol for reading dvd folder/images

Stan I stanislav.ionascu at gmail.com
Mon Jan 9 12:56:51 EET 2023


Thanks for looking into this.

On Mon, Jan 9, 2023 at 9:13 AM Nicolas George <george at nsup.org> wrote:
>
> Stanislav Ionascu (12023-01-08):
> > dvd:// protocol uses libdvdread for opening folders and/or disc-images,
> > it then either identifies the longest title-set, or uses the title-set
> > parameter.
> >
> > After opening the dvd, it will read and output all VOBs, in sequence
> > defined by the program-chain.
>
> Thanks for the patch. The reason there was no DVD support in ffmpeg
> until now is that it is not as straightforward as it seems.
>
> Your patch is missing documentation, including documentation about its
> limitations. Please clarify various points:
>
> - VOBs contain not only the movie but also menu data: will it be mixed
>   along with the movie or skipped?

The protocol, when opening the DVD folder or image, will read the VMG
and VTS info to identify the longest title. If identification was
incorrect, the title can be overridden via command-line parameters.
But most of the time it will be the main-movie. The VOBs that are read
via libdvdread belong to that video title set, so menu VOBs should be
skipped.

>
> - Are the timestamps monotonous over a whole title?

Since this is a protocol, it doesn't really do much about demuxing and
the timestamps, so it depends on the data in VOBs and the probed
demuxer (mpeg). From the ffmpeg perspective, this is a continuous
single concatenated VOB, similar to what the "concat" demuxer
generates from split-VOBs, so generating timestamps may be required
when muxing into a format that requires them, like matroska.

>
> - Does ffmpeg correctly detect all the subtitles streams?

Yes, ffmpeg either discovers them later in the stream, or with
adequate analyzeduration/probesize during probing.

>
> - Does ffmpeg correctly detect the language of audio and subtitles
>   streams?
>
> - Are chapters detected?

As this is protocol, it only provides the data that is stored in the
VOBs. Libdvdread has the language and chapter information, but I don't
know how to attach it to the stream without having to use a slave
mpeg-demuxer.

For the sample files I've used :
1. streams.videolan.org/samples/MPEG-VOB/menus\ DVD/free.iso
2. www.deniscarl.com/dvdtest/videotest.iso.bz2
3. dvdauthor-built disc from generated av streams

>
> Regards,
>
> --
>   Nicolas George

Thanks!

Stan.


More information about the ffmpeg-devel mailing list