PDA

View Full Version : Matroska with multiple AC3 tracks


filantro
18th February 2004, 13:44
I did a test compressing LOTR - Extended version (3:45) to divx at 704x416 (anamorphic) and added the original 6 AC3 tracks without the DTS soundtrack (2 are 5.1 and the rest are stereo) to a matroska file using mkvmerge GUI. I also set the correct aspect ratio to be played at (2.411). It was all intended to fit this incredibly long film in a DVD-R using divx 5.1.1, which preserves a very good video quality.

A problem appeared when I tried to play the film in Media Player Classic. The video was incredibly slow and jumpy and the audio stuttered: the CPU consumption was 100%. When I took a look at the filters being used, I found out that there was an instance of the AC3 decoder working for each audio channel. As the reproduction involved decompressing 6 AC3s and one divx video (relativily high resolution), it was no wonder that the CPU consumption was that high.

This way I tried the obvious: muxing just video and one AC3. The results, expected: video played fine without stuttering and CPU consumption was about 40-50%.

After that, I loaded the matroska splitter in Graphedit and applying to it the .MKV with 6 AC3 and 1 video I saw them all opened at the same time. Intervideo's MPEG-2 splitter does not do that with VOBs. Reason: why the hell do I want all audio tracks opened simultaneously unless I am a sound engineer mixing some professional stuff? Why does not the matroska splitter, demuxes JUST ONE audio track at the same time leaving a possibility to control the splitter with the player, instead of having to switch the audio after the decoding of all tracks?

The AVI splitter does just the same which is quite annoying. It seems to me that no one ever tried a multi-audiotrack video in a serious way.

Atamido
18th February 2004, 16:28
What SHOULD be happenning is that an instance of AC3Filter should be openned for each AC3 audio stream. But data should only be passed to the active stream. That means you will see six decoders present, but only one of them will be decoding data at a given time. I am pretty sure this should work fine out of the box for MPC. You might try installing the latest Morgan Stream Switcher.

Brother John
24th February 2004, 12:51
As mpc addict I'm a little reluctant to say this, but: try BSPlayer. I found it to be using less CPU than mpc with multiple audios. Also there's always only one filter for currently playing audio in the BSPlayer filter dialog.

Btw: You're right. No one without a DVD burner would even remotely think about anything like a movie with 6 AC3 streams.

filantro
24th February 2004, 13:52
The Matroska supporters are announcing the Matroska format as a the wild card of containers: the one that can hold it all. Well, that's fair enough. If that is the ultimate goal of it, I think it should be able to replicate or improve theoritically older containers such as VOB. Right now, Matroska does fine, what the hacked versions of AVI already do fine. So my question would be:

Why on earth do you want Matroska, if you already have a hacked AVI that does more or less the same (apart from the muxed chapters and the subtitles)?

If Matroska aims to be the standard, it should do much more than AVI and should do it fine. And the tools for Matroska should do things that the tools for AVI can't do. If you don't offer me any advantage over AVI, why should I change formats? Just for a slightly smaller overhead? That doesn't make up for the lack of compatibility with hardware divx players. If multi-audio-track playback is implemented in a botchy way, why should I bother quitting DVD format (VOBs)?

I had already tried BSPlayer 1.0 and it works fine with audio, but I don't like the video quality. They have included some luminance controls/filters that spoil the image quality. One could also wonder why don't they leave an option to play the video with no filters or controls. Some people think that manipulating video and audio, you can always get a better quality. Those people have never, probably, fully understood the meaning of "high fidelity".

Yes, you may say that no one without a DVD burner would think of a video with 6 AC3, but having such a burner nowadays is not a weird thing, is it? And some people talk about Blu-ray for a near future. The industry plans to get rid of CDs. You must design things thinking for the future, not for the past.

The purpose of this post is to avoid the developers feel self-complacent about the results, and to point out flaws. This is because I'd really like to see Matroska as a standard.

[Toff]
24th February 2004, 16:06
What AC3 decoder are you using ?
IIRC some version of AC3Filter doesn't work properly when used with a stream switcher, AC3Filter continue decoding even if the switcher tell him not.

why the hell do I want all audio tracks opened simultaneously unless I am a sound engineer mixing some professional stuff?
It's because of the DirectShow philosophy to split the processing in different filters. The splitter output packet of encoded audio data that are decoded by a decoder filter.
If you have only 1 audio pin, you are going to mix vorbis packet with ac3 packet for example. What the decoder will do with this :confused: it can decode vorbis for example but not ac3.
It's why you have output pin for each audio stream, each stream his connected to a compatible decoder, then it's the job of the audio switcher to tell the decoder than it can stop decoding because his data are not used.

