Log in

View Full Version : Alternative matroska splitter for directshow


Pages : [1] 2 3 4 5 6

gabest
30th May 2003, 23:05
http://sourceforge.net/project/showfiles.php?group_id=82303

Since the specification of matroska is not finalized don't expect everything to be supported already. Loading and seeking is a little slow, but bearable.

Gaia
30th May 2003, 23:31
Just tried it and i have to say your filter works a lot better than offical one, atleast in my system. Althought MPC 6.4.5.1(Win98 version) seems to crash always then i quit but that's just tiny problem.

I still have lots of strange problems with offical filter, maybe they are Win98 releated but this splitter rocks!

Great work Gabest :)

Little update, it's actually not crashing always. Just booted and problem is gone.

ChristianHJW
30th May 2003, 23:46
Gabest rocks !!!

We still dont understand how he could write a Dshow parser that doesnt use libmatroska to read MKV files, and even in less then 3 days !! , but we hope to get a lot of inspiration from his filter.

I guess only programmers, and people who are in touch with development projects, like i am, can estimate what that really means. We have been writing/improving our basic I/O library since more than 18 weeks now, plus we had to invest a lot of time in the Dshow parser ( poor robux4 had to learn that from scratch ) and he is making a complete, self contained parser filter in 3 days .... LOL :) !!

Our problem is, we simply dont have the manpower to update 2 different things, the main library and the parser code in the filter. Every time we update the lib, we had to update the Dshow parser also. So, the only sensible solution for us is a DShow parser filter that will compile against the main library, so we really have no clue how to make use of Gabest' s code now ....

Koepi
31st May 2003, 00:20
Hell, great job gabest :-)

If you still feel the need for a challenge, can you add muxing support as well? If it's a bit like the OggDS filters, we (Melgish and I) could easily adopt OggMux to support matroska then as well. And it would still be a DSF application (which I'd like it to stay to be different somehow from the other tools meanwhile available. It's usually good to have 2 different possibilities to get something done - if one solution fails, the other could work.)

...but only if you feel like it - thanks for the DSF anyways! :) (...thinking about trying out matroska soon if the support gets further spread like this :) )

Best regards
Koepi

Calculon
31st May 2003, 04:06
Nice one! :) Works better than the official one on my system as well(WinXP).

Animaniac
31st May 2003, 06:26
Incredible!

Seeking doesn't seem to work at all on WMP9.
But, the correct playing of MKV's with Vorbis more than makes up!

Thank you very much!

gabest
31st May 2003, 08:48
Animaniac: Seeking prob fixed in 1.0.0.1.

Koepi: Ok, the muxer should be even easier to make.

el00343
31st May 2003, 10:48
way cool, gabest!

Gooop
31st May 2003, 12:12
@ gabest
how many people are you ?... :D
thanks for your work, it works perfectly for me as well with winxp, mpc6451 and xvid/ogg files.

ssjkakaroto
31st May 2003, 12:48
thx a lot gabest!! :cool:
now with guliverkli will be a lot easier to get your updated stuff!!

edit:
just did a quick test with it using a xvid video+ogg audio and it plays smooth but two things happened:
1. ffdshow reports the FR as 25.00 fps eventhough the original avi is 23.98 fps
2. in WMP 6.4 everytime i try to seek the video is restarted, but you can notice that wmp can't "see" the whole file, the seek bar becomes white as the video plays just like you're watching a asf video from the internet, but even if i try to seek backwards the video restarts, i still have to try it with MPC
just one question, was it supposed to play subtitles (srt) yet or not?

tia

unmei
31st May 2003, 13:22
purrfect ! (quite ;))

i did some tests with the MatroskaSplitter 1.0.0.1:

one file: mkv, anime,
1420kbit/s Xvid (build 4.may i think) DVD resolution (720x576) with 3 consec. B-frames
192kbit/s lame mp3
muxed with VDmod, default audio interleave (after every frame)
playback off a network drive (fast IDE drive, 100mbit/s LAN)

the same content in a AVI does NOT play fully fluent on my comp
(K7 1.2, 512mb ram, radeon 7500, XP pro)

