Ticket #80 (new defect)

Opened 2 years ago

Last modified 7 months ago

x264 SAR (Sample Aspect Ratio)

Reported by: anonymous Assigned to:
Priority: normal Milestone: Sometime after 1.0
Component: Perian-Main Version:
Severity: normal Keywords:
Cc:

Description

Libavcodec ignores sample aspect ratio of x264.

Change History

12/26/06 21:59:27 changed by astrange

A file with a correct video SAR and incorrect container SAR is probably invalid. Can we get a sample?

12/27/06 21:45:41 changed by anonymous

I have difficulty attaching a file. So I uploaded it at http://files-upload.com/files/38891/sample.mp4.html The file is high-Profile and I'm using Perian trunk so that I can play a high-profile h.264 with Quicktime. The file was encoded with x264(r614). SAR is 32:27 (16:9) and the file resolution is 720x480. VLC and Mplayer detect x264 SAR (so the file resolution becomes 853x480) but Quicktime with Perian doesn't. Is it a problem of Quicktime? because VLC and Mplayer use Libavcodec to decode x264 files.

12/27/06 21:56:43 changed by astrange

  • owner set to astrange.
  • status changed from new to assigned.

That's not the right SAR (display size should be 873x480 due to overscan, SAR should be 40:33). I'm sticking with the file being invalid if the container SAR is wrong, but maybe we should check it if the container doesn't define it.

12/27/06 21:59:00 changed by astrange

  • owner deleted.
  • status changed from assigned to new.

01/27/07 00:10:23 changed by dconrad

The problem is that QuickTime doesn't let decoders change the aspect ratio afaik, and leaves it at the dimensions that the track specifies (which can be different than the actual pixel resolution, that's how I think you'd normally get anamorphic video in mp4.) The only way I can see us being able to change the aspect ratio is if we added a pasp extension to the image description given, but that doesn't work. I think that the only way we could do this would be to handle .mp4 ourselves and extract the aspect ratio for h264 there.

02/09/07 14:58:31 changed by tick

  • milestone set to Sometime after 1.0.

07/20/07 07:33:48 changed by mcka

07/20/07 07:34:23 changed by mcka

"pasp" means "pixel aspect ratio"

11/06/07 05:52:23 changed by Ritsuka

QuickTime 7.3 reads h.264 SAR, but only if perian is not installed.

11/06/07 10:59:29 changed by astrange

it's described in http://blog.so-net.ne.jp/MyCometG3/2007-11-06-1, I guess we can do it too.

01/28/08 00:53:28 changed by chromafile

I just noticed that Quicktime 7.4 handles H.264 SAR with or without Perian and plays high profile H.264 without Perian on both Tiger and Leopard. FYI, QT 7.4 Windows can't play High Profile h.264 correctly but reads SAR.