Log in

View Full Version : My Windows Media 9 Encoder


Pages : [1] 2

Nic
16th September 2002, 11:12
Here's my quick attempt at a Windows Media Encoder. It takes .avs files as the input & is a bit easier to setup. & hopefully it might work on Win98 (??)

http://nic.dnsalias.com/WMNicEnc.zip
(21kb)

You will need the Windows Media 9 codecs, you will have got these if you have Windows Media Player 9 or Windows Media Encoder 9 installed. If you dont have them installed then download & run:
http://nic.dnsalias.com/wmfdist.exe
(3.7mb)

Hope it works ok for you & helps with testing of the new WM codec.

Cheers,
-Nic

zulu
16th September 2002, 13:12
hey nic,
many thanx!

finally i can test an avs with wm9.
your tool looks very promissing.

a few questions though:

- what does "quality" in the video options mean?
- the quality textbox in the vbr frame is always enabled, even if i don't select quality vbr. is this a bug?

i'll run a test now. thanks again.

Nic
16th September 2002, 13:17
Quality sets the percentage quality of the encode. Always have set to 100% unless you are getting dropped frames at low bitrate.

The second point is probably a GUI bug :D

Good luck with it :)

Cheers,
-Nic

trbarry
16th September 2002, 17:47
Nic -

Very extremely cool!

If this allows me to go right from HDTV to WME on my Win/Me box it will be a real gem.

Thanks,

- Tom

atracus
16th September 2002, 17:59
Nic,
great work, but...

a. how can I feed (via avisynth) 6x wav's or 1x ac3 to the encoder? is there a particular syntax which you'd suggest to me? I know how to mux a single .wav, but I have no clue on how to do it for Multichannel 5.1 encoding... of course it's possible with MS WMEnc, but NOT with AVISynth.

b. concerning the "VBR Options" form: does the "Use VBR" flag + "Uncostrained" refer to Video only, or to both Video and Audio? My point, you see, is that I'd like to use Uncostrained on both of them (with the 5.1 channels output).

thanks in advance

[atx]

mtrooper
16th September 2002, 19:08
Very nice and when it gets 5.1 support it's gonna be great!

Btw: offtopic for this thread, really, but: is there any way to mux wm9 audio+divx 5 or am I wishing for something unreachable?

Nic
16th September 2002, 19:48
The 5.1 audio is something im interested in too, ill have to look up how to do that though...

WMA is quite VBR even in CBR mode, hence cant be used in AVI files. But maybe WMA9 is proper CBR & can be used (?) Someone needs to test it, but I very much doubt its true CBR.

Unconstrained only deals with the video VBR mode & means that there is no ceiling bitare used when encoding in VBR mode (i.e. if it thinks it need 2Mbit to encode the scene it will use it, even if you've specified an average of 600k)

Cheers,
-Nic

mtrooper
16th September 2002, 19:53
I did test 192kbit 5.1 CBR audio. Muxed it with divx 5.02 and well, result is interesting: first few seconds all is great and then it's strating to get out of synch. I shall test it more when I find some more time to do it, for now I'm was just wondering if anyone else did mux it.

huch
16th September 2002, 21:43
I haven't tried this yet, but for those who's interested in 6 channel WMA9Pro with this tool, you can try to encode video with this tool and audio with WME9 separately and use "Windows Media Stream Editor", part of WME9, to mux them.

Dali Lama
17th September 2002, 06:03
Originally posted by Nic

You will need the Windows Media 9 codecs, you will have got these if you have Windows Media Player 9 or Windows Media Encoder 9 installed. If you dont have them installed then download & run:
http://nic.dnsalias.com/wmfdist.exe
(3.7mb)


So are you saying that I don't NEED WMP9 or WME9 to encode and playback WM9 files? That's awesome...but I think I'm wrong.

Bye,

Dali

-h
17th September 2002, 06:18
Wmfdist.exe contains some files that aren't actually needed - I dare say all you'd have to do is install the WMFSDK.inf file to enable encoding/decoding. That avoids installing the DRM stuff that's in there too.

Of course if you want the DRM stuff, you can install the drm.inf file which will give you such wonderful additions as "blackbox.dll". Then again I'm not sure whether the WM9 codecs will function without the DRM stuff, but I'd sure hope they would.

I'd experiment on this, but would rather not have it playing around on my system until I have it ghosted.

-h

Shamballa
17th September 2002, 06:49
mm how wmv calculate bitrate ? if i put 1200 i have i file whose done only 175 kilo....

Nic
17th September 2002, 09:04
@-h: You'll scare people now :) Nice thought though, ill rip out all the WMV stuff from the archive and try & test what you can & cant have to get WM9 working.

@Dali:
Yup you only need install the codecs (wmfdist.exe), you can then playback & encode without installing the player/encoder. Unfortunatly Windows Media Player 6.4 doesn't like playing back WMV9, so I highly recommend Gabest's Windows Media Player Classic :)