*TCMP 4.0rc3 - ignores "play" (i probably screwed up my installation, i can't imagine TCMP inherently refuses to play matroska)

*Quicktime 6 pro - "could not open ...mkv because it's not a file QuickTime understands", after 2 crashes :s

*BS player 0.86 build 494 - stutters about as much as AVI ("bearable"), seek time 2-4 sec (more for bigger jumps), skips occur on longer panning sequences but not on hi motion scenes

*WMP 8.0 (the one delivered with XP pro, never updated) - few skips on pan, less than BS player or with AVI file, but more than MPC or ZP. seek time bigger than MPC but less than 1 sec (about the same as ZP)

*ZoomPlayer 3.00 standard - does not stutter but slow down and resync after ca 3 sec, occurs only on the few most extreme panning scenes, seek time bigger than with MPC, but less than 1 sec.

*MPC 6.4.5.2 - purrfect :) , seek time < 1 sec independent of distance , the little stuttering left is probably "hard coded" into the encoding already (hard to notice, by far most fluent of all)

Thanks a lot Gabest .
I thought for some time now to stop encoding to avi but was hesistating because the playback always gave me problems - you made the step i was waiting for (beating AVI :D) - if the results for CD playback are analogue i have had my last AVI encode

unmei
31st May 2003, 13:50
did the CD test : same file off a local sony DVD rom

*BS player performs better than over LAN (less stutter, about same seek time)
*WMP has heavy audio stutter in the critical scenes and seek time is up to 4 sec for seeking back from end to beginning
*Zoom Player - couldnt find a difference to LAN/hd playback. thus fastest seek on CD
*MPC performs a little worse on CD - seek time has increased, mainly for far backward jumps now up to 3-4 sec, playback a tiny few less fluent than over LAN

summary :
over LAN: MPC by far best
off CD : BS player, ZP and MPC could be said equal performance

(PS)
all tests in fullscreen mode (1280x1024 32bpp 75fps TFT)
Xvid decoder: koepi 14.may, no postprocessing
*(the encode codec was 3.may, not 4.may)

HughMagoo
31st May 2003, 14:38
nice!

playing a mkv with xvid, ac3, and two ogg tracks in zoomplayer 3.10RC1. I thought matroska was a little young for multiple audio streams, but using the "audio track" function in zoom, I can easily switch between the three tracks. (edit) oh, didn't notice with this short sample file that the video does indeed restart when changing audio tracks.. oops

thanks.

bring on the bells and whistles! (chapters, menus, etc) :)

DAvenger
31st May 2003, 15:03
Good one, Gabest :D

filewalker
31st May 2003, 16:24
Thanks gabest for your great DSF!:)

Originally posted by HughMagoo
(edit) oh, didn't notice with this short sample file that the video does indeed restart when changing audio tracks.. oopsI also noticed this behaviour in ZoomplayerPro when i switched the Ogg Audio streams...But with latest MPC it works best at the moment...without a new starting of the movie.

...again, really great work!

Cu filewalker:)

gabest
31st May 2003, 17:52
Gooop: I'm exactly 1 person :)

ssjkakaroto: I'll have to debug wmp6 to find out why it is jumping back, but it really does... The fps is not passed in the media type yet because in the test files I used to test this info was missing, but it doesn't have to much importance, the timestamps should keep the playback in sync. Subtitles will get new media types, now only test/ascii is outputted because currently no filter would recognize utf8 or some other format.

unmei: Thanks for the tests! About seeking times and stuttering I have no idea why they are that much different... :) But I know that I managed to save mkvs with vdubmod which had way too many unneeded cue points and those can slow down the opening of the file and the searching of the right keyframe for seeking.

HughMagoo: I think zoom restarts from the beginning after an audio stream switch because it stops the graph to switch the filters and that resets the internal time position of the splitter. Blight could fix it by pausing and seeking back to the last position befor restarting the playback.

ChristianHJW
31st May 2003, 19:40
Originally posted by gabest Koepi: Ok, the muxer should be even easier to make.

:) !

Gabest, how do you plan to find out where the video/audio frame boundaries are ? Dont forget, in MKV :

one frame = one block

