Discussion:
[Ffmpeg-user] Aspect ratio conversion 4:3 to 16:9
bungasagadua
2008-02-18 22:54:58 UTC
Permalink
I have some dv videos both 4:3 and 16:9, I'd like to edit them in a 16:9 PAL
project.
In order to convert the 4:3 videos I tried the following:

ffmpeg -i input.avi -vcodec dvvideo -croptop 88 -cropbottom 88 -s 720x576
-aspect 16:9 -acodec copy prova169.avi

The result seems to be good, but I'd like to have suggestion by experienced
ffmpeg users before starting to deal with the over 10 hours of 4:3 videos which
I have.

Thank you for helping.
tripp
2008-02-18 23:30:05 UTC
Permalink
bungasagadua <bungasagadua at gmail.com> wrote:>I have some dv videos both 4:3 and 16:9, I'd like to edit them in a 16:9
Post by bungasagadua
ffmpeg -i input.avi -vcodec dvvideo -croptop 88 -cropbottom 88
-s 720x576 -aspect 16:9 -acodec copy prova169.avi
-croptop 72 -cropbottom 72

of course only you can know if the footage needs lopsided cropping,
and whether to favour top or bottom.

tripp





---------------------------------
Looking for last minute shopping deals? Find them fast with Yahoo! Search.
Hervé
2008-02-19 13:26:04 UTC
Permalink
Post by tripp
bungasagadua <bungasagadua at gmail.com> wrote:>I have some dv videos
both 4:3 and 16:9, I'd like to edit them in a 16:9
PAL project. In order to convert the 4:3 videos I tried the
ffmpeg -i input.avi -vcodec dvvideo -croptop 88 -cropbottom 88
-s 720x576 -aspect 16:9 -acodec copy prova169.avi
-croptop 72 -cropbottom 72
of course only you can know if the footage needs lopsided cropping,
and whether to favour top or bottom.
tripp
dv videos are interlaced, you can't crop them. You must first
deinterlace! "ffmpeg -deinterlace -i..."(or take a look to the
mjpegtools to work with interlaced files)
PS: your resulting dv will have a progressive contents, but tagg it as
bottom "-top 0" (for compatibility purposes)

bye

