Quantcast

Screen resolution

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Screen resolution

Kaze-2
I am using ffmpeg from the command line on Linux Ubuntu.  The code I used was:
ffmpeg -i input_file.avi -target ntsc-dvd output.mpg
My video was converted, but now all the people in the movie appear very short
and fat.  How can I change this code to keep the resolution from looking odd
like this?  Thanks.

Kaze
Osaka, Japan
Ubuntu, Gutsy Gibbon user

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Screen resolution

Eduardo M Kalinowski-2
Kaze wrote:
> I am using ffmpeg from the command line on Linux Ubuntu.  The code I used was:
> ffmpeg -i input_file.avi -target ntsc-dvd output.mpg
> My video was converted, but now all the people in the movie appear very short
> and fat.  How can I change this code to keep the resolution from looking odd
> like this?  Thanks.
>  

Take a look at this article: http://forum.videohelp.com/topic174200.html 
. While long, it explains very detailedly about resolutions and aspect
ratios, and will tell you how to properly resize and/or add bars to the
vide in order to keep the aspect ratio.

--
Razão, o azar.
                -- palíndromo

Eduardo M KALINOWSKI
[hidden email]
http://move.to/hpkb

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Screen resolution

Kaze-2
In reply to this post by Kaze-2
Thanks, now do you happen to know how to alter my command to force ffmpeg to
convert at the resolution I want?  I know it must start with a " - " but that's
it.  ffmpeg -i input_file.avi -target ntsc-dvd output.mpg

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Screen resolution

Eduardo M Kalinowski-2
Kaze wrote:
> Thanks, now do you happen to know how to alter my command to force ffmpeg to
> convert at the resolution I want?  I know it must start with a " - " but that's
> it.  ffmpeg -i input_file.avi -target ntsc-dvd output.mpg
>  

-s <width>x<height> is for resizing, -padtop <pixels> and -padbottom
<pixels> add black borders. You should first resize to the actual size,
then add borders to force the movie to the DVD size. You should also
read the ffmpeg man page, as that (and much more) is explained there.



--
One picture is worth more than ten thousand words.
                -- Chinese proverb

Eduardo M KALINOWSKI
[hidden email]
http://move.to/hpkb

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Screen resolution

Andy Civil
In reply to this post by Eduardo M Kalinowski-2
Eduardo M KALINOWSKI wrote:
> Take a look at this article: http://forum.videohelp.com/topic174200.html 
> . While long, it explains very detailedly about resolutions and aspect
> ratios, and will tell you how to properly resize and/or add bars to the
> vide in order to keep the aspect ratio.

It's a great article, but a little comprehensive...

I think these are the key points: there are three mathematically related
aspect ratios to understand. First is the ratio of the numbers of
pixels, e.g. 720x480. As far as I know, there's no name for this, so I
will call it FAR (frame aspect ratio). Second is the actual shape of
each individual pixel - no, they don't have to be square! this is called
PAR. As an example, if your frame is square, e.g. 480x480 but it
displays widescreen 16:9, it's because each individual pixel is also
wider than it is high, in the ratio 16:9. Third is the Display aspect
ratio or DAR. This is the ratio that you should see if you measure your
display with a ruler: the actual physical size.

If you test a file with ffmpeg -i filename it will print out all three
numbers, the FAR in full, plus the PAR and DAR.

e.g. Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x480 [PAR 32:27
DAR 16:9], 7700 kb/s, 59.94 tb(r)

Note that in my copy, the PAR is quoted backwards; on this regular
widescreen DVD, the pixels are actually higher than they are wide, in
the ratio 27:32, not 32:27.

So how do you control the three parameters? You can only control two;
the third one is inferred. They are related with the formula:
DAR = FAR x PAR
You control the DAR with the -aspect command, e.g. -aspect 16:9
You control the FAR with your -s size command e.g. -s 720x480
You cannot control the PAR, it's calculated from the other two

Hope this helps... if you need more, that article is your friend.

--
Andy

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Screen resolution

Michel Bardiaux-2
In reply to this post by Eduardo M Kalinowski-2
Eduardo M KALINOWSKI wrote:

