View Full Version : My Windows Media 9 Encoder


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?

-h
22nd September 2002, 08:49
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?

My guess is that the streams are of different durations, and a significant amount of video is being clipped.

Sure sounded funny the first time I read it though.

-h

BiaTch 5.0
22nd September 2002, 12:18
have a question, how the hell do you predict the final file size?

Nic
22nd September 2002, 19:52
Well with a bitrate calculator, but using VBR it can be a little, hit and miss :( But if you follow what I stated about using constrained VBR (& setting max bitrate to about 2.3x the normal bitrate)..it should come out ok :)

Cheers,
-Nic

Stebet
25th September 2002, 01:12
Does anyone know if WM9 uses 1024 or 1000 bits in a kbit? It seems that not all codecs use the same definition of this (think DivX uses 1024), but since it's kilobits it seems logical that 1kbit = 1000 bits.

mkanet
25th September 2002, 01:18
I am having a problem with Windows Media Stream Editor. When I mux a wmv and wma file with this utility, the final file will have parts of the video get stuck, wile the audio continues to play. This is consistent for me every time.

Nic
25th September 2002, 09:04
Thats strange mkanet, could be to do with different buffer size windows or something I'd guess, I was thinking about trying to make a muxer.

Ive added the IVTC & Deinterlace functions to my encoder, the 5.1 Audio though is still a little way from being done.... :(

-Nic

trbarry
27th September 2002, 12:52
I am having a problem with Windows Media Stream Editor. When I mux a wmv and wma file with this utility, the final file will have parts of the video get stuck, wile the audio continues to play. This is consistent for me every time.


Dunno about WME but some decoders/players will use the timestamps in the audio to keep the stream in sync. This means they will drop video frames when they get behind and don't have enough CPU. But if you drop enough frames but keep the audio going then you could get similar symptoms to what you saw.

- Tom

Nic
29th September 2002, 15:10
new version with the IVTC & deinterlace options (as well as source code) can be found at http://nic.dnsalias.com

-Nic

trbarry
4th October 2002, 22:30
Hi Nic -

Just a bump to thank you for your efforts here. I just started to test making moderate bit rate HDTV samples. Pretty impressive so far.

And since I don't intend to upgrade to XP soon this is a quite a nifty and useful tool.

- Tom

lat3ralis
5th October 2002, 00:26
@mkanet:

I get the same problem when i mux the audio + video with wm9 stream editor. I'm not entirely sure, but i think i managed to fix it. I think it may have something to do with the indexing ...

Try opening the muxed file in WM9 File Editor and then go File -> Save and Index.

See if that works,

lat3ralis

amirm
2nd November 2002, 17:46
Nic, let me add my thanks to Tom's for writing this tool too. While I can't officially endorse all of its uses :), I do appreciate your effort in creating a tool that answers many people's questions.

Commenting on some older replies regarding encoding speed, WMV has multiple "complexity" settings which trade off quality for speed. There is an 8:1 encoding speed difference between the fastest and slowest modes. I think you lose about 20% of the quality at the fastest setting. So you may want to expose this flag so that people can opt for either encoding method (I seem to recall we had 4 settings for this). As a way of reference we can encode into DVD resolution in *real-time* on a dual CPU 1.7Ghz P4 system.

Also, we have made a few bug fixes which should improve encoding quality over beta in the RC release that just came out. Nothing huge mind you, but it may be worthwhile to retest with the latest SDK.

Thanks,
Amir
Microsoft

Kyo
3rd November 2002, 06:19
@Nic, you always code very usefull things, keep up the work!


@amirm, nice to see a MicroCoder ;) in the Forum! This is real support! thanks man.

RadicalEd
3rd November 2002, 06:37
first a Real developer and now someone from MS
doom9 is just too cool for words :cool:

philippas
3rd November 2002, 11:52
@Nic
After installing wm9codecs without the drf stuff i get the following error:
The procedure entry point WMCreateWriter could not be located in the dynamic link library WMVCore.dll

I'm using WinXp sp1.

Any ideas why i get this error ? Is it the service pack ?

Nic
4th November 2002, 10:30
@amirm:
Thanks amirm :) Oh & BTW get nikki in Reading to get her act together & send out that recruitment info ;) (j/k)
(I will expose that flag, I must have missed it)

@phillipas:
I take it that a restart of the computer didnt help? Ill try & make a new one with the new SDK.

