View Full Version : On WMV9, matroska, and transmuxing
systemloc
18th June 2003, 18:26
I have a few goals that I would like to know the possibility and feasibility of.
I would like the ability to transmux WMV9 in the WMV container (as well as other codecs if possible) into other containers. AVI is no longer suitable as it does not handle all of WMV9's features, so transmuxing to matroska would probably be preferred. It is essential that this be done without recompressing the stream. I'm hoping that, on the completion of gabest's filter, this would be possible using graphedit. I've tried testing this by transmuxing a CBR WMV9 stream to AVI, but cannot do it successfully. Graphedit wants to decompress the stream before passing it to an AVI muxer or writer. That's disheartening.
I wonder how to encode with WMV9 without using the VCF if possible using graphedit. I have done it using the VCF compressor, but even then, the settings are apparently inaccessible.
Finally, on occasion, I encounter AVI/Divx files with VBR MP3 sound that have horrible sync problems. Is it possible to fix this by using VirtualDubMod to driect stream copy the audio and video into matroska and then re-syncing it manually? How else might I obtain a fixed clip in a matroska container without recompressing?
gabest
18th June 2003, 18:51
It can be done. I just tried to transmux the pinball sample from windowsmedia's homepage today and it worked.
systemloc
18th June 2003, 19:56
Absolutely beautiful! I was fearful that transmuxing would be difficult because it was not possible for AVI as far as I could tell. With your matroshka muxer, I successfully transmuxed several WMV9 test files. This is delightful!
The ease with which this is now possible makes my second question irrelevant. Encoding can be done into wmv and transmuxed into mkv.
I haven’t messed with transmuxing and resyncing divx/AVI files, but that is next on my list.
Gabst, you’re a kick ass coder, you should be making stacks of cash with skills such as yours!
gabest
18th June 2003, 20:15
There can be a little prob with transmuxing. If virtualdub gives you a warning when opening an avi, you can be sure that it is not transmuxable in dshow. The avi splitter filter doesn't set the timestamps on the audio samples, and it is only good for playback in that form.
ChristianHJW
18th June 2003, 20:37
This is incredible !
systemloc
19th June 2003, 01:39
From my understanding, the timecodes are what allows the streams to maintain sync, yes? So when transmuxing an AVI with graphedit, there are no timecodes, so sync is probably going to be lost?
hmmm, is there some other way to rip the compressed audio stream from an AVI and then mux it together in graphedit? Perhaps a different AVI demuxer?
gabest
19th June 2003, 01:47
There are timecodes usually. Only those avi files are suffering from this prob which were (mainly) produced by nandub, because it uses some trick to mux vbr mp3 into avi, and this confuses the avi splitter.
systemloc
19th June 2003, 05:57
Ahh, I see. Completely understandable as people should not have put VBR audio into AVI in the first place! It is easy enough to re-sync audio skewed for such a reason with VirtualDub.. but VirtualDub does not support matroska. I'm assuming that re-syncing audio is still possible in VirtualDubMod.. I transmuxed such an AVI which had audio sync issues before I mucked with it. It plays fine in MPC, but instantly crashes VirtualDubMod. In any case, thank you for such a powerful tool!
EDIT: hmmm... is it just me or is VirtualDubMod's mkv support extremely crash prone?
Atamido
19th June 2003, 14:43
Edit: I didn't quite say it right. Read what Suiryc wrote below for a better comment.
Suiryc
19th June 2003, 18:56
There shouldn't be problems (except the files break AVI specs :p) with AVI files containing MP3 VBR. Since in this case (Nandub trick) each chunk contains one and only one MP3 frame (and VirtualDubMod takes this into account).
There may be some out-of-synch issues with AVI files containing MP3 VBR muxed as CBR. In this case it's better to either :
1. Use Mosu's tools which examine the stream on-the-fly when remuxing/transmuxing and thus will take care of frame boundaries.
2. Demux the MP3 track from the AVI and use this external source when remuxing/transmuxing your clip in VirtualDubMod.
@systemloc:
What tool did you used for transmuxing the clip that crashes VirtualDubMod ? VirtualDubMod, mvkmerge or Gabest's filter ?
And did you use the CVS bugfix release or the initial 1.5.1.1a version ? (the initial version shouldn't be used anymore for mkv files and will likely to crash with files made by tools using recent Matroska specs)
systemloc
19th June 2003, 19:28
@Suiryc
I was using the initial 1.5.1.1a version. I'll get the CVS update and try again. The files that crashed it were produced in graphedit w/ gabest's filter, and also one made with VDmod itself. VDmod could not open the one made w/ gabest's filter at all, and crashed during playback on the clip made using VDmod.
Could you post a method for demuxing an MP3 stream from an AVI? I've tried graphedit but with little success, and it seems VD only wants to output WAV, not the MP3 stream.
ChristianHJW
19th June 2003, 20:14
Originally posted by systemloc Could you post a method for demuxing an MP3 stream from an AVI? I've tried graphedit but with little success, and it seems VD only wants to output WAV, not the MP3 stream. [/B]
If you set audio to 'direct stream copy' you will get an MP3 file, but with a .wav extension in normal Virtualdub. In latest VirtualdubMod goto the 'stream' menue and simply demux your MP3 with a right click on it ....
SeeMoreDigital
20th June 2003, 12:54
Just a thought!
Would it be helpfull to split the audio and video steams of the WMV9 file (files with a .wmv extension) first. If so this can be done very easily using one of M$ own tools, the 'Windows Media Stream Editor'.
If one of the goals in this post is to be able to obtain the raw data from a video stream and convert it to a codec of choice. I'm very interested where this post could go!
systemloc
20th June 2003, 19:04
@SeeMoreDigital
I explicitly did not want to know how to convert WMV9 to another codec for two reasons.
1 Many on the forum consider WMV9 to be a codec of choice, thus I want to use it as an end, not convert out of it.
2 There are so many how-to's on the internet already demonstrating how to do this.
@ChristianHJW
Stupid me.. I didn't realize that VD would output MP3, just named wrong. Also, I did find the stream menu in VDmod. Excellent.
SeeMoreDigital
20th June 2003, 20:35
systemloc, I apologise.
I too like the quality of WMV9 in both its variants (.wmv and .avi). It's just a shame it takes so long to encode the darn things, again into both its variants.
However, can somebody please explain to me, why it is, when I encode the exact same source file to both an .wmv and an .avi file (with the same file sizes), that the .avi file runs much better on lower spec PC's?
I was quite surprised the other day, when I found out I could play an WMV9 .avi file on a 350Mhz P2 but the WMV9 .wmv file, on the same PC, stammered all the time.
I know it's off topic but may be of interest to some people.
systemloc
21st June 2003, 06:12
That's very interesting. I checked w/ Graphedit, it seems the same decoder would be used for both AVI and WMV files, so that's not it. Perhaps post-procesing only runs if it is a wmv file? Try turning off post-processing and see what happens? It is a registry hack to turn it off available in other threads about WMV9.
Now all I need is WMV9 in matroska support for OS X....
Atamido
21st June 2003, 06:56
Originally posted by systemloc
Now all I need is WMV9 in matroska support for OS X.... I'm afraid we can't help you there... It may be able to clean your house and fix your car, but Matroska can't perform miracles.
SeeMoreDigital
21st June 2003, 12:24
Well if it can 'clean your house' I'm all for it! Perhaps matroska should be renamed, Stepford Wives!
Ok, I'll encode some WMV9 (.wma) files without post-processing and see what happens.
Cheers
systemloc
21st June 2003, 15:10
no, pre-processing is done during encoding.. post-processing is done during playback.. see, when you watch the video, it gets passed through some filters and stuff that are supposed to make it look better on playback. Normally, like with divx, you can adjust the settings for these, as they take a bit of processor power and may over smooth the video. With WMV9, though, it always has it on and doesn't have a nice way to turn it off. I'm figuring that perhaps the post-processing only happens when it is an actual WMV file, though. I may be wrong. See the decoder may get hung up on the file being an AVI and not perform the post-processing, thus putting less load on the processor during playback. You might check this by finding the registry setting that turns post-processing off and then test playback. You won't need to re-encode to do that.
\HKEY_CURRENT_USER\Software\Microsoft\Scrunch\Force Post Process Mode
This is a DWORD value. The valid value is from 0 to 4, 0 being turning off post filter and 4 being the strongest. If the value is outside this range, the decoder will use the automatic mode to decide the post filter strength.
WMV9 in matroska on OS X ought not be a far fetched goal.. WMP is avail on OS X, so it probably supports WMV9 in a WMV file.. Just need to figure out how to get at the decoder and link to it from mplayer. They do that often enough on a PC for linux..
SeeMoreDigital
21st June 2003, 18:30
Sorry I meant to say: -
" Ok, I'll playback some WMV9 (.wmv) files without post-processing and see what happens".
And after doing what you suggested, I am happy to report an improvement during playback. However, it's still not as fluid as an WMV9 (.avi) file.
I wonder if anybody else has any ideas?
Maybe not many people have experianced this anomoly because they only play back their encodes on their own 'speedy' systems.
But it would be logical to assume that if an WMV9 (.avi) file can play back more smoothly on a lower spec system, then the encoded file requires far less system resorce than it's WMV9 (.wmv) equivalent. Which also means that the WMV9 (.avi) file should 'stream' better. Which is totally contrary to M$'s claims regarding it's WMV9 (.wmv) codec.
Very strange!
systemloc
21st June 2003, 20:56
The problems related to streaming have nothing to do with the ability to playback with little proccessor usage.. The problems associated with streaming are do to the organization of the file format and the overhead of the format.. For example, if information vital to playback is stored at the end of the file, it would be impossible to stream with that format because the entire file would need to be recieved before it could play. I believe that is verbatim one of the problems with streaming AVIs. Rember also, MS expects you to have the latest greatest everything for their bloated software. Notice you'll rarely see MS make claims about speed or efficiency.
Also, are both files on the harddisk? What prog are you using for playback? Same for each? Are you testing both at the encoded resolution? When you drag the window bigger, it must scale each frame to the window size, which takes more power. If you scale one and not the other, it could make the scaled one skip.
You might try making a new thread just on that to get more exposer.
SeeMoreDigital
22nd June 2003, 13:11
Thanks systemloc. I do seem to have taken over this thread..... but in answer to your questions. Both files are identical in MB size, pixel size, frame rate. The only thing that is different is that one of them has an .avi file extension, with Mp3 audio @ 96kbps and the other has an .wmv file extension, with .wma audio @ 96kbs.
Both encodes are stored on separate CD-R's and on my file server. And, I've tried playback using M$ WinMedia Player9 and Media Player Classic. But for some reason the .avi encoded file does run much better than the .wmv!
Maybe a new thread would reveal some more info on the subject.
Thanks again
Atamido
22nd June 2003, 16:40
Render both files in GraphEdit, and then delete the audio renderer for each file. Play both of them, and see if there is any difference. Issues with the audio renderer can definately cause issues as we discovered with Matroska and OggDS.
SeeMoreDigital
22nd June 2003, 17:46
Pamel,
Yes, I thought the audio might be the culprit. So I created a series of 5 min 'video only' encodes (inc. DivX and XviD). But it did not make much difference WME9 .avi still played better.
This is a strange one!
Maybe somebody else could have a go at encoding the same chapter from an DVD and creating a WME9 .avi file and a WME9 .wmv file.
Oh, I forgot to mention. The DivX and XviD encodes were not as smooth as the WME9 .avi either!
Atamido
23rd June 2003, 06:02
What if you transmux the content of the WMV into MKV?
SeeMoreDigital
23rd June 2003, 11:55
Hi systemloc and Pamel
I have to make an admission here............. I am not using matroska at the moment.
I did have it installed a few months ago but after my system crashed I have'nt got round to re-installing it.
Now please, don't all scream at me at once, as I know that's the purpose of this thread!
I'm going to install matroska right away. Just as soon as I create another boot partition on my drive!
systemloc
24th June 2003, 02:04
Sure thing. I wish I had thought of that.. You got how to transmux from WMV to matroska? Also, it might be interesting to transmux from both the AVI and the WMV and see if the playback is the same in both cases. Perhaps it is something in the encoding. Also, are you using the VCM codec to make the AVI? If so, output might not be the same and may be causing what you see.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.