gircobain
24th February 2004, 17:12
I can't figure why people say "this player has better picture quality than this other" when both use the same engine (directshow). The only factor for better picture quality should be the decoder used.

Hiro2k
24th February 2004, 18:38
Originally posted by filantro

1)Why on earth do you want Matroska, if you already have a hacked AVI that does more or less the same (apart from the muxed chapters and the subtitles)?


2)If multi-audio-track playback is implemented in a botchy way, why should I bother quitting DVD format (VOBs)?



1) Exactly for those reasons you just mentioned. AVI doesn't have chapters or subtitles. That is enough for most users to use another new format.

2) The problem here does not lie with matroska but the filters and dshow. That was stated above. This problem has nothing to do with matroska.

Atamido
24th February 2004, 21:51
Originally posted by gircobain
I can't figure why people say "this player has better picture quality than this other" when both use the same engine (directshow). The only factor for better picture quality should be the decoder used. It has to do with the video renderer being used. DirectShow has several, and depending on the one used, and your video card drivers, your image can be significantly affected. MPC and TCMP gives you lots of options about what to use. I wonder why Zoom wouldn't?

Brother John
24th February 2004, 22:22
100% with Hiro2k
And as your subject line says, filantro, it's a matter of philosophy or how happy you are personally with a container that's more hack that spec.
AVI lovers please don't kill me for this statement. ;)

I'm not happy at all and as standalone compatibility is no issue for me the choice is not that hard. Though I must admit mp4 could give matroska a hard time once it will have fully matured.


Back to the actual problem. 6 audio tracks should definitely not cause the CPU to breakdown. To be sure if this is a player, decoder or splitter issue a little investigation would be needed. If I find the time maybe I'll look further into it.

filewalker
24th February 2004, 23:09
It has to do with the video renderer being used. DirectShow has several, and depending on the one used, and your video card drivers, your image can be significantly affected. MPC and TCMP gives you lots of options about what to use. I wonder why Zoom wouldn't?:confused: In Zoomplayer you can choose between differnt Video renderer: Standard Renderer,Overlay Mixer or VMR9!

What I read in this thread (http://forum.inmatrix.com/ikonboard/ikonboard.cgi?s=403bc87205beffff;act=ST;f=7;t=3014) at Zoomplayer forum, the problem is in the current AC3Filter...dcoder fixed this bug, as you see in this link.

Cu filewalker

ChristianHJW
25th February 2004, 01:33
Originally posted by filantro The Matroska supporters are announcing the Matroska format as a the wild card of containers: the one that can hold it all. ...... So my question would be:
Why on earth do you want Matroska, if you already have a hacked AVI that does more or less the same (apart from the muxed chapters and the subtitles)?
If Matroska aims to be the standard, it should do much more than AVI and should do it fine. And the tools for Matroska should do things that the tools for AVI can't do...... If multi-audio-track playback is implemented in a botchy way, why should I bother quitting DVD format (VOBs)?
I had already tried BSPlayer 1.0 and it works fine with audio, but I don't like the video quality.

As the other guys here told you already, you are mixing up the container itself and its implementation in a specific playback platform, DirectShow in this case. However, the fault is with ac3decoder filter here, aand not the matroska splitter. We cant take responsibility for the bugs of other filters ......

filantro
25th February 2004, 13:08
Originally posted by ChristianHJW
you are mixing up the container itself and its implementation in a specific playback platform, DirectShow in this case


Well, YES, I AM MIXING THEM UP. I am treating Matroska as a whole, as something that must work from a practical point of view. What's the point in a beautifully created set of rules for a beautiful container if it's useless? What's the point in building a Ferrari if all you have is muddy country lanes?

If you want to make a product a world standard for video, you can not ignore a practical problem that affects 90% of the world computers, that is, those that use Windows. If the average user, like me, starts to have this kind of trouble, they will quit using the format, which is not good for your attempt to create a standard - I deduce your intentions from your post epilogue:

Support the future of video and audio encoding : matroska as container, USF as subtitles standard and CoreAPI as codec interface API...

Yes, I will support it only if it works, only if I can see the film without any problem at all.

Brother John
25th February 2004, 13:29
What's the point in building a Ferrari if all you have is muddy country lanes?In that case, wouldn't you blame the damned government for being unable to build proper roads? ;)
Oh, and your problem isn't bound to matroska. Happens also with avi. Why blame matroska for something that's not its fault?


