Log in

View Full Version : [Tool] WMV Aspect Ratio Changer 1.0 released


crypto
6th October 2006, 21:21
I have made a tool to change the aspect ratio of WMV files without reencoding. It writes the AspectX and AspectY properties in the meta data header as discussed here (http://forum.doom9.org/showthread.php?t=111895) and here (http://forum.doom9.org/showthread.php?t=116663)

Enjoy!


Current version is 1.0, get it here (http://dvbportal.dyn1.de/download.php?file=wmvarchanger-1.0.0.zip)

Kurtnoise
6th October 2006, 22:29
Does it works with VC-1 streams or it is the same tool like MetadataEdit ?

zambelli
6th October 2006, 22:42
Does it works with VC-1 streams or it is the same tool like MetadataEdit ?
AspectRatioX and AspectRatioY are ASF attributes. Crypto's tool will only work on ASF containers. It doesn't touch the VC-1 bitstream.

nixo
7th October 2006, 04:06
Many thanks for this. While MetadataEdit.exe works well for certain attributes, I've had no luck trying to add (or modify) AspectRatioX or AspectRatioY. Just kept getting error messages.
This tool, however, works very well for me, so thanks again.

--
Nikolaj

mrcorbo
7th October 2006, 05:01
This is very useful since last I checked Nic's Encoder couldn't set the PAR. Thanks.

bond
7th October 2006, 12:45
moved

SeeMoreDigital
7th October 2006, 16:19
Errrrrm.... Not to sound too ungrateful.

But is there a chance future builds could include support for changing the AR signalling values of WMV streams placed within the .AVI container?


Cheers

zambelli
7th October 2006, 18:40
But is there a chance future builds could include support for changing the AR signalling values of WMV streams placed within the .AVI container?
Of course I can't speak for Crypto, but what you're asking for is a completely different ballgame. With any container other than ASF, you'd have to change the AR signaling in the VC-1 bitstream. You couldn't just add "AspectRatioX" to the the AVI RIFF header because the AVI source filter wouldn't have a clue what to do with it. :)

crypto
7th October 2006, 23:30
Exactly like zambelli says, that's completely different.

I am not even sure what needs to be done. To me it looks like Data Unit Extensions are required on every sample, thus requiring the whole stream to be rewritten.

mgh
11th October 2006, 14:46
tried it-it sets PAR not DAR

zambelli
11th October 2006, 19:36
tried it-it sets PAR not DAR
Only PAR is supported in WMV.

SeeMoreDigital
11th October 2006, 20:08
Okay... thanks for the confirmation ;)

Jay Bee
15th October 2006, 03:33
http://img222.imageshack.us/img222/4987/ilikest1.png

daniel.aam
24th November 2006, 17:37
Unfortunately this doesn't actually work on a WMV file, yes it changes the metadata object [can check in asf view] , but the display is exactly the same PAR as it was previously.
There must be another parameter that is changeable surely?

crypto
24th November 2006, 17:42
The player has of course to honor the meta data for this to work. The XBox360 dashboard player does not. It is a confirmed bug.

daniel.aam
24th November 2006, 17:45
I was referring to WMP.

crypto
24th November 2006, 17:54
With WMP it works 100%. What do the file properties in WMP say?

jaswah
4th February 2007, 23:29
hey
i just wanted to say a massive thanks to crypto for this.... it's allowed me to encode heaps of wmv's using avs files in apps other than WME, and i'm very happy!
so thanks again for the generous offering!
jason

adam.fred
26th March 2009, 06:04
Sorry to raise this thread from the dead but I have been investigating the PAR metadata values AspectRatioX and AspectRatioY in the WMV container. I have had a need to change these values on a hundred or so files.

It is interesting to me that MS sdk sample MetadataEdit.exe does not succeed in modifying these attributes. Did it work once with WM7/9 and was disabled because of WMV script secuirty holes?

Well the wmvarchanger from crypto does work but only for single streams. On mulitbitrate streams only the first stream is modified.

I am still left with a task ahead. To modify the sdk sample app to work properly and modify the metadata values. Anyone pursued this? Or to hexedit the streams - this is the probably the way is done by wmvarchanger - I suppose this way will work without pain but what will be learned :)

Electric_Soul
28th May 2009, 09:05
thanks dude....works like a charm

Videogamer555
13th April 2011, 09:58
No it does NOT work. Here's my situation.
I have a video output from Windows Movie Maker with a custom profile for 720p (1280x720). Now it does to this correctly, but there's a problem. Windows Media Player plays it at 4:3 ratio, not 16:9. So I decided to look up changing the header and found your page. Then I got the program and tried it. I thought I saw what the problem was, there's no entry at all for the aspect ratio, so I added it using the program and put it to 16:9. But when I play it in WMP it still plays it at 4:3 ratio and still reports 4:3 displayed aspect ratio.