Cheers,
-Nic

Koepi
17th September 2002, 09:11
Nic!

What's up with "the other GUI", did you build a version which runs without sse2 now? ;)

Btw., nice work on wm9encoder - I'd really like it if it's just a smaller installr necessary for the wm9 dlls...

Regards,
Koepi

Nic
17th September 2002, 09:27
Well really weird as it is:
http://nic.dnsalias.com/WMF9.zip

is huge! at 4.7mb its far bigger than the normal wmfdist.exe but its got the same & less files in it! I dont know quite how that works, but still. I dont know how to make it much smaller than that :( (I suppose WinRAR would do the job) (uploading a 3mb WinRAR 3.0 version now: http://nic.dnsalias.com/WMF9.rar )

I hope this archive works, its basically the codecs without the DRM DLLs inside. Hopefully youll still be able to encode without them.

Cheers,
-Nic

ps
@Koepi:
I havent touched that little project in a while. Ill try to today :) & send you the code (ps if you want the code to WM9 Enc as well ill send that along too)

Koepi
17th September 2002, 09:39
Do you think WM9 could use a 2pass mode, too? (isn't the "normal" wm9 encoder 2pass by default?) I can try to add that, but I'm not quite sure that we get the info necessary for that without finding the right hooks like nando did with divx3...

Thanks for your great work and efforts, Nic, as usual your work is highly appreciated!

Best regards,
Koepi

EDIT:
It could be possible to write a NSIS installer for those dlls, Nic. There the compression is very nice as well, it should perform as well as rar - and it would be easy to install... If I only could eMail yu and won't get a connection timeout with your mail-host, I'd send yu an example where I built such an installer from a .inf file :-/

Nic
17th September 2002, 09:45
Theres the Use MultiPass Encoding button at the bottom, this does two passes (if used with the right codec settings)

Unfortunatly I dont think you can make a specialised two pass version...which is a real shame :(

Cheers,
-Nic

ps
I hadn't noticed yoru edit :) Hmmm, yup a NSIS would be good, Id have to find a computer here without WM9 on to test it as it is for now.
(You can always use nic @ everwicked.com as well :) )

Koepi
17th September 2002, 09:55
I'm sorry, scratch that,m I just searched my HD and found that I deleted the .nsi already as everything worked fine and no further tweaks were necessary (it was the source for dx81-yuv-fix, installing huffyuv that way it "replaces" msyuv.dll in the registry).

But you can see that in the xvid nsis script as well how to do that, it's just a little "unoptimzed" for pure dll installing yet.

Sorry for the bad news,
best regards,
Koepi

majerle
17th September 2002, 11:13
Hi all
I installed wmf9.rar and wmfdist.exe, the gui and video are fully functional ( opened in wmp, xp version) but i can't hear any sound, i tryed almost all sound combinations (btw i can only choice windows media audio 9,acelp.net, wma 9 voice, wma 9 pro, wma lossless).

Windows media player at file proprierties say audio codec: unknow

Any tips ??

Below in my avs

# PLUGINS
LoadPlugin("D:\Divx\2Pass\Autodub1.3\SOFTS\AVSFILE\MPEG2DEC.DLL")
#
# SOURCE
Clip=Mpeg2Source("D:\Divx\Vob\superman.d2v")
#
# CROPPING
Clip=Crop(Clip,0,72,720,432)
#
# RESIZING
Clip=BilinearResize(Clip,544,224)
#
# FINISH
return Clip

P.S. : Awesome codec, Superman at 544*224, but without (?) audio come 625mb (2h,25m), vbr quality 100

Nic
17th September 2002, 11:18
Wheres the audio coming from in your AVS file?!? Try reading through the readme.txt & that should give you an idea of what you need to do.

-Nic

majerle
17th September 2002, 11:46
Sorry I am a little stupid !:scared:

this avs is ok !

LoadPlugin("D:\Divx\2Pass\Autodub1.3\SOFTS\AVSFILE\MPEG2DEC.DLL")
#
# SOURCE
a=Mpeg2Source("D:\Divx\Vob\superman.d2v").Crop(0,72,720,432).BilinearResize(544,224)
b=WavSource("D:\Divx\Vob\superman.wav").DelayAudio(-0.88)
AudioDub(a,b)


And the movie great !

thanks again

Andres Zanzani

sirbender
17th September 2002, 15:57
Wie veraendere ich die WMFSDK.inf damit es auch auf Windows NT 4 laeuft ??? Microsoft hat doch mit Absicht verhindert, dass man von WinNT4 updaten muss - kann mir einer helfen - oder vielleicht mal ein kleines Testfile irgendwo uppen welches mit wmv9 encodiert wurde, damit ich meine player(6.4) draufloslassen kann ???

Gruss sirbender

Koepi
17th September 2002, 16:29
AGAIN a german post from you!

STOP it.

Koepi

sirbender
17th September 2002, 16:51
I am working in the UK at the moment and sometimes don't recognize if people are writing in english or german, so I just answered in one language without thinking about it...no offence meant.

sirbender

chris25fr
17th September 2002, 23:22
no problem but you are in an english section :)

griff30
18th September 2002, 07:06
I didn't understand why everyone was getting so upset over his post in German. I didn't know there was a German section of the forums till I looked around.
Still, it makes me feel great that a pastime hobby of mine, is so wide spread, that there are brothers of many nations comming together to help each other out and to enjoy the comoradery!

Nic
18th September 2002, 11:25
But anyway ;) To try & answer his post.