Cheers,
-Nic

RadicalEd
4th November 2002, 22:25
Reading? I live in Reading
it's in the US though :/

The Belgain
6th November 2002, 15:08
I've tried installing the WM9 codec (for playback) from Nic's site, but it doesn't seem to work. WMP6.4 just searches for the codec (ettempting to downlaod an appropriate one), mplayer Classic says error rendering file, and BSPlayer says unknown file format.]

I tried both WM9.zip, and the exe too.

I'm running Win 2k Pro, dunno is this is a problem.

Now that microsoft seem to have produced another decent codec, do you think we'll be seeing a hack to allow it to be used in any container, and possibly allow a Nandub-like utility to interface with it? DivX 5.11 alpha anyone?

slavickas
6th November 2002, 19:01
Originally posted by The Belgain
I've tried installing the WM9 codec (for playback) from Nic's site, but it doesn't seem to work. WMP6.4 just searches for the codec (ettempting to downlaod an appropriate one), mplayer Classic says error rendering file, and BSPlayer says unknown file format.]

I tried both WM9.zip, and the exe too.

I'm running Win 2k Pro, dunno is this is a problem.

Now that microsoft seem to have produced another decent codec, do you think we'll be seeing a hack to allow it to be used in any container, and possibly allow a Nandub-like utility to interface with it? DivX 5.11 alpha anyone?

wimp6.4 can't play wmv9 videos (special m$ tricks i guess)
wimp8 on xp with codec from Nic's site or wimp 9 of course can play

griff30
7th November 2002, 08:14
Originally posted by The Belgain
Now that microsoft seem to have produced another decent codec, do you think we'll be seeing a hack to allow it to be used in any container, and possibly allow a Nandub-like utility to interface with it? DivX 5.11 alpha anyone?
You can use The older Flask to make backups if encodeing is what you mean. There is a small utility at DivX Digest that allows you to select Windows media audio and video output and in the old Flask it works like a champ! Now if that utility called WMCreator can be made to work with Flask, I dont see why It cant be made to work with Nandub or VirtualDub. As fas as "any" container, I don't think we will be legally allowed to turn this codec into a ".avi" codec if that is what you mean.
I would like to see a few more encoding engines allow output to windows media. Maybe an easy one like Vidomi or VirtualDub.

OntzA
7th November 2002, 12:08
@griff30

It can't be used with Virtualdub or Nandub because they use VFW and there's no VFW support for last windows media codecs. You must use a program that uses DirecShow.

And about the container... you can add windows media audio stream to OGM using graphedit, I have tried to mux video stream, it works but it doesn't decode, at least using Media Player Classic. It says there isn't any directshow filter to decode it. I have to try decoding using graphedit to see if there's any DS filter combination.

But as I have said before, you can't use that video or audio stream with virtualdub or nandub.

Edit: You can also mux wma stream to avi, using Avi Mux DS filter(again with graphedit, I love this tool! :D ), but it has sync problems.

tiki4
7th November 2002, 12:10
Off topic:


Sorry for asking that but why does M$ prevent 5.1 playback of WMA 9 Pro in all other Operating Systems except WinXP? I just cannot understand what's the reason for that.

To clarify: All 5.1 WMA 9 Pro streams are downmixed to stereo if they are not played on Windows XP.

Is this only marketing or are there any real technical reasons?

tiki4

bizcobailey
31st January 2003, 15:29
Nic,

Thank you for a wonderful decoder -- this greatly simplifies the WM9 encoding process.

I was hoping that a future version would contain a preference file (.ini) that could remember the settings of particular encodes, much like that of GKnot. Even if the WMEnc could retain the settings of the last encode would be terrific. I've been encoding Futurama DVDs, and I use the same settings for every episode.

I do have one question. I've been using Windows Media 9 for video (with 192KBps, 48Khz VBR audio) utilizing MultiPass Encoding. I have set my Bitrate to 1000000 and VBR to "Unconstrained" -- I'm looking for the best quality encode regardless of file size. What I don't understand is why every encode I make comes out to 188MB. While this is much lower than any of my Futurama encodes with DivX 5.02, I don't get why it always comes out to the same file size. Shouldn't using "Unconstrained" VBR make the file size vary? I'm very new to Windows Media encoding, so please treat me like a 5 year old. ;)