if lacing is not used, that way we ensure the files can be edited without codec.

We had plans to introduce a so-called 'DShow compatibility mode' also, in addition to the 'VfW compatibility mode' when transmuxing stuff from AVI, but our Linux peeps protested against that, so we abandoned the idea.

In any case, you are more than invited to talk to us on IRC about this muxer filter, and how you would like to make it, there can be no doubt that if there is any person who can do it, its you ;) ....

Kyo
31st May 2003, 19:58
:eek: I know the trick, you really live in a country with 30h/day :eek:

No enought words to thank you!!! great work Gabest :cool:

faxmactor
1st June 2003, 01:31
Awesome! Actiually, the Matroska DS filter, created by its core developers did not worked since 0.4 on my system (Win98 SE Hungarian), This is the best so far!

Köszi Gabest ;)

Kyo
1st June 2003, 04:16
Bug report (I think :o)

Whe I use your player/DSF splitter the splitter not work with AAC audio(no-audio) like the matroska-group one(pass the audio to a decoder like the one packed with 3ivx), it's me or problem with the splitter?


/MPC report/
Stream 1

Media Type 0:
--------------------------
AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: FOURCC GUID {000000FF-0000-0010-8000-00AA00389B71}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 384000
cbFormat: 18

WAVEFORMATEX:
wFormatTag: 0x00ff
nChannels: 2
nSamplesPerSec: 48000
nAvgBytesPerSec: 0
nBlockAlign: 0
wBitsPerSample: 0

Gaia
1st June 2003, 09:33
I think gabest has not promised his filter to work with aac audio?

vinouz
1st June 2003, 11:31
Great Work Gabest ! Many thanks for tha quick and precise work. (were you a democoder ? ;) )

So, here's a little problem. I've not been following MPC's exact evolution, since I had a version that worked fine for me.
It was 6.4.3.1.
This version works perfectly with mkv files. Sometimes freezes the display, but it's more about my video card driver ddraw acceleration handling.
So,
i tried a three audio tracks mkv (vdubmod 1.5.1.1.a used), the three are plain PCM to avoid further incompatibilities.
It worked perfectly with MPC6.4.3.1
But when I changed to 6.4.5.2 I had the lower half of the video bugged with a kind of green and magenta grid. (sound OK)
Then put MPC6.4.4.2. The video was ok, sound ok, but it froze every 2 1 or 2 seconds of video. Seeking made it unfreeze.
So, back to that good ol'6.4.3.1, as it works best.
my system : Win2kpro french on athlon (tbird) 1ghz.
if you want a screenshot or the video stream, mail me.

Vincent.

P.S. : and then THANKS again !

QQ
1st June 2003, 13:43
I have a short clip, DX50 + PCM audio (my gf singing!;p), I opened that in VDmod, saved as Matroska. WMP6.4 tries to download audio codec (huh), and then plays it without sound, seeking doesnt work. MPC 6.4.5.0 plays it fine, seeking works, no sound though.

gabest
1st June 2003, 14:25
QQ: I fixed the seeking with wmp64 yesterday. It is in the cvs already, just no release build was made from it :P I have yet to test it with PCM. What were its exact parameters? (float/int, freq, bitpersample, channels)

vinouz: Do you also have such probs with other file types or just mkv?

Kyo: I couldn't get the aac samples work either. I read that it has to have the 0xff wave format tag but the aac filter still can't connect it.

faxmactor: Ha jól számolom te vagy itt a harmadik, akiről megtudtam, hogy magyarul is tud :)

vinouz
1st June 2003, 15:51
OK, very strange bug.

In fact it appears it's not due to multitrack, nor to container (!!). An AVI without any soundtrack now does this as well.

The thing is I see MPC try to get hardware acceleration to the front player window, and when I open several windows, only the one getting ddraw acceleration has this problem. So it's probably due to it.
My card is an ATI Xpert98 (based on 3DRage pro GPU). I have directx9. But I think it won't help, as this problem is particular to MPC6.4.5.2, not to my card.

