[vlc-devel] fixing a bug: preferred audio language select for .ogg

Karl Ostmo kostmo at gmail.com
Thu Sep 16 11:18:26 CEST 2010


On Thu, Sep 16, 2010 at 3:08 AM, Jean-Baptiste Kempf <jb at videolan.org> wrote:
>
> On Wed, Sep 15, 2010 at 09:30:31PM -0500, Karl Ostmo wrote :
> > After struggling with this for several hours I can see why Matroska is
> > a better container format and would be satisfied with WONTFIX on the
> > ticket.
>
> Come on, we know ogg is a bad format, but there must be hacks or
> work-arounds for this limitation.
>
> Maybe, try to read-ahead, like OggKate* does.

>From the Ogg Vorbis comment field and header specification
(http://xiph.org/vorbis/doc/v-comment.html), it sounds like although
the header is spread over 3 packets, only the second packet is needed
to extract the comment field.

If there was a way to read the second packet from within
Ogg_ReadVorbisHeader(), it could work.  I'd like to know more about
the overall architecture and what drives the advancement to the next
packet.  I don't know what goes on outside the scope of Demux() in
ogg.c.  With my current understanding of the code, solving this is
over my head.

As a user, my interim solution has been to use the Totem player for
dual-language .ogm files.  Upon startup it defaults to the last audio
track used (whether that is based on the language string or numeric
index, I do not know).  So from a usability perspective, creating a
preference field in VLC for the preferred *numeric* audio track index
would solve my issue.

Karl



More information about the vlc-devel mailing list