Doesn't the codec install on WinNT 4? I can try that out tomorrow to see if it works ok. Also Windows Media 9 (video) will not play on Windows Media Player 6.4. Try downloading another player (Windows Media Player Classic etc. )

I can post a little clip if people want of WMV9 for testing tomorrow.

Cheers,
-Nic

sirbender
18th September 2002, 13:18
Yes please post a wmv9 clip - the problem is I am working on a computer most of my time where WinNT4 is installed and everything is perfectly configuered. It isn't my descision to install another OS on this computer and I should at least have a good reason, instead of : oh, my Wmp9 won't install or I can't playback wmv9 files...
It would be a pity if I have to install Win2000 or XP just to get this feature, since wmv9 is technically not much similar to wmv8, which runs perfectly with wmp6.4 and WinNT4. It is only a way of Microsoft of forcing people to buy new updates. First Directx support stopped years ago (directx3, or 5 beta are the last releases) and now no support for wmv9 files...I bet MacOSX will be supported soon - so why do Apple user get Access to it and not WinNT4 users ???
Probably some of you say, shut up and update to Win2000 - problem is my hardware works perfectly with WinNT (not Win2000 or XP - tested it, misterious crashes)...moreover everthing in my system runs smoothly and took very long to configure it that way.
So it is just a matter of energy people want to put in it - I mean the XP-register-shelter was soon cracked, because there were many people interested in it. So what if you would present Directx8.1 for WinNT4 or WMP9 for WinNT4 ??? it would be definetly a shock for Microsoft (will probably never happen because not many people are interested in it).
Because M$ wants to make more and more money the release every 2-3 years a new OS, with many new mostly unwanted and unstable features - instead of staying with the old OS, improving it during many years with many new updates and service packs...anyway I believe I said enough...

Thanks for listening,

sirbender

