View Full Version : Xbox360: High Profile anamorphic AVC


desta
6th March 2008, 19:47
Until very recently I thought this was a no go, but I've now found out that it is actually possible to play back high profile avc video in an mp4 container, and maintain the anamorphic display on the 360.

This might be already known, but I couldn't find any reference to it in the forums, so apologies if it's been discussed already. I'm a bit unsure of exact specifics as to why this method works where others fails, but.. it works, so that's a start.

Literally all you need to do is take the raw .h264/264 stream (can be demuxed from a previous mux or encoded straight to .264), load it in h264info (http://forum.doom9.org/showthread.php?t=123392), set the output AR (eg, 4 = PAL 16:9), and process it. Obviously setting Level 4.1 helps too if you didn't already do that prior to encoding (and your settings don't break the level). Then you just take the new stream and mux it, along with your stereo *sigh* LC-AAC, to mp4 and you can burn it to disc to play [anamorphic] on your 360.

Depending on your encoded frame resolution, it might stretch slightly too much. At first I thought it was just ITU-R, but I'm still unsure.

These input resolutions seem to work for PAL 16/9 (obviously they are just examples, but they have all been tested):

- 704x576 displays as 1024x576 (1.78)
- 704x554 displays as 1024x554 (1.85)
- 704x432 displays as 1024x432 (2.37)
- 704x424 displays as 1024x424 (2.41)

By input resolutions, I mean the actual encoded frame size, not changing the 'W x H' settings in h264info.

What I don't quite understand is why the same can't be done by just encoding straight to mp4/raw 264 with the anamorphic flags already set. For some reason the 360 disregards the DAR info this way, and only works when h264info adds the tags. Perhaps it's a limitation of the actual DAR info that can be written into a h.264 header... or just a limitation of the 360?

Like I said, apologies if this is already known or has been discussed. I can't imagine I'm the first to stumble across it, but I haven't seen it said anywhere else... though I have seen a lot of people say anamorphic mp4 isn't possible for the 360.


p.s. I realise that Level 3.1 is the 'proper' level for SD material, but 4.1 doesn't appear to be a problem for the 360. I'm assuming the only major differences in the levels themselves are resolution and max bitrate?


EDIT: To add a fairly ample degree of embarrassment, it seems you can just as easily use YAMB to set the 16:9 flags. I knew the option was there, but didn't think to try it due to the earlier results of encoding directly to mp4 (I assumed it was an issue with container info vs stream headers). The method above is still a valid one, but clearly not the only one, as I earlier implied.

The resolutions above still apply. Not much of a consolation to how stupid I feel now though. That said, I do still wonder why it doesn't work when encoding straight to mp4 with the anamorphic info already set?

Ronin-7
9th March 2008, 16:01
I think the Xbox 360 only reads the anamorphic info from the MP4 when the video is base or main profile as officially that's all it supports.

If you encode to high profile then certain features do not work, notice for instance how your TV screen goes briefly out of sync before playing the MP4 it doesn't do that on main profile videos (the transition from dash to video and back again is seamless).

As to why my best guess is because of the Zune software which is main profile only and the only official MS H.264/MP4 streamer so the Xbox 360 inherited some of the limitations of that apps H.264 support.

desta
9th March 2008, 17:43
I'm not talking about streaming. I'm talking about burning to disc and playing directly on the 360.

As I said, the files have all been tested and play back without fault on the 360. They play back anamorphic with High Profile @ Level 4.1. Obviously 3.1 can be set if wanted.

Sorry, I might be misunderstanding what you're saying though?

Ronin-7
9th March 2008, 18:34
Sorry, I might be misunderstanding what you're saying though?

I think so, I was replying to your comment.

That said, I do still wonder why it doesn't work when encoding straight to mp4 with the anamorphic info already set?

Anamorphic videos for me only worked on base or main profile videos not high profile ones.

You of course have a work around for high profile but what I was getting at is that although the Xbox can play high profile "officially" it does only up to main profile so certain features do not work as expected if you go with high profile (at leasts that's my understanding of the matter).

desta
9th March 2008, 18:57
Oh ok, it just seemed like you were talking about streaming content, rather than decoding directly on the 360. I understand now, sorry.

I didn't realise the 360 only suffered from this with high profile, mainly down to me not trying base or main. Do you know what other features work when base or main are used?

Ronin-7
9th March 2008, 19:55
I have not really looked into it that much to see what else is affected but just noted the quirks like anamorphic and the brief loss of sync with the TV screen when playing high profile videos (it cuts off the first few seconds from a video but it's not a big deal).

There are other minor features that only enable when the Zune software is acting as the media server for streaming you get;
* MP4 thumbnail generation
* Time length of MP4 video displayed in dash
* Permits embedding cover art for MP4 video e.g you could insert a DVD box cover & it will display in dash instead of thumbnail

None of those Zune features will enable if playing from local storage such as a DVD or USB drive on the Xbox 360 but the seamless playback from video to dash and anamorphic will work from local storage if you stick to main profile H.264.

Thanks by the way for posting the anamorphic & high profile info good to know that it can be worked around.

desta
9th March 2008, 20:46
Ah right, I wondered if subtitle and chapter support might work if main or base were used. I know it sounds silly to think that, but seeing as high profile seems to affect simple anamorphic info, then I suppose anything's fair game. :)

Btw, the loss of the first few seconds doesn't (appear) to happen when using the method above.


Thanks by the way for posting the anamorphic & high profile info good to know that it can be worked around.
No problem, just a pity I didn't know all the details before I posted. Thanks for the extra info.

I've edited the thread title to be a bit more relevant now.

CruNcher
9th March 2008, 23:46
desta did you tried 704x576 with --sar 16:11 the Xbox360 ignores that?
and whats about 720x480 with --sar 40:33 ?

could you also try my (Standalone and Mobile) Main Profile SD interoperability testing stream http://blip.tv/file/get/Cr4bl3r-tislandinteroptestpspsubjectivesharp466.mp4 (soon to be updated with a new Version), does it play correct? @ all?

canTsTop
10th March 2008, 13:29
i always encode with --sar 16:11, resolution is (after crop) 512x544. i encode to mp4 container and it just correctly plays on my xbox360

desta
10th March 2008, 13:48
Cruncher, yeah all those play back fine (including yours) on the 360, and those switches work even when encoded directly to mp4 @ high profile. I tried all the resolutions I mentioned in the first post as well.

Good stuff! :)