[FFmpeg-user] Create a video using images and audio with blend and zoom filters using FFmpeg
Nikhil M Ranka
nikhil.r at geazy.com
Wed Oct 12 20:58:14 EEST 2016
Using this command I am trying to generate a video with a combination of
both blend and zoompan fiters.
> ffmpeg \
> -loop 1 -t 5 -i 164470_2.jpg \
> -loop 1 -t 5 -i 164470_4.jpg \
> -loop 1 -t 5 -i 164470_5.jpg \
> -filter_complex \
> "[0:v]zoompan=z='min(zoom+0.0015,1.5)':d=700:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)'[v0];
> \
> [1:v]zoompan=z='min(zoom+0.0015,1.5)':d=700:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)'[v1];
> \
> [2:v]zoompan=z='min(zoom+0.0015,1.5)':d=700:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)'[v2];
> \
> [1:v][0:v]blend=all_expr='A*(if(gte(T,1.5),1,T/1.5))+B*(1-(if(gte(T,1.5),1,T/1.5)))'[b1v];
> \
> [2:v][1:v]blend=all_expr='A*(if(gte(T,1.5),1,T/1.5))+B*(1-(if(gte(T,1.5),1,T/1.5)))'[b2v];
> \
> [v0][b1v][v1][b2v][v2]concat=n=5,format=yuv420p[v]" \
> -map "[v]" -aspect 16:9 outWithBlendAndZoom.mp4
Here is the output of the command.
> ffmpeg version N-81972-g8063978-static http://johnvansickle.com/ffmpeg/
> Copyright (c) 2000-2016 the FFmpeg developers
> built with gcc 5.4.1 (Debian 5.4.1-2) 20160904
> configuration: --enable-gpl --enable-version3 --enable-static
> --disable-debug --disable-ffplay --disable-indev=sndio
> --disable-outdev=sndio --cc=gcc-5 --enable-fontconfig --enable-frei0r
> --enable-gnutls --enable-gray --enable-libass --enable-libebur128
> --enable-libfreetype --enable-libfribidi --enable-libmp3lame
> --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
> --enable-libopus --enable-librtmp --enable-libsoxr --enable-libspeex
> --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc
> --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264
> --enable-libx265 --enable-libxvid --enable-libzimg
> libavutil 55. 32.100 / 55. 32.100
> libavcodec 57. 61.102 / 57. 61.102
> libavformat 57. 51.106 / 57. 51.106
> libavdevice 57. 0.102 / 57. 0.102
> libavfilter 6. 63.100 / 6. 63.100
> libswscale 4. 1.100 / 4. 1.100
> libswresample 2. 2.100 / 2. 2.100
> libpostproc 54. 0.100 / 54. 0.100
> Input #0, image2, from '164470_2.jpg':
> Duration: 00:00:00.04, start: 0.000000, bitrate: 253286 kb/s
> Stream #0:0: Video: mjpeg, yuvj422p(pc, bt470bg/unknown/unknown),
> 1600x1200, 25 fps, 25 tbr, 25 tbn, 25 tbc
> Input #1, image2, from '164470_4.jpg':
> Duration: 00:00:00.04, start: 0.000000, bitrate: 220653 kb/s
> Stream #1:0: Video: mjpeg, yuvj422p(pc, bt470bg/unknown/unknown),
> 1600x1200, 25 fps, 25 tbr, 25 tbn, 25 tbc
> Input #2, image2, from '164470_5.jpg':
> Duration: 00:00:00.04, start: 0.000000, bitrate: 253983 kb/s
> Stream #2:0: Video: mjpeg, yuvj422p(pc, bt470bg/unknown/unknown),
> 1600x1200, 25 fps, 25 tbr, 25 tbn, 25 tbc
> File 'outWithBlendAndZoom.mp4' already exists. Overwrite ? [y/N] y
> [swscaler @ 0xae59120] deprecated pixel format used, make sure you did set
> range correctly
> [swscaler @ 0xae93060] deprecated pixel format used, make sure you did set
> range correctly
> [swscaler @ 0xaeccfc0] deprecated pixel format used, make sure you did set
> range correctly
> [swscaler @ 0xaf06f20] deprecated pixel format used, make sure you did set
> range correctly
> [swscaler @ 0xaf40e80] deprecated pixel format used, make sure you did set
> range correctly
> [swscaler @ 0xaf7ade0] deprecated pixel format used, make sure you did set
> range correctly
> [swscaler @ 0xafb4d40] deprecated pixel format used, make sure you did set
> range correctly
> [Parsed_concat_5 @ 0xae32c60] Input link in1:v0 parameters (size
> 1600x1200, SAR 0:1) do not match the corresponding output link in0:v0
> parameters (1280x720, SAR 0:1)
> [Parsed_concat_5 @ 0xae32c60] Failed to configure output pad on
> Parsed_concat_5
> Error configuring complex filters.
> Invalid argument
Any inputs here which would fix the issue with the command would be greatly
appreciated.
Thanks
Regards,
*Nikhil*
On Wed, Oct 12, 2016 at 5:55 PM, Nikhil M Ranka <nikhil.r at geazy.com> wrote:
> Yes, as per Carl's suggestion, I installed the latest version
>
> ffmpeg version N-81972-g8063978-static http://johnvansickle.com/ffmpeg/
> Copyright (c) 2000-2016 the FFmpeg developers
>
> Now, can you look at the command which is to generate a video with blend
> and zoom filters and help me with fixing that?
>
>
> **Blend with zoom**
>
>>
>> ffmpeg \
>> -loop 1 -t 5 -i 164470_2.jpg \
>> -loop 1 -t 5 -i 164470_3.jpg \
>> -loop 1 -t 5 -i 164470_5.jpg \
>> -filter_complex \
>> "[0:v]zoompan=z='min(zoom+0.0015,1.5)':d=700:x='iw/2-(iw/zoo
>> m/2)':y='ih/2-(ih/zoom/2)'[v0]; \
>> [1:v]zoompan=z='min(zoom+0.0015,1.5)':d=700:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)'[v1];
>> \
>> [2:v]zoompan=z='min(zoom+0.0015,1.5)':d=700:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)'[v2];
>> \
>> [1:v][0:v]blend=all_expr='A*(if(gte(T,1.5),1,T/1.5))+B*(1-(if(gte(T,1.5),1,T/1.5)))'[b1v];
>> \
>> [2:v][1:v]blend=all_expr='A*(if(gte(T,1.5),1,T/1.5))+B*(1-(if(gte(T,1.5),1,T/1.5)))'[b2v];
>> \
>> [v0][b1v][v1][b2v][v2]concat=n=5,format=yuv420p[v]" \
>> -map "[v]" -aspect 16:9 outWithBlendAndZoom.mp4
>
>
> This command did not work out, I am not sure why. Here is the output:
>
> ffmpeg version N-63893-gc69defd Copyright (c) 2000-2014 the FFmpeg
>> developers
>> built on Oct 31 2014 05:16:04 with gcc 4.6 (Debian 4.6.3-1)
>> configuration: --prefix=/root/ffmpeg-static/32bit --arch=x86_32
>> --extra-cflags='-m32 -I/root/ffmpeg-static/32bit/include -static'
>> --extra-ldflags='-m32 -L/root/ffmpeg-static/32bit/lib -static'
>> --extra-libs='-lxml2 -lexpat -lfreetype' --enable-static --disable-shared
>> --disable-ffserver --disable-doc --enable-bzlib --enable-zlib
>> --enable-postproc --enable-runtime-cpudetect --enable-libx264 --enable-gpl
>> --enable-libtheora --enable-libvorbis --enable-libmp3lame --enable-gray
>> --enable-libass --enable-libfreetype --enable-libopenjpeg --enable-libspeex
>> --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-version3
>> --enable-libvpx
>> libavutil 52. 89.100 / 52. 89.100
>> libavcodec 55. 66.101 / 55. 66.101
>> libavformat 55. 43.100 / 55. 43.100
>> libavdevice 55. 13.101 / 55. 13.101
>> libavfilter 4. 8.100 / 4. 8.100
>> libswscale 2. 6.100 / 2. 6.100
>> libswresample 0. 19.100 / 0. 19.100
>> libpostproc 52. 3.100 / 52. 3.100
>> Input #0, image2, from '164470_2.jpg':
>> Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
>> Stream #0:0: Video: mjpeg, yuvj422p(pc), 1600x1200, 25 fps, 25
>> tbr, 25 tbn, 25 tbc
>> Input #1, image2, from '164470_3.jpg':
>> Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
>> Stream #1:0: Video: mjpeg, yuvj422p(pc), 1600x1200, 25 fps, 25
>> tbr, 25 tbn, 25 tbc
>> Input #2, image2, from '164470_5.jpg':
>> Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
>> Stream #2:0: Video: mjpeg, yuvj422p(pc), 1600x1200, 25 fps, 25
>> tbr, 25 tbn, 25 tbc
>> File 'outWithBlendAndZoom.mp4' already exists. Overwrite ? [y/N] y
>> [swscaler @ 0xba66100] deprecated pixel format used, make sure you
>> did set range correctly
>> [swscaler @ 0xbaa23a0] deprecated pixel format used, make sure you
>> did set range correctly
>> [swscaler @ 0xbac4680] deprecated pixel format used, make sure you
>> did set range correctly
>> [swscaler @ 0xbae6960] deprecated pixel format used, make sure you
>> did set range correctly
>> [swscaler @ 0xbb07260] deprecated pixel format used, make sure you
>> did set range correctly
>> [swscaler @ 0xbb2af20] deprecated pixel format used, make sure you
>> did set range correctly
>> [swscaler @ 0xbb4d200] deprecated pixel format used, make sure you
>> did set range correctly
>> [Parsed_concat_5 @ 0xba8e060] Input link in1:v0 parameters (size
>> 1600x1200, SAR 0:1) do not match the corresponding output link in0:v0
>> parameters (1280x720, SAR 0:1)
>> [Parsed_concat_5 @ 0xba8e060] Failed to configure output pad on
>> Parsed_concat_5
>>
>
> Regards,
> *Nikhil*
>
> On Wed, Oct 12, 2016 at 5:35 PM, Reto Kromer <lists at reto.ch> wrote:
>
>> Nikhil M Ranka wrote:
>>
>> > ffmpeg version N-63893-gc69defd Copyright (c) 2000-2014
>> >the FFmpeg developers built on Oct 31 2014 05:16:04
>>
>> As Carl Eugen already mentioned, you should really update.
>>
>> Best regards, Reto
>>
>> _______________________________________________
>> ffmpeg-user mailing list
>> ffmpeg-user at ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>
>> To unsubscribe, visit link above, or email
>> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
>>
>
>
More information about the ffmpeg-user
mailing list