int 21h
18th September 2002, 13:38
Originally posted by sirbender
Yes please post a wmv9 clip - the problem is I am working on a computer most of my time where WinNT4 is installed and everything is perfectly configuered. It isn't my descision to install another OS on this computer and I should at least have a good reason, instead of : oh, my Wmp9 won't install or I can't playback wmv9 files...
It would be a pity if I have to install Win2000 or XP just to get this feature, since wmv9 is technically not much similar to wmv8, which runs perfectly with wmp6.4 and WinNT4. It is only a way of Microsoft of forcing people to buy new updates.

Microsoft is a business. Each day the business has costs associated with running. They have to pay a programmer to write those updates that you think should be 'free'.


First Directx support stopped years ago (directx3, or 5 beta are the last releases) and now no support for wmv9 files...I bet MacOSX will be supported soon - so why do Apple user get Access to it and not WinNT4 users ???

Again, Microsoft is a business. If they see business prospects in marketing to Apple and making their product available to Apple, that is their right.


Probably some of you say, shut up and update to Win2000 - problem is my hardware works perfectly with WinNT (not Win2000 or XP - tested it, misterious crashes)...moreover everthing in my system runs smoothly and took very long to configure it that way.
So it is just a matter of energy people want to put in it - I mean the XP-register-shelter was soon cracked, because there were many people interested in it. So what if you would present Directx8.1 for WinNT4 or WMP9 for WinNT4 ??? it would be definetly a shock for Microsoft (will probably never happen because not many people are interested in it).
Because M$ wants to make more and more money the release every 2-3 years a new OS, with many new mostly unwanted and unstable features - instead of staying with the old OS, improving it during many years with many new updates and service packs...anyway I believe I said enough...

You're referring to a time in the Windows code repository when the consumer core (DirectShow, ActiveMovie) was completely seperated from the NT core.

I can assure you that DX8.1 for NT4 is quite impossible. Most of the API aren't even there. (Hence a version for Windows 2000 and a version for 98/98SE/ME)

sirbender
18th September 2002, 13:57
Microsoft is a business. Each day the business has costs associated with running. They have to pay a programmer to write those updates that you think should be 'free'.

Come on - they pay the programmer and make loads of profit even after that. Moreover I want to pay for these updates ! I only have a problem, that they don't stick with an OS and add new features in the form of modules, which would everthing more relyable. Instead everytime new unstable drivers, you can't use old hardware because of incompatibility, and you always have to install the new OS configure it etc etc...very time consuming and not really necessary. And in the end I only waste much timeworring about my OS instead of using software running on this OS - very annoying and inefficient.


You're referring to a time in the Windows code repository when the consumer core (DirectShow, ActiveMovie) was completely seperated from the NT core.

I can assure you that DX8.1 for NT4 is quite impossible. Most of the API aren't even there. (Hence a version for Windows 2000 and a version for 98/98SE/ME)

But why was it seperated ??? I.e. Directx 5 was developed and worked, but never released because some analyst told M$ to stop support and make more profit by forcing people to buy the next version of the OS...by the way when it come to companies it sometimes pays off if you think in a larger scale - make customers trust in you...I mean why are so many people running toward Linux. I like the WindowsNT OSs and I believe it is a little bit cheap, not to allow people to watch/play a certain file format (wmv9) thats ridiculous...

sirbender

int 21h
18th September 2002, 15:14
There are no conclusive statistics that support the migration argument on the desktop market. (i.e. There maybe as many people running away from Linux as there are running to it.)

In fact, back in July, there was a prominent Slashdot reference to a guy that posted about his experience switching from Linux back to Windows XP. (After trying 3-4 distros for a few years).

The article is now 404 and not in any caches. It had some good points though.

int 21h
18th September 2002, 15:22
In any event, Microsoft originated in a 'free' country, and to that end they have the freedom to market their new codecs and formats on whatever Operating System they choose. (Even if its C64 or OS/2)

Nic
19th September 2002, 08:44
BTW:

Multichannel support (5.1 etc) is only available on WinXP exclusively at present. I was trying to code support for it yesterday, but couldn't test it as I dont have Win XP (& ill be damned if im going to install it :) )

