Opened 16 months ago

Last modified 16 months ago

#9158 new enhancement

DVD language metadata

Reported by: S.C. Douglas Owned by:
Priority: wish Component: avformat
Version: git-master Keywords: mpegps
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


I apologise if this is a duplicate, but I did search “language metadata” before raising this.

I would like DVD audio and subtitle metadata to be extracted from the VOB file (colour palette is already extracted for DVD subtitles).

Attachment contains DVDLangugeMetadata.c and DVDLangugeMetadata.h which contains the code I have been using for approximately 11 months in an program I wrote. You are free to ignore, use or modify this code in any way you feel fit. The advantage is it is a “compile and go” bolt on to the existing ffmpeg libraries public API. The disadvantage is my code’s API assumes knowledge of the structures used for input and output because it is not integrated into the codecs.

Attachments (1) (3.2 KB ) - added by S.C. Douglas 16 months ago.
Proof of concept code

Download all attachments as: .zip

Change History (8)

by S.C. Douglas, 16 months ago

Attachment: added

Proof of concept code

comment:1 by Nicolas George, 16 months ago

Component: undeterminedavformat
Version: unspecifiedgit-master

The language metadata is not present in the VOB files, it is therefore impossible to extract it. As you can see in your code, it comes from the IFO file.

It could be possible to have an option to the MPEG2-PS demuxer to let it read the IFO file. I have other priorities right now, but it should not take that much effort for somebody else motivated. I can give advice.

Your code cannot be used as it is because it breaks too many style and structure requirements for FFmpeg, but the ParseIFO() function can serve as base for the option I was speaking of. Can you be a little more precise in your statement about its license: it looks like you are giving it away to the Public Domain, or as close as can be under your legislation, but we need you to say it more clearly to be able to use the code.

Note: better not use a Zip file for two small text files; without the Zip file, Trac would be able to let us browse them online.

comment:2 by Carl Eugen Hoyos, 16 months ago

Keywords: mpegps added

comment:3 by S.C. Douglas, 16 months ago

The code is based on information from DVDinfo which has moved to web address since I wrote the code.

I am indeed donating the code into the public domain.

I acknowledge that my code does not have a proverbial “snowball’s chance in hell” of meeting your coding standards. I am retired. When my employer upgraded from windows xp several software vendors were charging the same for an upgrade licence from xp as a new licence. This resulted in the donation of xp licences to several employees designated as “key engineers” for use at home for personal reasons as well as business reasons. I therefore have access to software that would cost me approximately £30K to replace, all covered by NDAs. My coding standards allow me to take advantage of these tools, but, they are fundamentally incompatible with yours.

I have had use of the ffmpeg libraries to produce program(s) for my PVR’s user group, which take almost all of my spare time. However I wish to give back “in kind”, hence donation in the form of proof of concept code. I am human so can make mistakes. However I hope this code will always be debugged, protected against errors and pass a set of automated tests. Unfortunately these tests can not be published because of NDAs.

Is the above explicit enough?

in reply to:  3 comment:4 by Balling, 16 months ago

Replying to sceedy:

I acknowledge that my code does not have a proverbial “snowball’s chance in hell” of meeting your coding standards.

You mean you did use clang-format on it or what? D:) I sometimes read coding style comments on mailing list, but with clang creating that utility it is franky speaking obsolete in every sense of that word.

Last edited 16 months ago by Balling (previous) (diff)

comment:5 by S.C. Douglas, 16 months ago

All my code is hand formatted.
It has an indentation of 3 spaces (not 4)
It uses specific layout for {} and () pairs to allow source level analysis tools to run
It uses statements that are explicitly outlawed
It uses code line lengths that are outlawed to combine statements on one line to allow source level analysis tools to run
It uses other layout… to automate initial test data generation
Need I go on ?

comment:6 by Nicolas George, 16 months ago

You do not need to justify yourself (although I would say that static analysis tools that requires you to make the code less readable are not worth using; the fact that they cost an arm and a leg is irrelevant, after all you could buy multimedia software for thousands of bucks, they would not come close to FFmpeg which is free). All this can be fixed if somebody intends to reuse the code for FFmpeg.

What is much more problematic is the use of global variables, but it can be made to work too with just a little effort.

Anyway, all this is of little relevance unless somebody intends to actually work on this.

in reply to:  5 comment:7 by Balling, 16 months ago

Replying to sceedy:

All my code is hand formatted.

All your issues can be fixed by clang-format. No problem. This is not an issue.

Note: See TracTickets for help on using tickets.