I've just tested dcoder's bugfix with a short sample from "Das Boot": XviD RC2, 640 hor., 10x AC3 :devil: (5x 5.1, 5x 2.0). Matroska test file muxed with mmg 0.8.4, avi with avimux gui 1.16.
These are the results (no difference between avi and mkv):


Without dcoder's fix Nice slideshow with MPC and ac3filter, cpu always at 100%
Smooth playback with MPC and its internal ac3 decoder, cpu around 50% (Athlon 1 Ghz)
Smooth playback with BSPlayer 1.0, cpu around 35% (difference probably be caused by different video renderer)

With dcoder's fix Smooth playback in both players

What does this mean? Looks like BSPlayer only connects a decoder to the currently active audio stream (Or something like that. I'm not a dshow expert). That means BSPlayer isn't affected by ac3filter's bug.
MPC's internal ac3 filter works fine.
It really is a bug in ac3filter, not a flaw of matroska.
Matroska is rehabilitated ;)
filewalker's post and decoder's fix solved the problem. Thanks to both of you!

filewalker
25th February 2004, 16:58
Oh, and your problem isn't bound to matroska. Happens also with avi. Why blame matroska for something that's not its fault? That're true words.

@filantro

Every container 'll fail miserably if one decoderfilter (audio or video) is buggy.

But now you have found a solution here in this forum with a link to dcoder's fixed version of AC3Filter...that's the idea of this forum...to discuss & help. So be happy. :)

Remember that all deocoder filters here and, of course, Matroska are freeware which are under development of people who spend their freetime.


Cu filewalker

ChristianHJW
25th February 2004, 20:23
Originally posted by filantro Well, YES, I AM MIXING THEM UP. I am treating Matroska as a whole, as something that must work from a practical point of view. What's the point in a beautifully created set of rules for a beautiful container if it's useless? What's the point in building a Ferrari if all you have is muddy country lanes?
You forget that it took Ferrari about 80 years to come where they are now. matroska has started May last year, and we are a team of volunteers working on it in our free time
If you want to make a product a world standard for video, you can not ignore a practical problem that affects 90% of the world computers, that is, those that use Windows. If the average user, like me, starts to have this kind of trouble, they will quit using the format
Have you even read what we told you ? This is a bug in ac3filter, not in the matroska splitter. Install another AC3 decoder filter and the problem is non-existant anymore.
Yes, I will support it only if it works, only if I can see the film without any problem at all.
Do me a favour and continue using AVI. Sorry for being that straight, but what our project does not need currently are users who blame everything that doesnt work on matroska, without understanding the background of what they are trying to do, especially if they have a tendency to 'tell the world' about what they have 'found', like you seem to do .....

filantro
25th February 2004, 21:08
Do me a favour and continue using AVI

Ok, I'll do it.

jimmy basushi
26th February 2004, 02:46
i just wanted to add my spin on this. thank you matroska team ive used it alot with no problems (xvid + mp3 + ogg + ac3 with chapters) and other various combos just out of sheer curiousity, and yet nothing bad has happened to any of them.

@ filantro: when you atucally understand how all these programs work, and realise there are different audio codecs you will also understand that matroska *is* the best thing since sliced bread.

ChristianHJW
26th February 2004, 10:15
As a sidenote, we more or less decided to remove ac3filter from future versions of the matroska packs. It seems that people cant differentiate between the matroska functionalitites and the bugs in 3rd party filters, which are only distributed by us for the users convenience.

Thats maybe a pitty for all the people who dont have more than one or two AC3 tracks in their movies, but after all, and filantro is a good proof for that, people will shout

matroska suxxx !!!

like he does, just because we are kind enough to include a free AC3 filter into our packs, which normally isnt in our repsonsibility at all. Now, if our aims to give people a convenient solution to their playback problems turns against our project, we have to rethink our policy in this respect, dont you agree ?

filewalker
26th February 2004, 18:41
Originally posted by ChristianHJW
Now, if our aims to give people a convenient solution to their playback problems turns against our project, we have to rethink our policy in this respect, dont you agree ? [/B]
Sorry. but I can't agree here.
If you think in this way you can also cancel ffdshow and still the latest MMS from the packs.
Both have bugs...that doesn't seem to be the right way to go!:rolleyes:

Such slim packs are great for newbies to playback MKV and perfect to burn on a CD with the movie.
I vote for a codecpack-solution that satisfies 99% of users and not for a solution which eliminates the 1% of "critical" people.

Please reconsider your benefits & disadavantages of your intention.


Cu filewalker