[MEncoder-users] OCD formatting of DVDs for iPhone

Peter Sebastian Masny ps-list at masny.dk
Sun Jan 25 20:25:39 CET 2009


James Hastings-Trew wrote:
> Peter Sebastian Masny wrote:
>   
>> Hi all,
>>
>> [[[[in short, take 16:9 input and make the video 480x270, then add black 
>> bars above and below to real resolution 480x320, with a 1:1 pixel ratio]]]]
>>
>> Longer:
>> I got a command line that does a good job of converting a DVD folder 
>> into an MPEG4 for my iPhone. The only problem is the aspect ratio. The 
>> situation:
>> 1. my movies are all 16:9 (1.77:1)
>> 2. mencoder rarely accurately detects the original aspect ratio (I seem 
>> to get 2.37:1 all the time)
>> 3. iPhone display is 480x320 (1.5:1)
>> 4. quicktime and iPhone need 1:1 pixel sizes, but iPhone will resize the 
>> pixel ratio (that's the weird part)
>>
>> I can run dsize=480:270  and get a nice video, playable on my iPhone, 
>> but when played it gets stretched to fill the screen (480x320)
>>
>> This bothers my OCD tendencies.
>>
>> I've tried to force the iPhone to add black bars to the top and bottom by
>> dsize=480:270,expand=480:320, but this makes SAR 32/27 and does not add 
>> real black bars.
>> What's the correct incantation to in short, take 16:9 input and make the 
>> video 480x270, then add black bars above and below to 480x320, with a 
>> 1:1 pixel ratio?
>>   
>>     
> Expand, then dsize. when the dsize matches the pixel size of the frame, 
> then the SAR is 1/1.
>   
Thank you. The incantation:
-vf pp=ci,expand=720:568,dsize=480:320,scale=480:320,harddup
has the desired effect. A 480x320 video where the content is 480x270 (16:9).

However,
> BUT, you don't need to add the black bars at all. the iPhone supports a 
> 480:270 size video just fine. Just make sure the dsize is the same as 
> scale size. 480:320 is it's "4:3" resolution, and 480:270 is it's "16:9" 
> resolution.
>   
-vf pp=ci,dsize=480:270,scale=480:270,harddup
Gives me a 480x270 (16:9) video with a 1x1 pixel aspect ratio. However, 
iPhone does NOT play this as 480x270. It stretches the video to fill the 
screen (480x320).

Thanks again,
Peter



More information about the MEncoder-users mailing list