It seems on U and V channels there are like grids (horizontal and vertical regularly spaced lines).
As I see, both channels are sent to the HAL, but then a fixed pattern is overwritten on them.... (the video has lines but isn't bichromic).

Nothing more for the moment.

[edit : after a full redraw (hiding the dshow window), and until the next keyframe, all is OK. And in fact one of the two (U, V) channels at least doesn't change... Exactly, at each keyframe, U or V plane seems to point at a plane taken from the first frame, which doesn't change, but its base adress starts in the middle of the frame.]

robUx4
1st June 2003, 16:40
I've just tested quickly Gabest's filter (latest public build, as I didn't install VS.Net to compile it).

It's a really good piece of work. In a few days you managed something that already works very well (based on existing + working code for other filters). I haven't checked if it would be possible to use libmatroska for the read/write part of matroska/EBML data. That could help you get more access to matroska functions, corrected bugs, etc.

On the down sides, I noticed that you use a lot of virtual memory in your filter (130 MB for Test2 which is 1MB big and 190 MB for a 22MB movie). It may be a problem for computers with a small amount of memory.

I also thought playback from a Windows network wouldn't work, but it's just that loading is slow (like for mkxds).

gabest
1st June 2003, 17:07
It shouldn't use more than a few MBs or less. Are you sure you didn't test the very first one which used to index the whole file?

vinouz
1st June 2003, 17:26
has that a relation to the disappearance of the subtitle filter in the filters list while playing (I already saw it making some SVCD content not playable, but I didn't know its absence leading to problems...)
[edit : and there's an update to my last post too]

[edit : yep ! Using graphedit I removed the subtitle filter from the list and had this problem again !
It's Ogg subtitle filter - where is Tobias ;)]

robUx4
1st June 2003, 17:38
Originally posted by gabest
It shouldn't use more than a few MBs or less. Are you sure you didn't test the very first one which used to index the whole file?

I use "MatroskaSplitter_20030531", ie 1.0.0.1

MarkCoolio
1st June 2003, 18:15
@gabest,
@robUx4,

could u imagine working together and making a super-matroska-filter? i mean you both have for sure done a good job and combining your 2 filters would us get a great filter!

robUx4
1st June 2003, 18:57
Originally posted by MarkCoolio
@gabest,
@robUx4,

could u imagine working together and making a super-matroska-filter? i mean you both have for sure done a good job and combining your 2 filters would us get a great filter!

We already talked together and we are currently doing so on IRC :)

midiguy
1st June 2003, 19:15
Originally posted by robUx4
We already talked together and we are currently doing so on IRC :)
http://www.bbc.co.uk/cult/simpsons/images/quotes/burns.gif
excellent.

gabest
1st June 2003, 19:35
vinouz: It's not quite clear to me what's going on by you. Are you saying when the ogm's subtitle filter _is_ on the filter list you don't have the color problems?

Originally posted by MarkCoolio
could u imagine working together and making a super-matroska-filter? i mean you both have for sure done a good job and combining your 2 filters would us get a great filter! We are exchanging ideas, but having two filters can better than one :)

MarkCoolio
1st June 2003, 19:47
yes but 1 very good filter is better than 2 good filters, or? :)

actually I would like to have only 1 filter 'cos I would not have to test all 2 in order to see for which part which filter is the best.

I hope you can co-operate and either use mkxds.dll or matroskasplitter.ax as source and build up a great filter.

vinouz
2nd June 2003, 01:19
@gabest : exactly. And it seems it's when ffdshow is decoding. I didn't test thoroughly, but it seems with divx decoder filter all goes ok. And with tobias's ogm sub muxer, both decoders work perfect.

BTW, how do you do for the decoding (tried .mkv with 15 tracks. Now it's my new way of comparing sound samples) only happening on the stream selected ? (I mean on CPU load 15 tracks isn't much more than 1)

Vinouz.

gabest
2nd June 2003, 01:40
The switcher blocks those streams when it can. There is no data flowing between the splitter and the switcher for inactive streams.

Lobuz
2nd June 2003, 01:54
I tested these Matroska parsers with resized Matrix trailer at 1440x784 with XviD q3 and Vorbis stereo at ~128Kbit/s. With MPC it was using something about 500MB of system memory, with oryginal parser 50MB. But MPC was more fluent. Anyway ogm was the best. And with proces prioryty RealTime at my athlon 900 with ffdshow was playing fully fluently. But with higher biterate at q2 there are 2 shaky points (biterate goes to 5MB/s).
ps. Is there a possibility to limit max size of frame in XviD? to not rich for example 3 - 4 MB/s

Regards
Lobuz

Kyo
2nd June 2003, 04:47
About memory:

mkv opened with MPC get a PagingFile overhead of ~168Meg and get worse with more audio streams (4 audios muxed ~287Megs)
mkv opened with mplayer2(+gabest splitter) PF overhead of ~20Meg
mkv opened with mplayer2(+reference splitter) PF overhead of ~20Meg but for the multitrack clip only get an overhead of ~40Meg of the paging file

So must be the implementation in MPC

BTW again great work in mpc and matroska! go on gabest

epere4
2nd June 2003, 05:53
As usual, Gabes rocks!!!

Great tool!!

I have one question (it is not really mine, Doom9 asked himself the same thing in the news): What is the meaning of guliverkli?

CU

chros
2nd June 2003, 08:59
@epere4:
>What is the meaning of guliverkli?
perhaps it's a play-on-words: Gulliver (the hero of a tale) + verkli (is barrel-organ in Hungarian)

@gabest: És én ??? :)

