Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > New and alternative video codecs

Reply
 
Thread Tools Search this Thread Display Modes
Old 15th May 2010, 15:57   #1  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,255
ffmpeg + crop + pad broken?

Atm. I'm using something like:
Code:
ffmpeg.exe -v 0 -r 23.976 -i "D:\Test.m2ts" -threads 4 -v 0 -croptop 130 -cropbottom 132 -cropleft 0 -cropright 0 -padtop 130 -padbottom 132 -vsync 0 -an -r 23.976 -pix_fmt yuv420p -f rawvideo - | x264 --crf 20 --fps 23.976 --output "test.264" - 1920x1080
for encoding

using a ffmpeg Version from:
http://sourceforge.net/projects/mplayer-win32/files/
or
http://ffmpeg.arrozcru.org/autobuilds/

Problem is, newest versions just stop and post:
"Please use vf=pad"
(older once work fine)

Since I couldn't find anything over at http://www.ffmpeg.org/ffmpeg-doc.html why this is happening I thought I might ask here if someone knows what's going wrong.

Is there a new option for padding, or is there a but in newer ffmpeg versions?

Cu Selur
__________________
Hybrid here in the forum, homepage

Last edited by Selur; 20th May 2010 at 21:03. Reason: fixed 2nd url to http://ffmpeg.arrozcru.org/autobuilds/
Selur is offline   Reply With Quote
Old 20th May 2010, 17:21   #2  |  Link
pete
Registered User
 
Join Date: Feb 2006
Location: Germany
Posts: 26
http://ffmpeg.org/libavfilter.html

(replace "-vfilters" with "-vf", they need to update the docs)
pete is offline   Reply With Quote
Old 20th May 2010, 18:00   #3  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,255
Thanks for the info.
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 20th May 2010, 21:02   #4  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,255
using latest from http://ffmpeg.arrozcru.org/autobuilds/ with:
Code:
ffmpeg -v 0 -r 25.000 -i "D:\sx264\test.mp4" -threads 4 -v 0 -vfilters "crop=640:350:0:2, scale=720:394, pad=720:576:90" -vsync 0 -an -r 25 -pix_fmt yuv420p -f rawvideo - | x264 --crf 20 --fps 23.976 --output "test.264" - 1920x1080
I get:
Quote:
FFmpeg version SVN-r23201, Copyright (c) 2000-2010 the FFmpeg developers built on May 20 2010 04:15:44 with gcc 4.4.2
configuration: --target-os=mingw32 --enable-runtime-cpudetect --enable-avisynth --enable-gpl --enable-version3 --enable-bzlib --enable-libgsm --enable-libfaad --enable-pthreads --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libmp3lame --enable-libopenjpeg --enable-libxvid --enable-libschroedinger --enable-libx264 --enable-libopencore_amrwb --enable-libopencore_amrnb --cross-prefix=i686-mingw32- --cc=ccache-i686-mingw32-gcc --arch=x86 --enable-memalign-hack
libavutil 50.15. 3 / 50.yuv [info]: 720x576p 0:0 @ 25/1 fps (cfr)15. 3
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cache64
libavcodec 52.68. 2 / 52.68. 2
libavformat 52.63. 0 / 52.63. 0
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.20. 0 / 1.20. 0
libswscale 0.10. 0 / 0.10. 0
x264 [info]: profile High, level 4.1
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\sx264\test.mp4':
Metadata:
major_brand : isom
minor_version : 1
compatible_brands: isom
Duration: 00:00:17.20, start: 0.000000, bitrate: 844 kb/s
Stream #0.0(und): Video: mpeg4, yuv420p, 640x352 [PAR 1:1 DAR 20:11], 722 kb/s, 25 fps, 25 tbr, 25k tbn, 25 tbc
Stream #0.1(und): Audio: mp3, 48000 Hz, 2 channels, s16, 120 kb/s
Unrecognized option 'vfilters'
using latest from: http://sourceforge.net/projects/mplayer-win32/files/ which uses rev23107 gives the same output, both don't recognize vfilters.

Cu Selur
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 20th May 2010, 22:07   #5  |  Link
Brazil2
Registered User
 
Join Date: Jul 2008
Posts: 532
Quote:
Originally Posted by Selur View Post
both don't recognize vfilters.
Looks like you have misunderstood what Pete meant: do NOT use -vfilters but use -vf instead.
Brazil2 is offline   Reply With Quote
Old 20th May 2010, 22:11   #6  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,255
Doh, now I get it.

Thanks!!
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 28th May 2010, 19:07   #7  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,255
Apparently I dont':
Code:
ffmpeg -v 0 -r 23.976 -i "D:\testclips\IronMan2_avc_aac.mov" -threads 4 -v 0 -vf "crop=0:4:1280:540,scale=1280:656,pad=1280:720:32:0" -vsync 0 -an -r 23.976 -pix_fmt yuv420p -f rawvideo - | x264 --pass 2 --bitrate 1500 --level 4.1 --direct auto --qpmin 1 --partitions i4x4,p8x8,b8x8 --subme 5 --trellis 0 --no-fast-pskip --weightp 1 --aq-mode 0 --vbv-maxrate 62500 --vbv-bufsize 78125 --sar 40:33 --stats "D:\test_19_47_30_003_01.stats" --fps 23.976 --output "D:\Encoding Temp\test_19_47_30_003_02.264" - 1280x720
gives me:
Quote:
[crop @ 013e6f60]x:0 y:4 w:1280 h:540
[scale @ 013e70f0]w:1280 h:540 fmt:yuv420p -> w:1280 h:656 fmt:yuv420p flags:2
[pad @ 013e6f20]w:1280 h:720 x:32 y:0 color:0x10808000[yuva]
[pad @ 013e6f20]Input area 32:0:1312:656 not within the padded area 0:0:1280:720 or zero-sized
but the syntax seems to be right, or not?
-vf "crop=0:4:1280:540,scale=1280:656,pad=1280:720:32:0"
should crop to 1280x540, then resize the result to 1280:656 and then pad to 1280:720.

Cu Selur
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 28th May 2010, 19:16   #8  |  Link
Reimar
Registered User
 
Join Date: Jun 2005
Posts: 278
Quote:
Originally Posted by Selur View Post
-vf "crop=0:4:1280:540,scale=1280:656,pad=1280:720:32:0"
should crop to 1280x540, then resize the result to 1280:656 and then pad to 1280:720.
You don't add any padding in the X-direction, so you can't use any X-offset. Did you maybe mean pad=1280:720:0:32 ?
Reimar is offline   Reply With Quote
Old 28th May 2010, 19:20   #9  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,255
DOH!!! Thanks totally missed it! I mixed up x&y
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:13.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.