[FFmpeg-devel] [RFC]Add int64_t probesize2 to AVFormatContext

wm4 nfxjfg at googlemail.com
Tue Jul 29 23:59:52 CEST 2014

On Mon, 28 Jul 2014 10:29:24 +0200 (CEST)
Oliver Fromme <oliver at fromme.com> wrote:

> Eli Kara wrote:
>  > > From: ffmpeg-devel-bounces at ffmpeg.org [mailto:ffmpeg-devel-bounces at ffmpeg.org] On Behalf Of Nicolas George
>  > > Sent: Monday, July 28, 2014 1:10 AM
>  >
>  > > That would be nice, thanks for proposing. But that would not fix
>  > > the issue: not all MPEG-PS files come with a DVD structure, even
>  > > ones with subtitles, people often dump the MPEG-PS stream and
>  > > discard the corresponding IFO files.
>  >
>  > It would solve the problem for DVDs with structure, which is probably
>  > what most people have when they rip a DVD.
>  >
>  > Just out of curiosity - why isn't DVD/BR reading implemented in
>  > FFmpeg? Is it because of the encryption that needs to be cracked?
>  > I'm asking because I couldn't find any explanation in the FAQ. It
>  > seems weird no one has ever needed it before..
> I need it all the time.  :-)
> My dvd-to-mkv script uses "mplayer -dumpstream" to dump one
> title from a DVD to disk.  Then I use ffmpeg to encode it
> to h.264 ...  That's why I appreciate the patch very much
> that Carl Eugen has created.
> There's another problem:  The palette of the subtitle streams
> is contained in the IFO files, too.  So, in order to get the
> palette right, my script uses "mencoder -vobsubout", then
> greps the palette from the resulting .idx file and feeds it
> to ffmpeg's -palette option.

Both can be done much better with libdvdnav or libdvdread.

> However, since I'm quite familiar with the DVD format, I have
> recently written my own little tool that is able to extract
> the palette from IFO files or DVD images, so I don't need
> mencoder anymore and all of its dependencies.  I also plan
> to extend it to be able to dump the MPEG-PS, so mplayer isn't
> needed anymore either.
> The only problem left is that subtitle streams sometimes
> begin beyond the 2 GB boundary, which Carl Eugen's patch will
> hopefully fix.

And you plan to crunch the whole 2 GB before even starting transcoding?

> An alternative (and even better) solution would be if I could
> tell ffmpeg that I *know* there *is* a VOBSUB subtitle stream,
> and that there's no need to try to probe for it first.  That
> would get rid of the huge delay that the probing incurs when
> scanning several GB (which is a real PITA).  Maybe I'll try to
> make a patch that can do this, like "-assume_vobsub 21" for
> subtitle stream #21, or similar.
> By the way, encryption is not an issue, at least not for me.
> The VIDEO_TS structures and images that I use have already
> been decrypted before.
> One final remark:  Even if ffmpeg supported reading from DVDs
> itself, I would still need to handle dumped MPEG-PS files.
> That's because my script requires them anyway because it
> performs a bunch of analysis steps on them.

libavformat could just use a nested mpeg demuxer for this.

> Best regards
>    Oliver

More information about the ffmpeg-devel mailing list