vinouz
2nd June 2003, 11:10
and why not Grutaflu ?

Liisachan
2nd June 2003, 13:54
Sugoi!!! (awesome)
My compliments to Gabest-sama

I ve just tested 6.4.5.2 and matroska playback is better than one by the official DSF 0.4.2, tho I cant see subs atm


Originally posted by epere4
I have one question (it is not really mine, Doom9 asked himself the same thing in the news): What is the meaning of guliverkli?

my Hungarian friend is guessing: Gulliver + 'verkli' (hungarian)
verkli = Wurlitzer, an old-style music machine...:)

gabest
2nd June 2003, 16:54
Bad news: I realized my filter has a very bad design for low memory usage :o, good news: I know how to rewrite it :D

Animaniac
3rd June 2003, 01:53
Originally posted by gabest
Bad news: I realized my filter has a very bad design for low memory usage :o, good news: I know how to rewrite it :D

Wow. You're unbelievable, not only did you write the original one in <3 days, but now you're going to rewrite it.

Atamido
3rd June 2003, 03:21
Maybe I shouldn't mention this, but the humor of this is beyond my capability to hold in.Wow. You're unbelievable, not only did you write the original one in <3 days, but now you're going to rewrite it. Bah! I tried out the new version several hours ago, and it works fine. So, not only did it only take him <3 days to write a filter from scratch, it only took a few hours to rewrite it.

gabest
3rd June 2003, 03:36
1.0.0.2 released! This is working a bit different now (internally). Keep the old one too, just in case.

Kyo
3rd June 2003, 04:28
Wow... even a new version of MPC...



remember that sleep *enough* is a good live fact :D :D ;)

Edit: Quick test, great work as always, now the Memory has gone and was a bit lower than the "matroska" filter, now even AAC work!!!

BTW a n00b question, why when I mux an aac + xvid(or other codec) the seek to a non keyframe come with the corresponding "bleeding" and with other audio formats(mp3,ac3,ogg) not?? :o
it's a problem with the muxer(mkvtoolnix-0.4.1) or decoder?

Edit2: Ahh... that means that the internal splitter can be disabled, very good to try the other splitter with the same good player :)

gabest
3rd June 2003, 04:38
Originally posted by Kyo
Wow... even a new version of MPC...Did you read the release notes? :)

Lobuz
3rd June 2003, 04:50
Nice version of MPC. It now eats only about 30MB of Page File Memory for 1440x784 clip. Dropped from 500MB to 30MB - WOW. One strange thing if I set process priority to Realtime it's worse, but with ogm it's better. Maybe it's because Vorbis in ogg container is better handled.

Regards
Lobuz

gabest
3rd June 2003, 05:02
The vorbis decoder fills the audio renderer's buffer very badly (40% at max). You could check the property page of the renderer while playing. There is the "fullness" parameter, if that goes too low bad things can happen.