[Matroska-devel] Re: Multi-Angle (summary) + Multi-resolution files

Steve Lhomme steve.lhomme at free.fr
Mon Sep 20 11:27:31 CEST 2004


Paul Bryson a écrit :

> "Steve Lhomme" wrote...
> 
>>It probably doesn't make sense to have different codec for different 
>>angles (well, I think it does but let's not consider this case). So both 
>>solutions are probably valid. But there is another problem. It's very 
>>common on the DVD to have the menu in 4:3 and the movie in 16:9. And I'm 
>>sure anyone would want to crop the content of the 16:9 part for better 
>>encoding efficiency. So the question is: should we use the same video 
>>track for the menu and the movie ? Or not...
> 
> 
> I would say not if they are two different resolutions.  It is much simpler 
> to use the existing tracks system.  I don't know how DVD players do it, but 
> consider this image for a moment:
> 
> http://commo.de/videoswitching.png

First of all, I'd like to point out that I understand that the 
multi-angle/multi-resolution feature won't be used much if it doesn't 
work with DirectShow, but it should also be usable in other conditions.

The problem of video switching should really not be different than audio 
switching, so if Haali can support audio switching in his filter, it can 
probably handle video switching too...

I think I'll try to play with Scenarist, maybe it allows to do 
multi-angle and multi-resolution DVDs. This way I'll know what are the 
limitations of DVDs. For example take the case of a movie that could 
include both 4:3 and 16:9 images. The way it's currently ripped is that 
you take the bigger resolution and you often have useless black lines 
(hopefully digital black that will compress well). I think on a DVD you 
can do it because the picture always have the same resolution (like 
720x576) but then you can have a 16:9 frame or a 4:3. That's purely 
because of MPEG2. But we don't want to allow multi-resolution only for 
MPEG2...

What you propose is to have 2 video tracks, the same way as angles, and 
use one or the other to use this feature. That could work if the "angle" 
(ie not the main video track) is the default one. When there is video 
you use that one, otherwise you use the track it's related to (value in 
TrackOverlay). But that would be more complicated when you have 2 "real" 
angles that can both have various resolutions. Well that could work. If 
the track that is marked as "angle #2" is a 'partial' track, ie it 
contains gap that are filled by another track. Let's see in detail...

Virtual Track A : mixes Track 1 in 4:3 and partial Track 2 in 16:9
Virtual Track B : mixes Track 3 in 4:3 and partial Track 4 in 16:9

Track A is Angle #1 <- default angle to play
Track B is Angle #2

_definition of the matroska tracks_ :

<Tracks>
   <!-- Track A -->
   <TrackEntry>
     <TrackNumber>1</TrackNumber>
     <FlagDefault>0</FlagDefault>
   </TrackEntry>
   <TrackEntry>
     <TrackNumber>2</TrackNumber>
     <FlagDefault>1</FlagDefault>
     <TrackOverlay>1</TrackOverlay>
   </TrackEntry>

   <!-- Track B -->
   <TrackEntry>
     <TrackNumber>3</TrackNumber>
     <FlagDefault>0</FlagDefault>
   </TrackEntry>
   <TrackEntry>
     <TrackNumber>4</TrackNumber>
     <FlagDefault>0</FlagDefault>
     <TrackOverlay>3</TrackOverlay>
   </TrackEntry>
</Tracks>

The problem is that Track 1 and Track 3 may contain gaps and are only 
playable when coupled with Track 2 and 4 respectively. This is were the 
multi-angle is different than the multi-resolution. For multi-angle, you 
can have different unrelated track entries. While for multi-resolution 
you need tracks that are *coupled* to for one. The TrackOverlay element 
is not enough to do that. We need another element to "merge" 2 or more 
tracks together in a bigger entity. Maybe that's what Mosu had in mind 
with TrackSubID. IMO for each track we could add an element like 
TrackGroup : the group of tracks that this track belongs to. It could 
also be the number of the angle like the DVD angle number (so we don't 
need the other element I was thinking about). The Tracks would now look 
like this :

<Tracks>
   <!-- Track A -->
   <TrackEntry>
     <TrackNumber>1</TrackNumber>
     <FlagDefault>1</FlagDefault>
     <TrackGroup>1</TrackGroup> <- angle 1
   </TrackEntry>
   <TrackEntry>
     <TrackNumber>2</TrackNumber>
     <FlagDefault>1</FlagDefault>
     <TrackGroup>1</TrackGroup> <- angle 1
   </TrackEntry>

   <!-- Track B -->
   <TrackEntry>
     <TrackNumber>3</TrackNumber>
     <FlagDefault>0</FlagDefault>
     <TrackGroup>2</TrackGroup> <- angle 2
   </TrackEntry>
   <TrackEntry>
     <TrackNumber>4</TrackNumber>
     <FlagDefault>0</FlagDefault>
     <TrackGroup>2</TrackGroup> <- angle 2
     <TrackOverlay>1</TrackOverlay> <- the track number or the group 
number ?
   </TrackEntry>
</Tracks>

There are a few pbs to solve here :
- there are 2 default tracks
- the TrackOverlay is not really useful when you already have the list 
of tracks that form an angle. We might simply drop it, but it could also 
be interresting to know if a track of a group can be played alone.
- a track that can be played alone could be used in many angle groups

> The Switcher would probably be built into the Splitter in real life.  And 
> the Converter/Resizer would probably be an application thing, not its own 
> filter.  It would probably also have to get info from the Switcher on which 
> decoder to take data from.

Hopefully Haali can tell if it's OK to do that or not. That looks a bit 
hacky to me. But I don't think we have another choice.



More information about the Matroska-devel mailing list