Again, thanks for WMEnc. It's a great tool.

Cheers,
RW

Ariakis
22nd February 2005, 02:35
What about a CQ mode? If I'm not mistaken, doesn't the WM9Encoder allow you to specify quality-mode for video? Basically, pure VBR like the audio quality mode...

fozzieb
22nd February 2005, 10:26
Move on, nothing to see here

slavickas
22nd February 2005, 16:21
Originally posted by Ariakis
What about a CQ mode? If I'm not mistaken, doesn't the WM9Encoder allow you to specify quality-mode for video? Basically, pure VBR like the audio quality mode...

click on "Use VBR" ? ;)

Ariakis
22nd February 2005, 20:49
Originally posted by slavickas
click on "Use VBR" ? ;)

It still uses the "Bitrate" field as a target bitrate. I'm looking for constant quality. It's possible with the MS Encoder, but I need AVS input.

ntropy
2nd August 2006, 21:09
I've been doing WMV9 encodings for a few days now which have gone fine, but the latest was a file that was 1 hour and 49 minutes long and the audio cut out at the 1 hour 34 minute mark. This took 6 hours to encode.

Is there a limit to how long audio and video can be encoded together?

diogen
2nd August 2006, 21:36
Is there a limit to how long audio and video can be encoded together?No.
Something must be wrong with the original.

Diogen.

ntropy
2nd August 2006, 21:40
No.
Something must be wrong with the original.

Diogen.

The audio plays fine from the AVS file in media player classic, so what could be wrong?

diogen
3rd August 2006, 05:33
What type of file is it?
What is the graph?

Diogen.

ntropy
3rd August 2006, 08:54
What type of file is it?
What is the graph?


Quicktime DVcam file using the QTSource.dll plugin to read it.

diogen
3rd August 2006, 15:37
When you drop the file onto GraphEdit, what does the graph look like? This is exactly how WME selects filters/decoders.

Try to play the file in GraphEdit, does it have errors around the time encoding drops audio?

Diogen.

ntropy
3rd August 2006, 18:57
When you drop the file onto GraphEdit, what does the graph look like? This is exactly how WME selects filters/decoders.

Try to play the file in GraphEdit, does it have errors around the time encoding drops audio?

Diogen.

The graph looks like this:
http://img367.imageshack.us/my.php?image=day11graphli1.jpg

Graphedit has no errors around the time of the dropped audio.

diogen
3rd August 2006, 22:19
Hmmm...
Don't know what else to look at..
To eliminate the particular place, can you try to encode a short clip (couple minutes)
using WME by setting Mark In/Out before and after the offending time?

Diogen.

ntropy
3rd August 2006, 23:09
Hmmm...
Don't know what else to look at..
To eliminate the particular place, can you try to encode a short clip (couple minutes)
using WME by setting Mark In/Out before and after the offending time?


I encoded the same portion (last eleven minutes) and it went fine. Maybe it's a glitch that only occurs after encoding has gone on for a long time.

diogen
4th August 2006, 14:51
WME can be very picky in terms of splitters, audio/video decoders and such. But I never had problems you describe. If it manages to start encoding, it always finishes.

To make it very artificial, load this file twice into the list of files to encode.
Take the first half from the first file in the list and the second half - from the second (using Mark In/Out).
Pick "Roll Over" in the drop down menu.

Diogen.

ntropy
4th August 2006, 16:23
To make it very artificial, load this file twice into the list of files to encode.
Take the first half from the first file in the list and the second half - from the second (using Mark In/Out).
Pick "Roll Over" in the drop down menu.


I don't see this drop down menu in Nic's WMEnc v1.00 Alpha encoder nor the ability to load multiple files.

I just encoded another file and the audio cut out again at around 1h33m. I'm trying again using "Windows Media Audio 9.1" instead of "Windows Media Audio 9.1 Professional".

diogen
4th August 2006, 17:32
I didn't know you use Nic's encoder.
I was talking about MS' front end.

Diogen.

ntropy
4th August 2006, 20:43
I didn't know you use Nic's encoder.
I was talking about MS' front end.

I thought Nic's was the only way to do AVS files. And I thought this thread was about Nic's encoder.

zambelli
4th August 2006, 22:45
I thought Nic's was the only way to do AVS files. And I thought this thread was about Nic's encoder.
You can do .avs input with WME9. You can even do command-line encoding with http://forum.doom9.org/showthread.php?t=111633.

