Date: Mon, 1 Sep 2008 08:35:01 -0300 From: eduardo at kalinowski.com.br To: ffmpeg-user at mplayerhq.hu Subject: Re: [FFmpeg-user] Forcing format, crop and aspect ratio
Steve R. Bennen wrote:
I've been Googling questions in order to understand some basic parameter settings and I haven't been able to find a clear answer. (Actually, some more advanced settings make sense to me thanks to the link provided by Stefano Sabatini http://thread.gmane.org/gmane.comp.video.ffmpeg.user/16235/focus=16283 ) I am deciding between a few different scenarios. My problems are as follows. With a Player screen size at 576 x 432, which is 4:3, I will have source video uploaded in different aspect ratios.
1. If I use -s 576x432 will that force it? What will happen if I use the -s but I don't use the -aspect parameter? 2. If I use -aspect 4:3, what will happen to a source video file with a 16:9 aspect ratio? Will it automatically scale to 576 x 324 (16:9) because 576 is the defining dimension? 3. What if I want the screen size to be 576 x 432, regardless of the source aspect ratio, but I want both 16:9 and 4:3 sizes to fully fit in the 4:3 screen. Do I cropleft and cropright for the 16:9, but leave the 4:3? I want the ouput to show the "middle" of 16:9 and the 4:3. Can both be done?
From my understanding, the -aspect command line option only sets a flag in some containers (mpeg for sure, possibly others), whose end result is to stretch the video when it's being viewed to a given aspect ratio.
The -s option specifies the size of the video frames, and it ignores aspect ratios of the source video and the -aspect option. You'll have to calculate the video size beforehand and pass the exact value to -s.
Concerning the -aspect flag, unless you are sure your container format supports is properly, I'd recommend not using it (that is, using a 1:1 aspect ratio) and resizing the video to a proper size, possibly adding black bars with -padtop and -padbottom. You'll have to calculate the size of the video and the bars manually, however.
Ok, I'm still confused, but I'm starting to understand. The main problem is that I will have user-generated source files with different and unknown sizes and aspect ratios uploaded for encoding. For example, imagine your Youtube and your need to allow users the ability to upload video with different formats, sizes and aspect ratios to be encoded and played back in a fixed player and screen size. That size is 576x432 (4:3). How do I accommodate all possibilities in the encoding string?
Eduardo M KALINOWSKI eduardo at kalinowski.com.br http://move.to/hpkb
_______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
_________________________________________________________________ See what people are saying about Windows Live. Check out featured posts. http://www.windowslive.com/connect?ocid=TXT_TAGLM_WL_connect2_082008