[Ffmpeg-devel] FFMPEG Bug - aspect - padding
Jürgen Krieger
juergen
Fri Jul 28 21:32:58 CEST 2006
Luca Abeni wrote:
> Hi J?rgen,
>
> On Fri, 2006-07-28 at 15:40 +0200, J?rgen Krieger wrote:
>
>> In gerenell ffmpeg with -aspect is working correct.
>>
>> Though, when i combine -pad{top,bottoom} and -sapect
>> the aspect ratio i entered gets ignored.
>>
> I think the attached patch might fix the problem you are experiencing.
>
That was fast.
The patch did the trick!
Thanks alot!!!!
Will the patch make it in svn too, or will i have to patch it every
version myself?
greetings
J?rgen
> Luca
>
> ------------------------------------------------------------------------
>
> Index: ffmpeg.c
> ===================================================================
> --- ffmpeg.c (revision 5457)
> +++ ffmpeg.c (working copy)
> @@ -3029,7 +3029,7 @@
>
> video_enc->width = frame_width + frame_padright + frame_padleft;
> video_enc->height = frame_height + frame_padtop + frame_padbottom;
> - video_enc->sample_aspect_ratio = av_d2q(frame_aspect_ratio*frame_height/frame_width, 255);
> + video_enc->sample_aspect_ratio = av_d2q(frame_aspect_ratio*video_enc->height/video_enc->width, 255);
> video_enc->pix_fmt = frame_pix_fmt;
>
> if(codec && codec->pix_fmts){
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
Examples of tests with patch:
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [xv] 640x360 => 640x360 Planar YV12
WITH: ./ffmpeg -i ~/temp_video/test.mov test6.avi
Movie-Aspect is 1.22:1 - prescaling to correct movie aspect.
VO: [xv] 704x576 => 704x576 Planar YV12
WITH: -s 704x576
Movie-Aspect is 1.22:1 - prescaling to correct movie aspect.
VO: [xv] 704x576 => 704x576 Planar YV12
WITH: -s 704x576 -aspect 1.22
Movie-Aspect is 1.22:1 - prescaling to correct movie aspect.
VO: [xv] 704x596 => 728x596 Planar YV12
WITH: -s 704x576 -aspect 1.222 -padtop 10 -padbottom 10
Movie-Aspect is 2.00:1 - prescaling to correct movie aspect.
VO: [xv] 704x596 => 1192x596 Planar YV12
WITH: -s 704x576 -aspect 2:1 -padtop 10 -padbottom 10
Movie-Aspect is 2.00:1 - prescaling to correct movie aspect.
VO: [xv] 704x776 => 1552x776 Planar YV12
WITH: -s 704x576 -aspect 2:1 -padtop 100 -padbottom 100
More information about the ffmpeg-devel
mailing list