ntropy
5th August 2006, 05:29
You can do .avs input with WME9. You can even do command-line encoding with http://forum.doom9.org/showthread.php?t=111633.

I get an error with WME (Version 9.00.00.2980):



The file "L\:DAY14.AVS" is not a valid source file. It may have an unsupported or invalid format or may be corrupted.

No such interface supported
(0x8004002)

Enter a different file name before continuing.


I thought the whole point of Nic's encoder was to support AVS files which were going unsupported.

Nic
5th August 2006, 13:50
My encoder was about making things easier to use and less bloated than WM9Encoder...

...WM9Encoder can encode AVS. But, AFAIK, it uses DirectShow to render the file, and is therefore dependant on what DirectShow filters a user has installed. I can't remember the precise details on what is needed to make it work, but a search of the forum should help if your interested.

(My encoder uses old style Win32 AVI API to load the AVS and not DirectShow which tends to be more reliable in this instance)

-Nic

zambelli
8th August 2006, 01:21
ntropy and Nic,

The WME9 AVS support issue is described in the post that I linked in my reply to Ntropy. WME9 relies on an internal AVI source filter to read AVS and fails due to its inability to retrieve Duration attribute from the AVS source.

The issue can be bypassed in the GUI encoder by specifiying "Both Device and File" as source, or in the command-line encoder by using the updated wmcmd.vbs, once again provided in the linked post.

ntropy
11th August 2006, 17:57
ntropy and Nic,

The WME9 AVS support issue is described in the post that I linked in my reply to Ntropy. WME9 relies on an internal AVI source filter to read AVS and fails due to its inability to retrieve Duration attribute from the AVS source.

The issue can be bypassed in the GUI encoder by specifiying "Both Device and File" as source, or in the command-line encoder by using the updated wmcmd.vbs, once again provided in the linked post.

Nic's encoder is easier to use for my purposes. WME9 seems to hang a lot:

Hanging application wmenc.exe, version 9.0.0.2980, hang module hungapp, version 0.0.0.0, hang address 0x00000000.

wiak
5th December 2006, 05:49
nice, good work
any progress on 5.1 support?
am trying to convert a 1920x1080 h264 with AAC 5.1 to 1920x1080p wmv with wma 5.1 but it dosnt want to :rolleyes:
it decodes and everything in graphedit

|> CoreAVC Decoder > Video Render
1080p.avs - |
|> CoreAAC Decoder > Audio Render