Herv?
Rich Felker
2008-02-19 17:13:38 UTC
Permalink
Post by Hervé
Post by tripp
bungasagadua <bungasagadua at gmail.com> wrote:>I have some dv videos
both 4:3 and 16:9, I'd like to edit them in a 16:9
PAL project. In order to convert the 4:3 videos I tried the
ffmpeg -i input.avi -vcodec dvvideo -croptop 88 -cropbottom 88
-s 720x576 -aspect 16:9 -acodec copy prova169.avi
-croptop 72 -cropbottom 72
of course only you can know if the footage needs lopsided cropping,
and whether to favour top or bottom.
tripp
dv videos are interlaced, you can't crop them. You must first
deinterlace! "ffmpeg -deinterlace -i..."(or take a look to the
Deinterlacing is very bad. You surely can crop interlaced content as
long as your crop offsets are multiples of 4 and you subsequently
rescale it to the needed height using an interlaced-aware scaler.
Whether ffmpeg can do this on its own, I'm unsure.

Rich
William Boyle
2008-02-19 22:32:58 UTC
Permalink
When you crop them, you need to subtract the cropping amount (top+bottom, or
left+right) from the size argument (-s 720-(l+r)x576-(t+b)). In your
example, it would be -s 720x400, otherwise the image will not be compatible
with your PAL DVD format of 720x576. I found this out when converting some
mpeg4 videos to DVD 16x9 and needed to adjust the image to maintain its
proper proprotions.

-Bill
Post by Rich Felker
Post by Hervé
Post by tripp
bungasagadua <bungasagadua at gmail.com> wrote:>I have some dv videos
both 4:3 and 16:9, I'd like to edit them in a 16:9
Post by bungasagadua
ffmpeg -i input.avi -vcodec dvvideo -croptop 88 -cropbottom 88
-s 720x576 -aspect 16:9 -acodec copy prova169.avi
-croptop 72 -cropbottom 72
of course only you can know if the footage needs lopsided cropping,
and whether to favour top or bottom.
tripp
dv videos are interlaced, you can't crop them. You must first
deinterlace! "ffmpeg -deinterlace -i..."(or take a look to the
Deinterlacing is very bad. You surely can crop interlaced content as
long as your crop offsets are multiples of 4 and you subsequently
rescale it to the needed height using an interlaced-aware scaler.
Whether ffmpeg can do this on its own, I'm unsure.
Rich
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
William Boyle
2008-02-19 22:36:57 UTC
Permalink
Oops, to crop, I think you need to add to the ratio, not subtract. You would
subtract if you padded the image. Sorry about that... :-) Ie, -s 720x752 not
720x400

-Bill
Post by William Boyle
When you crop them, you need to subtract the cropping amount (top+bottom,
or left+right) from the size argument (-s 720-(l+r)x576-(t+b)). In your
example, it would be -s 720x400, otherwise the image will not be compatible
with your PAL DVD format of 720x576. I found this out when converting some
mpeg4 videos to DVD 16x9 and needed to adjust the image to maintain its
proper proprotions.
-Bill
Post by Rich Felker
Post by Hervé
Post by tripp
bungasagadua <bungasagadua at gmail.com> wrote:>I have some dv videos
both 4:3 and 16:9, I'd like to edit them in a 16:9
Post by bungasagadua
ffmpeg -i input.avi -vcodec dvvideo -croptop 88 -cropbottom 88
-s 720x576 -aspect 16:9 -acodec copy prova169.avi
-croptop 72 -cropbottom 72
of course only you can know if the footage needs lopsided cropping,
and whether to favour top or bottom.
tripp
dv videos are interlaced, you can't crop them. You must first
deinterlace! "ffmpeg -deinterlace -i..."(or take a look to the
Deinterlacing is very bad. You surely can crop interlaced content as
long as your crop offsets are multiples of 4 and you subsequently
rescale it to the needed height using an interlaced-aware scaler.
Whether ffmpeg can do this on its own, I'm unsure.
Rich
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Hervé
2008-02-20 11:23:53 UTC
Permalink
Post by Rich Felker
Post by Hervé
Post by tripp
bungasagadua <bungasagadua at gmail.com> wrote:>I have some dv videos
both 4:3 and 16:9, I'd like to edit them in a 16:9
PAL project. In order to convert the 4:3 videos I tried the
ffmpeg -i input.avi -vcodec dvvideo -croptop 88 -cropbottom 88
-s 720x576 -aspect 16:9 -acodec copy prova169.avi
-croptop 72 -cropbottom 72
of course only you can know if the footage needs lopsided cropping,
and whether to favour top or bottom.
tripp
dv videos are interlaced, you can't crop them. You must first
deinterlace! "ffmpeg -deinterlace -i..."(or take a look to the
Deinterlacing is very bad. You surely can crop interlaced content as
long as your crop offsets are multiples of 4 and you subsequently
rescale it to the needed height using an interlaced-aware scaler.
Whether ffmpeg can do this on its own, I'm unsure.
Rich
funny you just crop the piece of text that contains the solution
so (again)...
Post by Rich Felker
Post by Hervé
deinterlace! "ffmpeg -deinterlace -i..."(or take a look to the
mjpegtools)
ffmpeg does not handle scale and interlace

bye

Herv?
James Strickland
2008-02-20 20:21:32 UTC
Permalink
greeting everyone, I'm new to the list.

I'm trying to convert an mpeg file to wmv (for use with the zune).

Has anyone done this before for the zune?

I used: ffmpeg -i filename.mpeg -vcodec wmv1 -s 320x240 output.wmv

The file plays fine on my linux box, but when I stick it on the kids XP
box, it doesn't work. Can't sync to the zune.

Any help would be appreciated.

Thanks,
James Strickland
Misawa AB, Japan
The Wanderer
2008-02-20 11:53:53 UTC
Permalink
Post by James Strickland
greeting everyone, I'm new to the list.
You also just hijacked a thread (without even bothering to change the
Subject: line).

Never hit Reply when you are not writing a reply. Always start a new
message from scratch.
--
The Wanderer

My usual .sig is on vacation while I adjust to my new computer
bungasagadua
2008-02-20 22:31:22 UTC
Permalink
Post by bungasagadua
I have some dv videos both 4:3 and 16:9, I'd like to edit them in a 16:9 PAL
project.
ffmpeg -i input.avi -vcodec dvvideo -croptop 88 -cropbottom 88 -s 720x576
-aspect 16:9 -acodec copy prova169.avi
The result seems to be good, but I'd like to have suggestion by experienced
ffmpeg users before starting to deal with the over 10 hours of 4:3 videos which
I have.
Thank you for helping.
-----------------------
I realized that ffmpeg isn't the best choice, perhaps mencoder would do the job
better. Of course I understood this truth thank to the followups I received.

I tried the following:

mencoder input.avi /
-vf crop=720:432:0:72,dsize=16/9,scale=720:576:1,expand=720:576 /
-oac copy -ovc lavc -lavcopts vcodec=dvvideo:ilme:ildct:aspect=16/9 /
-o output.avi

By :1 in the scale, ilme and ildct I tell the program that the video is
interlaced.

I'll move the discussion on http://dir.gmane.org/gmane.comp.video.mencoder.user.

Regards

Loading...