Log in

View Full Version : How to encode to h264 with non-square pixel?


alexVS
26th December 2007, 10:34
I captured TV-program in PAL 25i 720x576 mpeg2
The pixels in this video are non-square, so I got correct 4:3 when I play it.

I want to encode it with x264.exe (using meGUI) without resize, but when I do it, I receive square pixel and 720x576 doesn't give correct proportions (4:3). I haven't found an option in meGUI to set up PAR or DAR. How can I do it?

Wishbringer
26th December 2007, 10:56
In "MeGUI/Tools/AviSynth Script Creator" is an unoverseeable Checkbox "Clever (TM) anamorphic encoding"

With that box checked, MeGUI sends an "-sar x:y" Option to the x264 commandline and you get your anamorph encode.

Now it only depends if your Player can handle that signaling.

blazo
17th January 2008, 13:33
I tried this but resulting file stil plays at 1:1 DAR.
I use RAWAVC as a target file format. Is this the problem?
Or is it in the muxer MP4Box?

Player (MPC) plays anamorphic MP4 files created on my Mac (using Handbrake) just fine.

blazo
17th January 2008, 19:16
I use RAWAVC as a target file format. Is this the problem?

I just checked: RAWAVC looses PAR information. Use MP4 format when encoding if you need anamorphic video.

Inventive Software
17th January 2008, 22:34
Make sure that on the command-line x264 uses, the option --sar 16:15 is added.

Meilo
18th January 2008, 01:40
I had the same problem when playing mp4 files on the xbox 360. Megui mp4 muxed files played on the 360 ignore the anamorphic setting.

I just encode the video and audio on megui, and mux them with Yamb (setting the right aspect ratio in Yamb) and works ok on the 360.

blazo
18th January 2008, 13:27
MP4Box is OK as long as you use MP4 format as source video (well, there is a few bytes of overhead compared to RAWAVC), so don't use RAWAVC.
I'm playing my content on appleTV and Media Player Classic (on PC) and now both play content in anamorphic.