Your tool was made many years ago. The tool probably doesn't work with the latest revision of the WMV standard. Therefore your tool as it exists is an EPIC FAIL.

Please remake the tool to work with modern WMV files. Thanks bye.

SeeMoreDigital
13th April 2011, 15:56
When you divide 1280 by 720 it equals 1.77777 (ie: 16:9). So you need to set "X" value to: 1 and the "Y" value to: 1


Cheers

a1s2d3f4
21st January 2012, 06:19
Need to put in 32 27, not 16 9. Read the readme.

Also, is there a command line version of this tool?

trodas
28th January 2013, 19:15
Thanks for this nice tool. It works on Win 2000 SP4. However I having a hard time to make the change recognized at all. I tried to fix obviously wrong aspect ratio and failed. No matter what I enter there, the video show up as 720x480 pixels in size. While I set using the WMVARChanger the 4:3 AR, it does not comply at all. Funny thing, when I choose the 4:3 AR in the player, it works as it should and the vid look as it should - 720x540 pixels.

Tried then also entering values like 1:1, 5:4, 16:9 and 32:27... and no change at all.

Possibly could be, that BSplayer v1.41 ignore the AR settings. True. So I tried the Media Player Classic, version 6.4.7.5 and even with crazy value like 1:2 did not seems to have any impact at all. Okay, still old? Perhaps. So I tried the Media Player Classic version 6.4.9.0 and finally there is some change! When I enter crazy value 3:4 (yes, 3 for X and 4 for Y), then finally the movie seems to be "at default" right looking. It does not play at 720x540 by default, tough. It scale down to 640x480 by default, but the AR is correct that way even on fullscreen.

Hence the tool is proven to be working, congratulations!

...now just why VirtualDub v1.10.3 (build 35390) ignore the AR completely and insist on 720x480... weird :)

SeeMoreDigital
28th January 2013, 19:31
...now just why VirtualDub v1.10.3 (build 35390) ignore the AR completely and insist on 720x480... weird :)
As far as I'm aware, VirtualDub does not support 'Aspect Ratio Signalling'. It displays 'native pixel' resolutions only.

trodas
7th March 2013, 10:39
True, looks like that this is asking too much for the VirtualDub, to support the AR... Maybe a good time to ask for this feature, if that can be implemented...

Anyway, a little OT question, but... still... do exist a AVI tool for AR change...?

Videogamer555
9th August 2014, 09:18
Unfortunately, Windows Media Player does not honor those Aspect Ratio tags in the WMV file, as saved by this tool. The player is made by Microsoft. The file format and the associated specs (such as what are valid metadata tags) was made by Microsoft, so you'd think it would honor it, but it does not. Unless these tags have been depricated, and replaced by some other tag (or these tags were intended to be used in concert with another metadata tag that would command WMP to honor these aspect ratio tags), it seems that there may be a bug in WMP. I know that right away VLC player honors these tags without any other changes to the WMV file.

I'm hoping someone else here knows how to fix this problem in WMP, as it is my primary way of playing Microsoft format video files (WMV files). Is there something in an options menu? I prefer to use a Microsoft player when playing a Microsoft video file (because they are both made by the same company, they should work best together). So I really don't want to have to use VLC player whenever I'm playing a WMV file who's display aspect ratio (DAR) is different from its stored aspect ratio (SAR = framewidth / frameheight)

filler56789
9th August 2014, 12:14
@Videogamer555: which version of WMP are you talking about? :confused:

foxyshadis
13th August 2014, 02:43
WMP doesn't care about the aspect ratio tags. It's up to your decoding directshow or DMO filter to deal with that, and it sounds like you have a broken one.

D.IKE.E
10th February 2019, 16:42
When I enter 4:3 for a 720x576 WMV8 file the file gets 5:4 (shown by MPC). Why the hell? 16:9 results in 20:9...5:4 results in 25:16
What am I supposed to enter to get 4:3 ??? 3:4 becomes 15:16 btw *facepalm*

/edit: ok this shid needs the PAR and not DAR and SAR calculating mathematics crap as explained here (http://www.komeil.com/blog/change-mp4-aspect-ratio-mp4box). I got 1.06666... as result and since the first google result with a calculator didn't get me the solution I tried to divide every numbers until I got to 16/15 which is 1,066666 and THAT was the number the tool needs.

SeeMoreDigital
10th February 2019, 20:11
So everything is okay when you enter 16:15?

D.IKE.E
10th February 2019, 20:49
Yes, MPC then says it's 4:3
Next time I search for a tool that calculates the pixel aspect ratio (PAR) out of video size and display aspect ratio (DAR)

SeeMoreDigital
10th February 2019, 21:03
Try this little app: ARS Calulator (https://www.sendspace.com/file/p6zbht)