Creative COW SIGN IN :: SPONSORS :: ADVERTISING :: ABOUT US :: CONTACT US :: FAQ
Creative COW's LinkedIn GroupCreative COW's Facebook PageCreative COW on TwitterCreative COW's Google+ PageCreative COW on YouTube
FORUMS:listlist (w/ descriptions)archivetagssearchhall of famerecent posts

Re: Padding

COW Forums : FFmpeg

VIEW ALL   •   ADD A NEW POST   •   PRINT
Share on Facebook
Respond to this post   •   Return to posts index   •   Read entire thread


Michael RampeRe: Padding
by on Jul 4, 2011 at 10:35:14 pm

[Jay Patel] "I want to convert 1920x1080(16:9) .mov video to 720x526 (4:3) .mov"

Your first problem is that 720x526 IS NOT 4:3!!! (720/526=1.3688 and it should be 1.3333)
Try 768x576 which IS true 4:3.

Rounding errors become problematic very quickly in encoding.

Your second problem is the size and aspect flags outside of the filter chain. These should now be performed inside the filter chain.

I replicated your command line to get a working solution from a 1920p source.
Example:

ffmpeg -i tilt_shift_1.mp4 -vcodec libx264 -preset ultrafast -vf "scale=768:432,pad=768:576:0:72,setdar=4:3" -b 15000k test_2.mov

Now all scale, pad and aspect is done inside the filter chain which avoids the conflicts you were experiencing.
Basically:
1. scale the 1920x1080 source to 768x432 dimensions (square pixel 16:9)
2. Pad this to the output size of 768x576
3. Set the aspect ratio to 4:3

NOTE: When using libx264 in recent versions of FFmpeg, the -vpre option has been replaced by -preset. Modify the code or update your FFmpeg as required. Also, I left out your audio options for simplicity.

Michael


Posts IndexRead Thread
Reply   Like  
Share on Facebook


Current Message Thread:
  • Padding by Jay Patel on Jul 4, 2011 at 5:30:10 am
    • Re: Padding by Michael Rampe on Jul 4, 2011 at 10:35:14 pm




LOGIN TO REPLY



FORUMSTUTORIALSFEATURESVIDEOSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

Creative COW LinkedIn Group Creative COW Facebook Page Creative COW on Twitter
© 2014 CreativeCOW.net All rights are reserved. - Privacy Policy

[Top]