So they'll be no 5.1 support for WMNicEnc at present. If anyone else would like to add it the source will be available soon & the example to look at in the SDK is called WMVRecompress that shows a bit of code for Multichannel & SmartCompress

Cheers,
-Nic

rui
19th September 2002, 09:17
Nic, i want to apologise for my post in the xvid forum about wm9. It was misplaced :(

I just got curious about wm9 capabilities.
I already downloaded your wm9 encoder, and will give it a shoot as soon as i have some comp problems solved. ;)

Nic
19th September 2002, 09:25
LoL Not at all, it was ok to post that there, but it does really belong here thats all :)

I hope you get on with my encoder ok. The tip I gave of setting the codec to:
1) Windows Media Video 9
2) Set the bitrate to what you want (i.e. 700000 for 700kbps)
3) Set the VBR mode on, & set the mode to constrained
4) Then turn on max bitrate & set it between 2-3 times the amount of the main bitrate (i.e. I use 2.5 so the max bitrate would be: 1750000)
5) then turn on multiple pass encoding & set the audio options you want

That should provide a reasonably (i hope) precise sized file with good quality (alot better than CBR).

Cheers,
-Nic

rui
19th September 2002, 10:50
Ok, thanks for the tips :)
I will try that.

mkanet
19th September 2002, 19:54
Nic, thanks for the great tool. I have a couple of questions i'm hoping you can help me with.

1) In the Video Options, there is a place to enter bitrate. At the bottom, if I select VBR "Quality=100%", what video bitrate will I have in the final encoded video? How does that differ from VBR "Unconstrained=100%"? In the WME UI if I select VBR "Quality", the bitrate options are not available.

2) I'm confused when I see people mentioning that they have have VBR AND 2-pass enabled. I heard that 2-pass (from Microsoft) is not necessary for VBR and should mainly be used for constrained bitrates. In fact, it will hurt the quality instead of help. Am I missing something?

Below, is the AVS script I'm using which seems to be working so far (encoding not finished).

Thanks in advance!

LoadPlugin("Z:\Utilities\AVIsynth\MPEG2DEC.dll")
LoadPlugin("Z:\Utilities\AVIsynth\decomb.dll")
#
#
a=Mpeg2Source("Z:\Utilities\Process_Video\video.d2v").Decimate(cycle=5).BilinearResize(856,480)
b=WavSource("Z:\Utilities\Process_Video\videoAC3.wav")
AudioDub(a,b)

Nic
19th September 2002, 20:08
Thanks for the feedback.

In VBR mode when it just says "quality" then that is a normal quality setting...in the (un)constrained modes I think the quality option is not used...ill have to test that.

I'm confused when I see people mentioning that they have have VBR AND 2-pass enabled. I heard that 2-pass (from Microsoft) is not necessary for VBR and should mainly be used for constrained bitrates. In fact, it will hurt the quality instead of help. Am I missing something?

Could you point me to where you've read that? Was it about WM9 or the WM8 etc. You could well be right I guess, but the profiles have changed quite a bit since WMV7/8. Im doing the fifthelement at present for 1CD. using constrained 2pass VBR. Ill let you know how it turns out.

If you know of any place where they've done anymore testing of the settings with WMV please let me know :) Ive only got the cr*ppy SDK documentation to go by.

Cheers,
-Nic

mkanet
19th September 2002, 20:36
Nic, see 'amirm" from MS's posts at the following AVSForum thread: http://www.avsforum.com/avs-vb/showthread.php?s=&threadid=171590 I am pretty sure I understood him wrong since in know that the WME "Help" specifically mentions that constrained VBR REQUIRES 2-pass.

Most importantly, I am NOT able to select 2-pass. If I do, your utility stops encoding after 1-2 seconds. I have a feeling it's my AVS script which is preventing this. Perhaps you may know better than me why I cannot use 2-pass when it is needed for contrained VBR. Maybe, you could offer the simplest way to do this. You can see my settings below. My AVS script is mentioned above.

Thanks for your help!

http://www.mka.net/nic'swme.jpg

