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. |
27th April 2002, 18:36 | #3 | Link |
Registered User
Join Date: Mar 2002
Location: Spain
Posts: 307
|
It's true that AVI only does support square pixels. But it's true also that the MPEG-4 video stream has an aspect ratio flag. The problem is, no current MPEG-4 CODEC makes use of this flag (it's always set to 1) and no player currently available support it.
I made my own tests, both with a DivX file and a MP4 one. The first one, when I changed it to an alternate aspect ratio value (using an hex editor and some MPEG-4 specs), the DivX decoder totally messed up the picture, so I guess it doesn't like this very much. With the MP4 file, once changed, the MPEG4IP's wmp4player simply ignored this field when playing. I put a request in DivX forums asking support for this in future. But I doubt anyone in the DivX team may have any interest in this. |
27th April 2002, 18:47 | #5 | Link | |
Registered User
Join Date: Oct 2001
Posts: 800
|
Quote:
Last edited by Chibi Jasmin; 27th April 2002 at 18:50. |
|
27th April 2002, 20:57 | #6 | Link |
Registered User
Join Date: Mar 2002
Location: Spain
Posts: 307
|
Well I tried with a somewhat old release I think (0.9.2 or 0.9.3). Perhaps the new ones may support this. I'll try to do a test when I get some free time. But anyways having this option supported in the encoder and the player is a different thing, because the first one is much easier (it's just a flag set) and the latter requires image resizing.
|
27th April 2002, 21:14 | #7 | Link |
Registered User
Join Date: Oct 2001
Posts: 1,459
|
Any video decoder (dshow) can set the aspect ratio on the output media type and the video renderer will make use of it automatically. Unfortunately, none of the current decoder filters are using this feature.
(see dwPictAspectRatioX/Y at http://msdn.microsoft.com/library/en...2structure.asp) |
29th April 2002, 14:37 | #13 | Link |
Registered User
Join Date: Apr 2002
Posts: 52
|
For editing mp4 files try MP4Edit from ENST in france. Very nice Interface.
http://www-elec.enst.fr/~dufourd/mpeg-4/tools.html There is also an alternative muxing prg., mp4tool, but it uses IM1 compatible scripts to compile and those are not so easy to create. An alternative would be Apples dumpster.exe, wich is for .mov qt files, but also accepts .mp4 as .mov with some unknown tags. You dont even have to rename the files. Is shows the high similarity between .mov and .mp4. Its almost the same. Afaik mp4 uses the same sizes as VCD, the cif size family, (for instance 352*288 PAL + the well known DVD format wich is called CCIF if i remember correctly.) Dont forget, its an MPEG organisation product, they are conservative with formats. The Apple suggested formats for streaming are 320*240 and 640*480, but not limited to. Last edited by Gawen; 29th April 2002 at 14:44. |
29th April 2002, 15:24 | #14 | Link |
Registered User
Join Date: Oct 2001
Posts: 800
|
Thanx for your hints...I never heard of these tools :-) Will take a look...but even if I should be able to set the flag, it won't get played with aspect ratio other than 1 at the moment, will it?
Apart from that, what bugged me a bit is this: "AAC (mono 0x40 / stereo 0x41: OK this is not standard, this is just the way we use it in IM1 currently) or MPEG-4 video (IM1 format, 0xC4: again, not standard, just the way in IM1)" taken from the above mpeg-4 tools description... I am not familiar with most aspects of the mpeg-4 specs so I prefer a tool, which at least claims to be spec-compliant (like the mpeg4ip tools), until I understand what such things mean... Last edited by Chibi Jasmin; 29th April 2002 at 15:28. |
29th April 2002, 19:23 | #15 | Link |
Registered User
Join Date: Apr 2002
Posts: 52
|
@Chibi
Hi, i wouldnt have posted, if MP4EDIT.EXE did not do what you want, please give that URL a second chance. Dont mix it up with mp4tool.exe. *g* Happy RTFMing! P.S.: You know, i am researching in the same area *g*, but i am only 1 or 2 steps ahaed of you. MP4EDIT gives you an easy to use flag editor, please dont ask ME about wich app uses wich flag how. Even MPEGLA is still doing interoperability tests. They dont know themselfes. Link to dumpster: ftp://ftp.apple.com/developer/Quickt...r/Dumpster.zip Theres a new player in town: http://www.mpegable.com/ Last edited by Gawen; 29th April 2002 at 19:44. |
29th April 2002, 21:20 | #16 | Link | |
Registered User
Join Date: Oct 2001
Posts: 800
|
Quote:
What I would still need is a muxer that can reliably mux 23.976 fps avi into mp4...mp4creator has its problems (as posted in http://forum.doom9.org/showthread.php?s=&threadid=23751 - in the meantime I also modified mp4creator V0.9.3.9 the same way) and I don't too much trust in my self-made solution (see that thread). Will check out the mpegable players capabilities later...while we are at it, it would still be interesting to find out, which resolutions and aspect ratio are supposed to be standard in mpeg4-video...you posted some above...maybe simply the same as in dvd today can be used!? Many things to be researched... Last edited by Chibi Jasmin; 29th April 2002 at 21:38. |
|
29th April 2002, 22:02 | #17 | Link |
Registered User
Join Date: Oct 2001
Posts: 800
|
Hey ! This player seems half-way usable! My first quick tests result in...
mpegable Player V2.0 plays... muxed with mp4creator (all 25 fps): XVid h263: yes XVid mpeg: yes DivX5: yes DivX5_b: no (choppy, seems to simply skip the b-frames) DivX5_gmc: yes DivX5_qpel: no (color artifacts) muxed with DivX5Creator DivX5 (23.976 fps): yes XVid mpeg (23.976 fps): no (too fast) XVid mpeg (25 fps): yes directly written with DivX5 (all 23.976 fps): DivX5: yes Note that DivX5Creator muxes 23.976 fps correctly (unlike mp4creator)! Much better than mpeg4ip player, that only plays xvid h263 and divx5 without any mpeg-tools...I personally like to see that xvid with mpeg quantizer is supported...great stuff! The only problem with this player is it does not create overlay windows for playback so my G400-DVDMax TVOutput doesn't work You said: "Afaik mp4 uses the same sizes as VCD, the cif size family, (for instance 352*288 PAL + the well known DVD format wich is called CCIF if i remember correctly.) Dont forget, its an MPEG organisation product, they are conservative with formats. The Apple suggested formats for streaming are 320*240 and 640*480, but not limited to. " Can you provide some more detailed info or some links about this? Is there some standards? Can't be too wrong simply keeping the original dvd-resolution (would it be legal to cut black borders?)...would just have to set the aspect ratio (good hope the mpegable player supports it...???)...and as I said a muxer for 23.976 fps avis.... BTW: I didn't find out how to set aspect ratio with mp4edit or some other way, can you tell me how to do it, please? Last edited by Chibi Jasmin; 30th April 2002 at 09:33. |
30th April 2002, 12:26 | #18 | Link |
Registered User
Join Date: Apr 2002
Posts: 52
|
@Chibi
And i alway thought googeling belonged to the base lessons for a researcher... Just try a search for "mp4 aspect ratio" at google.com. As stated in the m4if mail list archive there is a flag (atom) aspect_ratio_info in mp4, but it is the player programmers choice to use it or not. Default ratios are 12:11 and 40:33. http://lists.m4if.org/pipermail/tech...ch/000573.html Common Intermediate Format - CIF A video format used in videoconferencing systems that easily supports both NTSC and PAL signals. CIF is part of the ITU H.261 videoconferencing standard. It specifies a data rate of 30 frames per second (fps), with each frame containing 288 lines and 352 pixels per line. 4CIF 704*576, comp. H.263 http://www.tele.ntnu.no/signal/cours...ge-formats.pdf Best supported DSP Hardware Platform i found for MP4 is TMS320C62x: http://focus.ti.com/docs/tool/list.j...DAV=Generation Most encoders for those DSPs use CIF family sizes, so i would assume they are good for future player compatibility. Last edited by Gawen; 30th April 2002 at 13:09. |
30th April 2002, 13:33 | #20 | Link |
Registered User
Join Date: Apr 2002
Posts: 52
|
The .mov atoms are a lot better described than .mp4, but the "mvhd" and "mask" atom values for .mp4 should imho be the same.
Load your .mp in dumpster and hack it! * 8+ bytes movie header atom = long unsigned offset + long ASCII text string 'mvhd' -> 4 bytes version/flags = byte hex version + 24-bit hex flags (current = 0) -> 4 bytes created mac date = long unsigned value in seconds since beginning 1904 to 2040 -> 4 bytes modified mac date = long unsigned value in seconds since beginning 1904 to 2040 -> 4 bytes time scale = long unsigned time unit (default = 600) -> 4 bytes duration = long unsigned time length (in time units) -> 4 bytes decimal user playback speed = long fixed point rate (normal = 1.0) -> 2 bytes user volume = short unsigned level (mute = 0; 100% = 255; 300% max = 767) -> 10 bytes reserved = 5 * short values set to zero -> 4 bytes decimal window geometry matrix value A = long fixed point width scale (normal = 1.0) -> 4 bytes decimal window geometry matrix value B = long fixed point width rotate (normal = 0.0) -> 4 bytes decimal window geometry matrix value U = long fixed point width angle (normal = 0.0) -> 4 bytes decimal window geometry matrix value C = long fixed point height rotate (normal = 0.0) -> 4 bytes decimal window geometry matrix value D = long fixed point height scale (normal = 1.0) -> 4 bytes decimal window geometry matrix value V = long fixed point height angle (normal = 0.0) -> 4 bytes decimal window geometry matrix value X = long fixed point positon (left = 0.0) -> 4 bytes decimal window geometry matrix value Y = long fixed point positon (top = 0.0) -> 4 bytes decimal window geometry matrix value W = long fixed point divider scale (normal = 1.0) -> 8 bytes preview = long unsigned start time + long unsigned time length (in time units) -> 4 bytes still poster = long unsigned frame time (in time units) -> 8 bytes selection time = long unsigned start time + long unsigned time length (in time units) -> 4 bytes current time = long unsigned frame time (in time units) -> 4 bytes next/new track id = long integer value (single track = 2) * 8+ bytes optional clipping (mask) atom = long unsigned offset + long ASCII text string 'clip' http://www.geocities.com/xhelmboyx/q...qtm-layout.txt Last edited by Gawen; 30th April 2002 at 13:36. |
Thread Tools | Search this Thread |
Display Modes | |
|
|