[FFmpeg-user] fixed size cropping rectangle, moving in time
Sub Phil
phil4000n at gmail.com
Tue Dec 16 22:22:48 CET 2014
Ref:
* https://www.ffmpeg.org/ffmpeg-utils.html#Expression-Evaluation
* https://www.ffmpeg.org/ffmpeg-filters.html#Examples-22
Hello,
I wish to have a fixed size cropping rectangle, that changes its x-position
after say 15 sec for an initial x position of say 200 to 100.
Do I miss some quotes??
First attempt:
F:\>ffmpeg -i timeC.mp4 -vf
"crop=in_w-700:in_h-100:if(lte(t,15),200,100):80" -an -c:v libx264
-preset:v ultrafast "test.mp4"
ffmpeg version N-68399-g10ef8f0 Copyright (c) 2000-2014 the FFmpeg
developers
built on Dec 12 2014 22:12:56 with gcc 4.9.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fo
ntconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass
--enable-libbluray --enable-libbs2b --ena
ble-libcaca --enable-libfreetype --enable-libgme --enable-libgsm
--enable-libilbc --enable-libmodplug --enable-li
bmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libopenjpeg --enable-libopus --enable-lib
rtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex
--enable-libtheora --enable-libtwolame --enable-
libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis
--enable-libvpx --enable-libwavpack -
-enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs
--enable-libxvid --enable-decklink --enable-zl
ib
libavutil 54. 15.100 / 54. 15.100
libavcodec 56. 14.100 / 56. 14.100
libavformat 56. 15.104 / 56. 15.104
libavdevice 56. 3.100 / 56. 3.100
libavfilter 5. 3.101 / 5. 3.101
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'timeC.mp4':
Metadata:
major_brand : MSNV
minor_version : 19595353
compatible_brands: MSNVmp42isom
creation_time : 2014-11-26 09:19:45
Duration: 00:00:23.52, start: 0.000000, bitrate: 8838 kb/s
Stream #0:0(und): Video: mpeg4 (Advanced Coding Profile) (mp4v /
0x7634706D), yuv420p, 1280x720 [SAR 1:1 DAR
16:9], 8771 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 30k tbc (default)
Metadata:
creation_time : 2014-11-26 09:19:45
handler_name : Video Media Handler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 24000 Hz, mono,
fltp, 64 kb/s (default)
Metadata:
creation_time : 2014-11-26 09:19:45
handler_name : Sound Media Handler
[AVFilterGraph @ 0000000005958f80] No such filter: '15)'
Error opening filters!
F:\>
And 2nd attempt with more quotes:
F:\>ffmpeg -i timeC.mp4 -vf
"crop=in_w-700:in_h-100:if('lte(t,15)','200','100'):80" -an -c:v libx264
-preset:v ul
trafast "test.mp4"
ffmpeg version N-68399-g10ef8f0 Copyright (c) 2000-2014 the FFmpeg
developers
built on Dec 12 2014 22:12:56 with gcc 4.9.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fo
ntconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass
--enable-libbluray --enable-libbs2b --ena
ble-libcaca --enable-libfreetype --enable-libgme --enable-libgsm
--enable-libilbc --enable-libmodplug --enable-li
bmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libopenjpeg --enable-libopus --enable-lib
rtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex
--enable-libtheora --enable-libtwolame --enable-
libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis
--enable-libvpx --enable-libwavpack -
-enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs
--enable-libxvid --enable-decklink --enable-zl
ib
libavutil 54. 15.100 / 54. 15.100
libavcodec 56. 14.100 / 56. 14.100
libavformat 56. 15.104 / 56. 15.104
libavdevice 56. 3.100 / 56. 3.100
libavfilter 5. 3.101 / 5. 3.101
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'timeC.mp4':
Metadata:
major_brand : MSNV
minor_version : 19595353
compatible_brands: MSNVmp42isom
creation_time : 2014-11-26 09:19:45
Duration: 00:00:23.52, start: 0.000000, bitrate: 8838 kb/s
Stream #0:0(und): Video: mpeg4 (Advanced Coding Profile) (mp4v /
0x7634706D), yuv420p, 1280x720 [SAR 1:1 DAR
16:9], 8771 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 30k tbc (default)
Metadata:
creation_time : 2014-11-26 09:19:45
handler_name : Video Media Handler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 24000 Hz, mono,
fltp, 64 kb/s (default)
Metadata:
creation_time : 2014-11-26 09:19:45
handler_name : Sound Media Handler
[AVFilterGraph @ 0000000005778f80] No such filter: '200'
Error opening filters!
F:\>
Thanks.
More information about the ffmpeg-user
mailing list