mkanet
19th September 2002, 20:48
My Bad. I figured it out. I need to multiplex the audio AFTER I use your utility with video only (2-pass) VBR Constrained (as mentioned in a previous post). Plus, I will be able to add multichannel audio.

Perhaps, later there may be an easier way to do this. But this isn't bad at all. I will report my results.

Nic
19th September 2002, 20:58
Weird, though, that should have worked fine, my current setup is set just like that. Ill try your exact settings tomorrow & see if I get the same problem.

Yup, looks like ill have to upgrade to WinXP & setup a 5.1 system to my computer. Im hoping someone will volunteer to add it in.

Ill post back tomorrow....

Cheers,
-Nic

ps
I think it might be todo with the VBR Quality used on the audio, ive never tried that yet so I might have made a bug, if you get chance try setting it to something like 256kbps VBR and see if it works... Thanks for all the good feedback :)

Sarreq Teryx
20th September 2002, 04:07
how about a version that isn't reliant on AviSynth, or at least can build it's own AVS

teplun
20th September 2002, 07:31
I use your encoder to encode a film which length is 2,5 h. The encoding started yesterday evening and it is still running (now about 18 hours). I used multipass mode but not VBR. Does it really take so long?

rui
20th September 2002, 08:38
In spite my comp problems, i made a small test with Nic's encoder (without the audio, but with multipass and VBR, in fact i used the settings Nic adviced some post back), and windows media 9 really is a lot more slower than, for example, divx5 or xvid. It toke almost the double time to encode a trailer than it used to with those two codecs. But your encode is really taking too long. Did you tried using any of the other codecs with that movie, to compare speed?

Anyway, Nic' encoder worked very well :)
It gave me a little undersized file, but not by much. And i could try to optimize the settings to get the perfect filesize.

But i wont :D

Windows media 9 smooths too much for my taste. For smoothing, i would stay with divx5 which is a lot more faster. Just MHO, of course.

Nic
20th September 2002, 13:04
Well it took ages to do my encode last night (a one CD of the fifth element)...And it came out surprisingly good, hmm? will have to test that one again with XviD to see how it does too.

Cheers,
-Nic

mkanet
20th September 2002, 17:02
My encoding ran all night and I think it's only 3/4 done with 1 PASS!!! And no audio processing. LOL! This is for 45 mins video. I'm doing decomb:decimate / bicubic resize (1280x720->856x480).

Nic or anyone, have you tried to use WME9's built-in inverse telecine / resize? Perhaps that would take considerably less time to do.

atracus
21st September 2002, 08:27
Originally posted by mkanet
Nic or anyone, have you tried to use WME9's built-in inverse telecine / resize? Perhaps that would take considerably less time to do.

I used internal deinterlace + crop + resize on lotr, average fps was 6 on 1st pass and 5.8 on 2nd pass on 1GHZ Athlon.

Quality of decombing was flawless.

I forgot: audio was 6x .wav coded into Theater Multi-channel (192k 44kHz 5+1 VBR), muxed on the fly since (I tried with various small samples) muxing streams fails with 5.1 audio and goes regularly async + stuttering after the 1st keyframe (i.e. "x" secs after the play beginning, "x" being the keyframe interval you set in "Compression"). This didn't happen with regular 96Kb VBR Stereo: muxing with Stream Editor worked fine.

[atx]

Nic
21st September 2002, 09:13
Hmm, thats a good point, I wonder if thats part of the WMEncoder or the codecs, if its the codecs ill try to add it into my little encoder...

-Nic

atracus
21st September 2002, 10:21
Originally posted by Nic
Hmm, thats a good point, I wonder if thats part of the WMEncoder or the codecs, if its the codecs ill try to add it into my little encoder...

-Nic

please do ;)

mkanet
22nd September 2002, 07:16
Okay, my encoding finished after 13 hours.

Now I have a question. I'm using Windows Media Stream Editor to mux the .wma(128Kbps) & .wmv(2Mbps) files together. How come the output file size is SMALLER that the source .wmv file itself? Isn't it's file size supposed to be the sum of both files put together?