[Ffmpeg-devel] Cropping and resizing

Luca Abeni lucabe72
Fri Mar 17 11:11:59 CET 2006


Hi Harald,

On Fri, 2006-03-17 at 10:00 +0100, Harald Milz wrote:
[...]
> > of ffmpeg when you type this command line? Also, what's the size of your
> > input video?
> 
> ffmpeg -i vdrsync.mpv  -croptop 84 -cropbottom 84 -aspect 16:9  -b 15000
> -s 720x576 -f rawvideo -vcodec mpeg2video  -ilme -ildct  -y vdrsync1.mpv
> ffmpeg version 0.4.9-pre1, build 4718, Copyright (c) 2000-2004 Fabrice
> Bellard
>   built on Feb 27 2005 17:54:09, gcc: 3.3.4 (pre 3.3.5 20040809)
> Input #0, mpegvideo, from 'vdrsync.mpv':
>   Duration: N/A, bitrate: N/A
>   Stream #0.0: Video: mpeg2video, 720x576, 25.00 fps
> Output #0, rawvideo, to 'vdrsync1.mpv':
>   Stream #0.0: Video: mpeg2video, 720x576, 25.00 fps, q=2-31, 15000 kb/s
> Stream mapping:
>   Stream #0.0 -> #0.0
I tried the very same command line with a 720x576 mpeg2 test video I
have here, and I cannot reproduce the problem with current CVS (cropping
& rescaling seem to work fine).

I see that you are using an ffmpeg built on Feb 27... I committed a fix
for ffmpeg cropping on Mar 9, so I think you are hitting the bug fixed
by such committ... Can you try updating to current CVS (or applying the
attached patch)?

If that does not work, you'll need to make a piece of your input video
available somewhere, so that I can reproduce the problem.

			Thanks,
				Luca
-- 
_____________________________________________________________________________
Copy this in your signature, if you think it is important:
                               N O    W A R ! ! !

 
 
 --
 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 
 Sponsor:
 Cassine di Pietra: vini veneti di qualit? subito a casa Sua 
* da un?azienda famigliare al servizio di clienti selezionati
* 
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=3919&d=17-3
-------------- next part --------------
>From ffmpeg-cvslog-bounces at mplayerhq.hu Thu Mar  9 16:27:28 2006
Return-Path: <ffmpeg-cvslog-bounces at mplayerhq.hu>
X-Original-To: lucabe72 at email.it
Delivered-To: lucabe72 at email.it
Received: by smtpin6.email.it (Email.it, from userid 1004) id 14C8321E665;
	Thu,  9 Mar 2006 16:27:28 +0100 (CET)
Received: from mail.mplayerhq.hu (mail.mplayerhq.hu [192.190.173.45]) by
	smtpin6.email.it (Email.it) with ESMTP id D44DC21E581; Thu,  9 Mar 2006
	16:27:27 +0100 (CET)
Received: from mail.mplayerhq.hu (localhost [127.0.0.1]) by
	mail.mplayerhq.hu (Postfix) with ESMTP id 716A29174D; Thu,  9 Mar 2006
	16:27:29 +0100 (CET)
X-Original-To: ffmpeg-cvslog at mplayerhq.hu
Delivered-To: ffmpeg-cvslog at mplayerhq.hu
Received: by mail.mplayerhq.hu (Postfix, from userid 1107) id 85BFE93256;
	Thu,  9 Mar 2006 16:27:25 +0100 (CET)
To: ffmpeg-cvslog at mplayerhq.hu
Message-Id: <20060309152725.85BFE93256 at mail.mplayerhq.hu>
Date: Thu,  9 Mar 2006 16:27:25 +0100 (CET)
From: lucabe at mplayerhq.hu (Luca Abeni CVS)
Subject: [Ffmpeg-cvslog] CVS: ffmpeg ffmpeg.c,1.370,1.371
X-BeenThere: ffmpeg-cvslog at mplayerhq.hu
X-Mailman-Version: 2.1.4
Precedence: list
Reply-To: FFMpeg CVS commit log and discussion <ffmpeg-cvslog at mplayerhq.hu>
List-Id: FFMpeg CVS commit log and discussion <ffmpeg-cvslog.mplayerhq.hu>
List-Unsubscribe: <http://mplayerhq.hu/mailman/listinfo/ffmpeg-cvslog>,
	<mailto:ffmpeg-cvslog-request at mplayerhq.hu?subject=unsubscribe>
List-Archive: </pipermail>
List-Post: <mailto:ffmpeg-cvslog at mplayerhq.hu>
List-Help: <mailto:ffmpeg-cvslog-request at mplayerhq.hu?subject=help>
List-Subscribe: <http://mplayerhq.hu/mailman/listinfo/ffmpeg-cvslog>,
	<mailto:ffmpeg-cvslog-request at mplayerhq.hu?subject=subscribe>
Sender: ffmpeg-cvslog-bounces at mplayerhq.hu
Errors-To: ffmpeg-cvslog-bounces at mplayerhq.hu
X-Spam-Glob: Ham, spamicity=0.000000
X-Evolution-Source: imap://lucabe72%40email.it at imapmail.email.it/
Mime-Version: 1.0
Content-Transfer-Encoding: 8bit

Update of /cvsroot/ffmpeg/ffmpeg
In directory mail:/var2/tmp/cvs-serv5810

Modified Files:
	ffmpeg.c 
Log Message:
Fix crop & pad + rescaling


Index: ffmpeg.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/ffmpeg.c,v
retrieving revision 1.370
retrieving revision 1.371
diff -u -d -r1.370 -r1.371
--- ffmpeg.c	28 Feb 2006 11:32:31 -0000	1.370
+++ ffmpeg.c	9 Mar 2006 15:27:22 -0000	1.371
@@ -1729,8 +1729,8 @@
                 } else if ((codec->width == icodec->width -
                                 (frame_leftBand + frame_rightBand)) &&
                         (codec->height == icodec->height -
-                                (frame_topBand  + frame_bottomBand)))
-                {
+                                (frame_topBand  + frame_bottomBand)) &&
+                                (frame_rightBand + frame_leftBand + frame_topBand + frame_bottomBand)) {
                     ost->video_resample = 0;
                     ost->video_crop = 1;
                     ost->topBand = frame_topBand;
@@ -1738,7 +1738,8 @@
                 } else if ((codec->width == icodec->width +
                                 (frame_padleft + frame_padright)) &&
                         (codec->height == icodec->height +
-                                (frame_padtop + frame_padbottom))) {
+                                (frame_padtop + frame_padbottom)) &&
+                                (frame_padright + frame_padleft + frame_padtop + frame_padbottom)) {
                     ost->video_resample = 0;
                     ost->video_crop = 0;
                     ost->video_pad = 1;

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog at mplayerhq.hu
http://mplayerhq.hu/mailman/listinfo/ffmpeg-cvslog



More information about the ffmpeg-devel mailing list