[Ffmpeg-devel] decision of video resampling is buggy in ffmpeg.c

williwu at fahr-zur-hoelle.org williwu
Tue Dec 20 18:26:59 CET 2005

I recorded a video from a digital receiver with resolution 720x576, aspect
4:3. Because the aspect of the film is 16:9, the video is a "letterbox"
format, that means there are black bars of 72 lines at the top and bottom of
the video and the used area is only 720x432.

The task is to crop 72 lines at the top and bottom, resize it from the
resulting 720x432 to 720x576 and define an aspect of 16:9. The comandline
  ffmpeg -i input.mpv -target dvd -f rawvideo -croptop 72 -cropbottom 72 -s
720x576 -aspect 16:9 output.mpv
But this will not work, because the resolution of input and output are
identical and the video is not resampled.

Only a small difference of output resolution gives the result as wanted:
  ffmpeg -i input.mpv -target dvd -f rawvideo -croptop 72 -cropbottom 72 -s
722x576 -aspect 16:9 output.mpv
So this is working, but the resolution is not a DVD standard.

I localised the problem in ffmpeg.c in function av_encode{} which decides
not to resample the video. The following patch solves _my_ problem but is
not a general solution. I don't understand the four cases of resample, crop,
pad combinations in function av_encode{}, so a better solution is required.

Lust, ein paar Euro nebenbei zu verdienen? Ohne Kosten, ohne Risiko!
Satte Provisionen f?r GMX Partner: http://www.gmx.net/de/go/partner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg.patch
Type: application/octet-stream
Size: 705 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20051220/f3f3a89b/attachment.obj>

More information about the ffmpeg-devel mailing list