Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > New and alternative video codecs

Reply
 
Thread Tools Search this Thread Display Modes
Old 4th October 2006, 04:56   #1  |  Link
jaswah
Registered User
 
Join Date: Sep 2006
Posts: 9
Modify Pixel Aspect Ratio in existing WMV?

Hi,

I've encoded a bunch of WMV's, but in my rush to get this done i've stupidly set the Pixel Aspect Ratio incorrectly. What make's me even more special is that i've deleted my input files. So, does anyone know of a way to modify the Pixel Aspect Ratio without re-encoding? If not, should i just re-encode?

Thanks for you help!
Jason
jaswah is offline   Reply With Quote
Old 4th October 2006, 10:35   #2  |  Link
zambelli
Doom9ing since 2001
 
zambelli's Avatar
 
Join Date: Oct 2001
Location: Seattle, WA, USA
Posts: 2,002
Quote:
Originally Posted by jaswah View Post
Hi,
I've encoded a bunch of WMV's, but in my rush to get this done i've stupidly set the Pixel Aspect Ratio incorrectly. What make's me even more special is that i've deleted my input files. So, does anyone know of a way to modify the Pixel Aspect Ratio without re-encoding? If not, should i just re-encode?
This question was asked recently, probably in the container forum. The solution is to add AspectRatioX and AspectRatioY attributes to the ASF file header.
zambelli is offline   Reply With Quote
Old 4th October 2006, 19:41   #3  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,770
is there any tool to change the aspect ratio of the video stream itself being independant of the container used?
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free
bond is offline   Reply With Quote
Old 4th October 2006, 23:50   #4  |  Link
zambelli
Doom9ing since 2001
 
zambelli's Avatar
 
Join Date: Oct 2001
Location: Seattle, WA, USA
Posts: 2,002
Quote:
Originally Posted by bond View Post
is there any tool to change the aspect ratio of the video stream itself being independant of the container used?
Not that I know of.

The aspect ratio information can be stored in 3 different places:
1) VC-1 bitsteam
2) in the WM sample data unit extensions, if ASF is the container
3) in the ASF header, if ASF is the container,

Changing #3 is the easiest if ASF is the container. However, it should be entirely possible to write a tool that sets PAR (and other metadata) in the VC-1 bitstream without the need to recompress the bitstream, much like similar tasks can be done with MPEG-2.
The lower level always overrides the higher level (in this case 1 > 2 > 3).
zambelli is offline   Reply With Quote
Old 5th October 2006, 00:22   #5  |  Link
jaswah
Registered User
 
Join Date: Sep 2006
Posts: 9
OK,
This is completely confusing me, i'm a very basic WME user, are you able to point me in the direction of some step-by-step instructions on where/how to do this, Or what software i can use to inspect these headers?

Thanks in advance
Jason
jaswah is offline   Reply With Quote
Old 5th October 2006, 00:37   #6  |  Link
zambelli
Doom9ing since 2001
 
zambelli's Avatar
 
Join Date: Oct 2001
Location: Seattle, WA, USA
Posts: 2,002
Quote:
Originally Posted by jaswah View Post
This is completely confusing me, i'm a very basic WME user, are you able to point me in the direction of some step-by-step instructions on where/how to do this, Or what software i can use to inspect these headers?
Here's the thread I mentioned:
http://forum.doom9.org/showthread.ph...t=aspectratiox
zambelli is offline   Reply With Quote
Old 5th October 2006, 02:25   #7  |  Link
jaswah
Registered User
 
Join Date: Sep 2006
Posts: 9
Hey,
I've tried doing this but it didn't seem to work. Can you show me where i should be adding the Aspect Ratio properties?

Thanks!
----------------
<?xml version="1.0"?>

<WMBasicEdit >
<Attributes >
<WMENC_QWORD Name="WM/ASFPacketCount" Value="27596" />
<WMENC_QWORD Name="WM/ASFSecurityObjectsSize" Value="0" />
<WMENC_BLOB Name="WM/StreamTypeInfo" >
<![CDATA[7669647300001000800000aa00389b715c0000000000000000000000d0020000400200000000000000000000d00200004002000040420f0000000000801a0600000000002c000000d00200004002000001001800574d563300000000000000000000000000000000000000004cf11a01]]>
</WMENC_BLOB>

