View Full Version : Widescreen info in AVI ?
MrDarcy
28th April 2003, 11:34
Hi, I hope this is the right forum, otherwise please address me elsewhere.
I have a Kiss DVD player and, like every other player, it "sends" to my TV-set the command to switch to widescreen format when it playback an anamorphic DVD.
Is this possible with an AVI file too?
I mean, is there a way to put the Display Aspect Ratio information (16:9) within an AVI file so that a player could recognize it ? Now I set my TV manually, but it'd be nice if this could be done by the player without my intervention.
Bye!
ChristianHJW
28th April 2003, 12:27
AVI in itself doesnt have this flag, but you can have it in the MPEG4 codec header. Only problem here is, as pointed out by Milan Cutka ( FFDshow and FFvfw author ), that DirectShow has to know the AR flag before building the playback graph, and unfortunately the standard AVI parser filter will not allow to read any data from the MPEG4 codec header before the graph is actually built ( catch 22 ).
The Linux guys are not limited here and are actually already using the AR flag in their XviD and FFMPEG encodings, at least mencoder does support non 1:1 ARs already in AVIs, but again, these can not be played on Windows for the reasons mentioned above.
Milan was suggesting a workaround, i.e. to store the AR flag in the AVI comment fields, but this was ( another ) hack.
The matroska container, long awaited AVI replacement, has such a flag and the matroska parser will be able to pass it to the DirectShow graph building app ( player ) before it is build.
MrDarcy
28th April 2003, 13:07
Well, AFAIK the Kiss player is a Linux box, so there is a hope it could detect this flag from the MPEG4 header. It doesn't have to cope with DirectShow issues, but it's also possible they didn't care about this flag in a Divx.
But, to make a try, how can I set this flag when encoding a Divx ?
If there are no programs able to do this, I could also force it with an hex editor, but I need help to find the right location.
Thanks!
ChristianHJW
28th April 2003, 17:14
The KiSS DP 450 player is basing on the Sigma Designs EM 8500 MPEG4 decoder. This chip can be programmed on µCLinux, a Linux derivate specifically made for microcontrollers, so for sure it was possible to implement the reading of the AR flag.
AFAIK most of the MPEG4 decoding of the KiSS player was taken from the original MPEG4 decoder implementation coming from SIGMA, and i recently read that they were concentrating on DivX3 ( MPEG4V3 ) playback as well as implementing GMC and Q-PEL. I have no idea if the unit does support reading the AR flag in the MPEG4 codec header.
To test, get your hands on a Linux box with latest mencoder and make a MPEG4 AVI with a modified AR flag, and you'll know.....
MrDarcy
28th April 2003, 21:30
Thank you very much for your info, Christian.
The GMC is already supported by the latest firmware version of the Kiss player. I think they're now working on the 3.11 because this is the most requested feature.
I'll try to ask Kiss support about the AR flag....
Bye!
MrDarcy
2nd May 2003, 15:23
Originally posted by ChristianHJW
To test, get your hands on a Linux box with latest mencoder and make a MPEG4 AVI with a modified AR flag, and you'll know.....
Christian, I just read the mplayer and menconder have been ported under Win32. Tonight I'm going to try.....
Originally posted by MrDarcy
Christian, I just read the mplayer and menconder have been ported under Win32. Tonight I'm going to try.....
Where did you read that?
MrDarcy
2nd May 2003, 20:46
Here at Doom9's forums:
http://forum.doom9.org/showthread.php?s=&threadid=52335
^^-+I4004+-^^
2nd May 2003, 23:03
darcy,i have another question on my mind for some time,and i saw this thread,and it's kinda related (kinda-sorta stuff..heh)
will i be able to play 480x576 divx(of any sort) in your player with proper AR (obviuosly player then needs to correct it.)...?
i'm thinking about encoding..this is nice resolution for divx,but if i ever get hardware divx player it would be interesting to know for a fact that it can play this with correct (!) AR........or not...
(although your question kinda-sorta undirectly suggest that this is not possible ha?)
anyhow,i'm still interesting,and you have the player...be my guest...(hehe)
/ivo
MrDarcy
3rd May 2003, 14:12
Originally posted by ^^-+I4004+-^^
will i be able to play 480x576 divx(of any sort) in your player with proper AR (obviuosly player then needs to correct it.)...?
How could you play your divx in *MY* player? I don't think it would be confortable for you to come here to play your movies.... :D
The Kiss player would play a 480x576 divx as is, without any rescaling or zooming. So, if you encoded it with square pixels, it would appear correct, otherwise it wouldn't.
Now I'm doing some tests with mencoder/mplayer to see if the Kiss player is able to detect the aspect ratio "flag" in the Divx MPEG header, like it does for DVDs.
This is taking me some time because I still haven't understood if mencoder (libavcodec) aspect parameter is the Display Aspect Ratio (used in MPEG-2 DVD) or the Pixel Aspect Ratio (the only aspect ratio I found in MPEG-4 header).
After first tests, it seems that mplayer interprets the ratio I passed to mencoder as DAR, but I'm wondering how it's stored in the file.
Is there a Display Aspect Ratio field in MPEG-4 simple advanced too?
Anyone can help me here ?
^^-+I4004+-^^
4th May 2003, 02:59
>The Kiss player would play a 480x576 divx as is, without any rescaling or zooming. So, if you encoded it with square pixels, it would appear correct, otherwise it wouldn't.
you mean if i encoded it with unsquare pixels it would look ok(if "wide" pixels were incorporated to compensate the AR)?
or you mean that the player will stretch any square pixel resolution to the full screen (and therefore compensate the AR)?
(as 480x576 with square pixels(as on my monitor and tv-out) looks stretched vertically...tall people etc.)
btw. you remember how oyu said that ALL divx's are square and that's it...(heheh and now you need something else...)
bzw. i believe .avi header doesn't thave PAR parameter into it....
(but you probably know this so you go for mp4 now?)
another thing:you don't have capture card to do more experiments in this field?
if there's some intterest i might send you some samples with weird stuff so you check it out (if it can play real short samples etc.)
MrDarcy
4th May 2003, 21:56
No, I mean that the player "thinks" the pixel are square, it doesn't apply any kind of correction for not-square pixels.
The only way to supply it with information about the Pixel aspect ration could (?) be via the MPEG-4 header, but my tests are unsuccesful. The first files I encoded with mencoder (setting aspect ratio) are not played by the Kiss.....
I have a capture card, but I miss the 15 meters long cable to link the player to my PC....
^^-+I4004+-^^
5th May 2003, 08:13
>No, I mean that the player "thinks" the pixel are square, it doesn't apply any kind of correction for not-square pixels.
The only way to supply it with information about the Pixel aspect ration could (?) be via the MPEG-4 header, but my tests are unsuccesful. The first files I encoded with mencoder (setting aspect ratio) are not played by the Kiss.....
ALL RIGHT!
i was suggesting this behaviour (prior to in fact knowing this as i do now after you told me...) of "square pixel only" is true for monitor,my tv-out ,and "probably" divx playback hardware................now it's "true for monitor,my tv-out and "for sure" divx playback hardware....
(ie.non-square pixels are displayed just as on 800x600 on monitor->like square pixels...uncorrect way....)
(monitor 4:3 desktop resolutions or such tv-out resolutions (like 768x576,800x600 etc.) convert every pixel to square one just as your player does...expected behaviour)
thanks for the info,i hope you find the way to solve issue
(or perhaps kiss makes some firmware update?)
/ivo
symonjfox
6th May 2003, 13:09
Does anybody know how to add the AR flag into a MP4 container?
I always use mp4creator60 to convert my xvid to mp4 files, but there is NO option to set AR ...
ChristianHJW
6th May 2003, 15:39
Originally posted by symonjfox Does anybody know how to add the AR flag into a MP4 container? I always use mp4creator60 to convert my xvid to mp4 files, but there is NO option to set AR ... MP4 container has no AR flag in the container itself, its reyling on a flag in the video elementary stream ( codec header ) AFAIK.
BTW : Mosu has AR flag working in his matroska Linux tools for both muxing and playback from mplayer ... ;) ... Windows to come next, if you help me to bug Cyrius to code setting the flag from VdubMod .... :D ...
symonjfox
6th May 2003, 17:03
I hope ... I'm tired of Deinterlacing and vertically resize everything I capture from my DVB-S board.
I'd like to encode @ 504x576 interlaced MP4 to keep the best quality (DVB channels use very strange resolutions .... :rolleyes: )
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.