[vlc-devel] Re: OGG, AC3 encoder and maximum bitrate for video encoding

Derk-Jan Hartman hartman at videolan.org
Mon Dec 12 13:30:47 CET 2005

On 12-dec-2005, at 12:31, Håvar Illøkken Nielsen wrote:
> Måns Rullgård wrote:
>> Derk-Jan Hartman <hartman at videolan.org> writes:
>>> On 11-dec-2005, at 14:46, Håvar Nielsen wrote:
>>>> The player does not seem to recognize comments in ogg streams.
>>> I believe all comments in ogg files are added to the Information
>>> dialog. The problem however is that OGG comments are not
>>> standardised, and therefore an artist/title pair match cannot always
>>> be made.
>> In a fit of lunacy, the creators of the Ogg format and Vorbis codec
>> decided to place the comments in Vorbis stream, and not at the Ogg
>> container level.  Hence, talking about Ogg comments is meaningless.
>> That said, the Vorbis comments are free-form, but there is a
>> recommended set which should be supported.
>> See http://xiph.org/vorbis/doc/v-comment.html
> The act of placing comments at stream level was in my opinion an  
> act of genious and far from lunacy. In a file with several audio- 
> streams and subtitle streams, there would be a need for commenting  
> something like:
> AudioStream1:
> comment[0]="LANGUAGE=English"
> comment[1]="TITLE=Movie sound 5.1 OGG"
> AudioStream2:
> comment[0]="LANGUAGE=English"
> comment[1]="TITLE=Director's comments"
> SubtitleStream1:
> comment[0]="LANGUAGE=English"
> SubtitleStream2:
> comment[0]="LANGUAGE=Deutsch"
> SubtitleStream3:
> comment[0]="LANGUAGE=Français"
> SubtitleStream4:
> comment[0]="LANGUAGE=Norsk"
> And there are room for containerlevel commenting:
> comment[0]="TITLE=The Matrix"

Stream level != codec level
the ogg vorbis comments are within the Vorbis audio data, instead of  
at the ogg container level.
This is bad design because the audio codec module now becomes  
responsible for reading meta-data, instead of doing audio decoding  
(which should be it's single and only job). There are more of these  
kinds of problems with the ogg format. It's designed as an audio only  
system, with video and any other important features tagged on it later.

> This kind of commenting is supported in other players, for instance  
> Gabest Media Player Classic for Windows. And this is really what  
> makes the OGG container unique and in my opinion the best container  
> around.

Dude, you have to be kiddin me. even AVI supports this kind of stuff.  
It's just that nobody uses it. Matroska, mov, mp4 every major format  
supports this and usually better designed.

> I think at least the LANGUAGE tag of the audio and subtitle streams  
> should make it into the menus, the way they do with DVDs.

then they should use a standardized language naming convention, like  
any serious format. I refuse to do a mapping from Français -> fr

>>>> And it doesn't handle 5.1 OGG sound very well.
>>> I'm not sure if this is implemented at all in VLC. I am sure that
>>> it's not much tested at the very least :D
>> Not even oggenc/oggdec handle this very well.  It's not terribly
>> difficult to do it though, assuming VLC already knows how to deal  
>> with
>> 5.1 audio in general.
> ffmpeg, or at least the windows version of ffmpeg, ffdshow handles  
> this fairly well. It can decode and reecode both OGG5.1 and AAC5.1  
> into an AC3 stream and send it over the SPDIF outlet. I haven't  
> gotten around to installing Linux on my new AMD64 nf4 box yet, so I  
> don't really know if the linux version of ffmpeg does handle it.  
> VLC 0.8.4 and the daily build from Des 7. did play OGG5.1, but only  
> the front channels as PCM.

You should seperate the issue of supporting Ogg 5.1 from the feature  
of reencoding to ac3. They are technically completely different  
things. Once you understand how VLC transcodes you will see why  
transcoding ONE audio track on the fly, while playing that back isn't  
as easy in VLC design as it looks at first hand.

> Also, xbox media center, based on the linux mplayer does reencode  
> OGG5.1 into AC3, the way I'm talking about. This player is also  
> handling the OGG stream commenting in a sufficient way.

XBMC is simply mplayer isn't it?


This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html

More information about the vlc-devel mailing list