<WMENC_LONG Name="WM/PeakBitrate" Value="2900450" />
<WMENC_STRING Name="Title" />
<WMENC_STRING Name="Author" />
<WMENC_STRING Name="Copyright" />
<WMENC_STRING Name="Description" />
<WMENC_STRING Name="WM/ParentalRating" />
<WMENC_STRING Name="Fold6To2Channels3" StreamID="1" />
<WMENC_STRING Name="WM/WMADRCPeakTarget" StreamID="1" />
<WMENC_STRING Name="WM/WMADRCAverageTarget" StreamID="1" />
</Attributes>

<RemoveAllMarkers />
<RemoveAllScripts />
</WMBasicEdit>
jaswah is offline   Reply With Quote
Old 5th October 2006, 07:45   #8  |  Link
Kurtnoise
Swallowed in the Sea
 
Kurtnoise's Avatar
 
Join Date: Oct 2002
Location: Aix-en-Provence, France
Posts: 5,191
Quote:
Originally Posted by zambelli View Post
Not that I know of.
What about MetadataEdit from the SDK ?

Quoting the ReadMe :

Quote:
========================================================================
Windows Application : MetadataEdit
========================================================================

This application can be used to view and edit metadata from Windows Media files.

The various command line options for this sample are as follows.

========================================================================

MetadataEdit <filename> show <stream number>
<filename> show3 <stream number>
<filename> delete <stream number> <attrib index>
<filename> set <stream number> <attrib name> <attrib type> <attrib value>
<filename> add <stream number> <attrib name> <attrib type> <attrib value> <attrib language>
<filename> modify <stream number> <attrib index> <attrib type> <attrib value> <attrib language>

Attrib Type can have one of the following values
0 - WMT_TYPE_DWORD
1 - WMT_TYPE_STRING
3 - WMT_TYPE_BOOL
4 - WMT_TYPE_QWORD
5 - WMT_TYPE_WORD

========================================================================

show displays all the attributes for the specified stream number obtained through the IWMHeaderInfo interface

show3 displays all the attributes for the specified stream number obtained through the IWMHeaderInfo3 interface

delete enables you to delete attributes using IWMHeaderInfo3::DeleteAttribute

set enables you to add or modify attributes using IWMHeaderInfo::SetAttribute

add enables you to add attributes using IWMHeaderInfo::AddAttribute

modify enables you to modify attribute values using IWMHeaderInfo3::ModifyAttribute
Kurtnoise is offline   Reply With Quote
Old 5th October 2006, 09:02   #9  |  Link
SeeMoreDigital
Life's clearer in 4K UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,227
Is there a tool that can add/change the AR signalling of WMV streams placed within the .AVI container?
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 5th October 2006, 10:06   #10  |  Link
zambelli
Doom9ing since 2001
 
zambelli's Avatar
 
Join Date: Oct 2001
Location: Seattle, WA, USA
Posts: 2,002
Quote:
Originally Posted by Kurtnoise13 View Post
What about MetadataEdit from the SDK ?
Good idea! I forgot about that utility. That ought to work. I can't remember whether AspectRatioX and AspectRatioY need to be added to IWMHeaderInfo or IWMHeaderInfo3 so I recommend to Jahway to try both and see which one works in WMP.
zambelli is offline   Reply With Quote
Old 5th October 2006, 10:08   #11  |  Link
zambelli
Doom9ing since 2001
 
zambelli's Avatar
 
Join Date: Oct 2001
Location: Seattle, WA, USA
Posts: 2,002
Quote:
Originally Posted by SeeMoreDigital View Post
Is there a tool that can add/change the AR signalling of WMV streams placed within the .AVI container?
Nope. AVI doesn't really have support for sample extensions, so the AR signaling would have to be stored in the VC-1 bitstream. Clearly VC-1 tools are still in their infancy, so I doubt anything is freely available right now. Sounds like a great dev project for somebody with free time though.
zambelli is offline   Reply With Quote
Old 5th October 2006, 18:26   #12  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,770
yeah, for being container independant it would be great to get a tool that modifies the header of the vc-1 stream to signal the needed par

edit: is it possible to set a par in the vc-1 stream when encoding with wmv9?
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free
bond is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 14:53.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.