> Kaze wrote:
>> Thanks, now do you happen to know how to alter my command to force ffmpeg to
>> convert at the resolution I want?  I know it must start with a " - " but that's
>> it.  ffmpeg -i input_file.avi -target ntsc-dvd output.mpg
>>  
>
> -s <width>x<height> is for resizing, -padtop <pixels> and -padbottom
> <pixels> add black borders. You should first resize to the actual size,
> then add borders to force the movie to the DVD size. You should also
> read the ffmpeg man page, as that (and much more) is explained there.
>
>
Well, the purpose of -target is to give working parameters
automagically. The user should not have to worry about resizeing or
reaspecting or repadding. What we need is the output messages from the
command (as per list guidelines; Kaze, please?) then we will know how to
fix ffmpeg.c.

Greetings,
--
Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:[hidden email]

Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles
http://www.mediaxim.com/
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Screen resolution

Eduardo M Kalinowski-2
On Feb 19, 2008 11:03 AM, Michel Bardiaux <[hidden email]> wrote:

> Eduardo M KALINOWSKI wrote:
> > Kaze wrote:
> >> Thanks, now do you happen to know how to alter my command to force ffmpeg to
> >> convert at the resolution I want?  I know it must start with a " - " but that's
> >> it.  ffmpeg -i input_file.avi -target ntsc-dvd output.mpg
> >>
> >
> > -s <width>x<height> is for resizing, -padtop <pixels> and -padbottom
> > <pixels> add black borders. You should first resize to the actual size,
> > then add borders to force the movie to the DVD size. You should also
> > read the ffmpeg man page, as that (and much more) is explained there.
> >
> >
> Well, the purpose of -target is to give working parameters
> automagically. The user should not have to worry about resizeing or
> reaspecting or repadding. What we need is the output messages from the
> command (as per list guidelines; Kaze, please?) then we will know how to
> fix ffmpeg.c.

As far as I know, -target ntsc-dvd will resize the video to the
apropriate size of 720x480. However, if the video is not in one of the
two aspect ratios available for DVD MPEG2 movies, namely 4:3 or 16:9,
then the resizing done by ffmpeg will cause aspect ratio distortion,
so it is necessary to add black borders to the video to keep the
original aspect ratio.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Screen resolution

Michel Bardiaux-2
Eduardo M KALINOWSKI wrote:

> On Feb 19, 2008 11:03 AM, Michel Bardiaux <[hidden email]> wrote:
>> Eduardo M KALINOWSKI wrote:
>>> Kaze wrote:
>>>> Thanks, now do you happen to know how to alter my command to force ffmpeg to
>>>> convert at the resolution I want?  I know it must start with a " - " but that's
>>>> it.  ffmpeg -i input_file.avi -target ntsc-dvd output.mpg
>>>>
>>> -s <width>x<height> is for resizing, -padtop <pixels> and -padbottom
>>> <pixels> add black borders. You should first resize to the actual size,
>>> then add borders to force the movie to the DVD size. You should also
>>> read the ffmpeg man page, as that (and much more) is explained there.
>>>
>>>
>> Well, the purpose of -target is to give working parameters
>> automagically. The user should not have to worry about resizeing or
>> reaspecting or repadding. What we need is the output messages from the
>> command (as per list guidelines; Kaze, please?) then we will know how to
>> fix ffmpeg.c.
>
> As far as I know, -target ntsc-dvd will resize the video to the
> apropriate size of 720x480. However, if the video is not in one of the
> two aspect ratios available for DVD MPEG2 movies, namely 4:3 or 16:9,
> then the resizing done by ffmpeg will cause aspect ratio distortion,
> so it is necessary to add black borders to the video to keep the
> original aspect ratio.

Oh yes, I agree completely, what I meant is that, according to the
Principle of Least Astonishment, using -t should cause the borders to be
added automagically. But as long as the OP doesnt post complete messages
from his ffmpeg command, we can only guess.

--
Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:[hidden email]

Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles
http://www.mediaxim.com/
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Loading...