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 > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 20th April 2011, 13:23   #1  |  Link
Bakumaru
Registered User
 
Bakumaru's Avatar
 
Join Date: Oct 2008
Posts: 2
Xbox360 does not obey SAR flag

I'm converting some old VHS tapes to AVC, using x264. Ideally I would like the convenience of being able to play these on the 360 since it is a standalone player. The files I have made do work, but the size is slightly off. They are horizontally compressed by ~15 pixels. This is not a result of the capture process or anything that the tv card is doing, because if I create an MPEG2 file and make a DVD, and then capture the playback of that DVD, the captured image is the correct size. The size problem only happens with MP4 files, and only on the Xbox. They play at the correct size in Media Player Classic and Windows Media Player.

My x264 command line includes --sar 8:9, but for the sake of experimentation I tried 10:11 and no SAR at all, but it makes no difference. 10:11 made the image slightly blurrier, as though it were being vertically stretched by a fraction of a pixel, but did not change the width. Changing the display mode on the xbox (stretch, native etc) doesn't help. I have tried remuxing with YAMB to add any potentially missing AR flags, and have verified before and after with Mediainfo that they are in fact there, but it makes no difference. The image still doesn't look right on the Xbox.

Is there something specific I need to do, or does the 360 just not have proper support for aspect ratio flags?
Bakumaru is offline   Reply With Quote
Old 21st April 2011, 19:57   #2  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 3,981
Quote:
Originally Posted by Bakumaru View Post
I'm converting some old VHS tapes to AVC, using x264. Ideally I would like the convenience of being able to play these on the 360 since it is a standalone player. The files I have made do work, but the size is slightly off. They are horizontally compressed by ~15 pixels. This is not a result of the capture process or anything that the tv card is doing, because if I create an MPEG2 file and make a DVD, and then capture the playback of that DVD, the captured image is the correct size. The size problem only happens with MP4 files, and only on the Xbox. They play at the correct size in Media Player Classic and Windows Media Player.
Hmmm. The Xbox 360 definitely supports SAR for WMV/VC-1 content. When you are playing back, what happens as you cycle through the different Display modes (letterboxed, stretch, cinema, native pixels)?

Silverlight, to my embarassment, doesn't properly use SAR flags in any bitstream. It's not a problem in practice, but it requries the aspect ratio be communicated in a sideband (which happens automatically in Smooth Streaming).

Anyway, if you can upload a file that shows this behavior, I'll pass it on to the Xbox media guys.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 21st April 2011, 22:27   #3  |  Link
desta
Registered User
 
Join Date: Jan 2006
Posts: 220
Xbox definitely supports SAR so long as they conform to mp4 spec.

Have a look here for the correct values.
desta is offline   Reply With Quote
Old 27th April 2011, 12:46   #4  |  Link
Bakumaru
Registered User
 
Bakumaru's Avatar
 
Join Date: Oct 2008
Posts: 2
Quote:
Originally Posted by benwaggoner View Post
Anyway, if you can upload a file that shows this behavior, I'll pass it on to the Xbox media guys.
Okay, sorry for the delay. I've been busy with other things but I wanted to do more testing with this, and after testing it in widescreen mode I can see now that SAR flags are obeyed as long as they are on the list of approved numbers from the MP4 spec. It doesn't make any difference for a square display because the image is basically the size of the full screen to begin with, and in the case of an invalid SAR it just stretches to fill the whole screen anyway. That's why I couldn't tell that it was doing anything before, as I hadn't tested a widescreen image.

That still does not explain the needless resizing of the image that the XBox does for all videos that it plays, as well as still images. Only DVD playback is not affected. For all video files and still images, the image is reduced in width by 15 pixels, almost as if it is compensating for an assumption that the video content is 704 stretched to fit a 720 width image. If that were the case then reducing the width by 15 pixels would indeed provide the desired 4:3 result, but my content is from television, so the active image area is already limited to the middle 704 pixels. Further horizontal compression makes the image thinner than it should be.

There is also a problem with the vertical resolution, or some sort of problem with interlacing perhaps. There are ghost lines on the 360's MP4 playback, so it either is resizing vertically for no reason, or it isn't handling the interlacing properly.

My tests were done over an S-Video connection, so I do not know if this problem affects the HDMI output, and I am wondering if perhaps something was not tested properly on the analog output, so perhaps this problem slipped through the cracks that way.

Anyway, I have attached a zip file containing a text file with a basic explanation of the problem, and a PSD with my test results so that you can clearly see what I am talking about just by turning on the layers. There is also an MP4 file that demonstrates the problem very obviously, but it affects any video file that is played on the XBox.

Thanks for taking the time to read all this crap. Hopefully someone can figure something out.
Attached Files
File Type: zip XBox aspect ratio problem.zip (131.9 KB, 11 views)
Bakumaru is offline   Reply With Quote
Old 29th April 2011, 00:53   #5  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 3,981
Quote:
Originally Posted by Bakumaru View Post
Thanks for taking the time to read all this crap. Hopefully someone can figure something out.
I've passed your files and info off to the right people. I'll let you know when I hear back.

Thanks for your help on this!
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Reply

Tags
aspect_ratio, x264, xbox

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 22:23.


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