CoreAAC (outputs 6ch) & then FFDShow can transcode but not into wma :(

meybe something like this

1080p.avs - |> ffdshow (input aac / same as input / output LPCM 5.1) > nic wmenc > 5.1 wma
or
1080p.avs -|> coreaac (output 6ch) > nic wmenc > 5.1 wma

or something, havnt tested it yet, hehe, encoding 1080p h264 to 1080p Windows Media Video 9 Advanced Profile (VC-1)

and can you add progress in % and current/lastframe
like this: Encoding 50%, 5000/10000
and dont forget!, estimated filesize

dlflannery
6th January 2007, 06:22
@zambelli
Will WME9 actually accept mpeg2 inputs ???
I and many others can't get it to, although the documentation says all you need is the right codec. I've tried several codecs including the NVIDIA one, which didn't work so I uninstalled it. My mpegs play fine in WMP and GraphEdit. The rendering chain is:
video: splitter->Cyberlink Video SP Decoder SPDVD7->Video Renderer

audio: splitter->AC3 filter->Default Direct Sound Device

However after a long delay with high CPU usage WME9 crashes. When I use the command line version it spits out a slew of messages such as this:
==============
ContextException thrown by BaseCertificate::GetField [.\BaseCertificate.cpp:903]
with context
Field
MPEG_2_1
not found in certificate
C:\Program Files\Common Files\Roxio Shared\Certificates8\SDMX35.rxc

The NCBENUM return code is: 0x0
The NCBENUM return code is: 0x0
The NCBENUM return code is: 0x0
The NCBENUM return code is: 0x0
The NCBENUM return code is: 0x0
===========================
All of them refer to Roxio. I have Roxio EMC9 installed but as you can see from the rendering chain, the codecs are not used (they have low merit assigned.)

I even tried unregistering the Roxio MPEG2 codecs and I still got these messages. Are they the problem or just incidental?

I have other ways to get my mpeg2's into wmv's but I would like to make wme9 work the way the docs say it should.

Thanks

Toti
12th February 2009, 07:58
First time I use the encoder, I know that its been around for quite a while but now is when I have started using it.

1. When I set "VBR options" and check mark "Use VBR" it seems that the quality settings does not respect the bitrate set and it shoots to 59 Mbps.

2. if I set VBR but change it to "constraint" or "Unconstraint" the video looks terrible and bitrate is around 500Kbps.

3. Is there anyway to use good old "Average bit-rate" and "Max Bitrate" ?

Help is appreciated.

benwaggoner
15th February 2009, 20:33
First time I use the encoder, I know that its been around for quite a while but now is when I have started using it.
First off, read this:

http://on10.net/blogs/benwagg/Best-practices-for-Windows-Media-Encoder-in-2009/

1. When I set "VBR options" and check mark "Use VBR" it seems that the quality settings does not respect the bitrate set and it shoots to 59 Mbps.
Quality VBR? That's quality limited, without any bitrate control.

2. if I set VBR but change it to "constraint" or "Unconstraint" the video looks terrible and bitrate is around 500Kbps.
You presumably set it to 500 Kbps average? What's your frame size and content?

3. Is there anyway to use good old "Average bit-rate" and "Max Bitrate" ?
That's VBR Constrained mode.

Note you can use VBR Constrained for both Video and Audio in Windows Media.

Toti
18th February 2009, 01:56
Thanks @Ben Waggoner. :thanks:

I was too vague on my question. Let me elaborate a little.

TARGET: .wmv inside Windows 7 "Movie Library". I chose wmv file since it is the only format that everything works inside Media Center natively (FF,RR,Slider,Tags,Hardware Acceleration).

SOURCE: Blu-Ray & DVD.

Avisynth Scripts:

DVD 4:3
LoadPlugin("C:\Program Files\DG MPG Decoder 1.5.4\NicAudio.dll")

loadplugin("C:\Program Files\DG MPG Decoder 1.5.4\DGDecode.dll")

LoadPlugin("C:\Program Files\DG MPG Decoder 1.5.4\Decomb521.dll")

video=MPEG2Source("C:\Users\Admin2\Documents\Movie.d2v")
audio=NicAC3Source("C:\Users\Admin2\Documents\Movie.ac3",6)
AudioDub(video,audio)
BicubicResize(640,480)

Telecide(1,guide=1,vthresh=0)

Decimate(cycle=5)

FieldDeinterlace(Full=False,threshold=15,dthreshold=9)

Blu-Ray "Assuming MPEG2 & AC3"
LoadPlugin("C:\Program Files\DG MPG Decoder 1.5.4\NicAudio.dll")

loadplugin("C:\Program Files\DG MPG Decoder 1.5.4\DGDecode.dll")

video=MPEG2Source("C:\Users\Admin2\Documents\Movie.d2v")
audio=NicAC3Source("C:\Users\Admin2\Documents\Movie.ac3",6)
AudioDub(video,audio)


My old way of encoding wmv's.
1. Encoding to VC1 (CineVision) -> Solveig ASF Muxer -> Mux with Windows Media Stream Editor
2. Encoding to WMV (MainConcept Reference) -> Solveig ASF Muxer (needed) -> Mux with Windows Media Stream Editor

New Way of encoding wmv's.
1. Nic's WMNicEnc 1.0.2 Beta
2. Windows Media Encoder 9

Any of the last two ways to encode produce either the same quality as Mainconcept or better. Now I noticed that "VBR Quality" at 94% or 95% is ideal since they produce (to my eyes) a transparent encode to the original.
I understand that size is unknown since it depends on the complexity of the video.

My original question was using Nic's Encoder (Awesome By the way) be used by setting the average and max bit-rate. You already answered that...thanks. Even though I still set it constrained it does not respect my values and produces a video really low quality but never mind. I'll stick to quality 94%~95% (think is more effective than VBR with ave/high settings).

New question, does Nic's WMEnc uses the same encoding engine as Windows Media Encoder?

If wmv using VC1 produces such an Excellent quality and is FREE encoder why do people use MKV, MP4, TS or M2TS? when this works natively with Windows. I guess I'll put that question on another part of the forum since I want to know other peoples opinion.