Log in

View Full Version : Setting 16:9 flag?


Guest
13th March 2005, 23:17
Is it possible to set 16:9-flag into a avs file?(or what ever it is called) To be read by players and automatically changed to 16:9.
Tin2tin

stickboy
13th March 2005, 23:47
AVI files (and by consequence, AviSynth scripts) have no such flag.

Wilbert
14th March 2005, 00:12
AVI files (and by consequence, AviSynth scripts) have no such flag.
Some of them do, either in the container itself or in the videostream (XviD).

I guess it should be possible to pass that info to AviSynth?

stickboy
14th March 2005, 01:07
Well, it might be possible to pass that information to AviSynth, but it wouldn't be possible to pass it out, since it's codec-specific data, and AviSynth exports decompressed video.

lamer_de
14th March 2005, 08:31
What would be the purpose of this feature? If you want avisynth filters during playback, you could always use ffdshow. If you want to pre-process, just filter the unaltered sourceframe and use a container that supports anamorphic playback.

CU,
lamer_de

Wilbert
14th March 2005, 10:28
What would be the purpose of this feature?
The only purpose I can think of is that AviSynth-resizers could use that info. But stickboy is correct of course.

Guest
14th March 2005, 11:19
Ex. Media Player Classic reads this "flag" from a file and ajusts the ratio automatic accordingly. It doesn't have a 19:6 cli.

So it could be nice if I could tell the player what ratio the avs file should be played as.

actionman133
14th March 2005, 12:31
if you just mean that you want to input an avi, and output 16:9 for either avs playback, or to save with the corrected, then just add this line at the end of your srcipt:

NewWidth = Video.Height * 16 / 9
Video = Video.Resize (Video.NewWidth, Video.Height)

use whichever resizer type you like, obviously, as well as replace Video with the variable name you use for your clip. compression tends to be best with Bilinear.

if you want to save the video in anamorphic (squashed) mode, and have it restored in playback, then that would come down to the codec you save it with.

vinetu
14th March 2005, 21:24
Originally posted by stickboy
AVI files (and by consequence, AviSynth scripts) have no such flag.
Inspired by that ,I did a quick test with Adobe Premiere 6.0 (May 27, 2002).
You can create a 16:9 avi file and the flag (it's there regardless of used codec) will
be read correctly in the latests versions of Premiere Pro and After Effects...
Is that illegal(the use of that flag)?...
Or may be there is a new revision of the avi container specs?

The flag is located in the end of the avi file:
Latest 6 bytes of the 3:4 avi file in hex - "...03 00 00 00 02 D0"
Latest 6 bytes of the 16:9 avi file in hex - "...04 00 00 00 02 D0"

Best Regards!
edit: Forget to mention - both files are 720x576 (PAL,D1)