Re: [FFmpeg-user] Create a video using images and audio with blend and zoom filters using FFmpeg

2016-10-12 Thread Nikhil M Ranka
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
>   libavformat57. 51.106 / 57. 51.106
>   libavdevice57.  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
>   libpostproc54.  0.100 / 54.  0.100
> Input #0, image2, from '164470_2.jpg':
>   Duration: 00:00:00.04, start: 0.00, 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.00, 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.00, 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  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

Re: [FFmpeg-user] Create a video using images and audio with blend and zoom filters using FFmpeg

2016-10-12 Thread Nikhil M Ranka
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
>   libavformat55. 43.100 / 55. 43.100
>   libavdevice55. 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
>   libpostproc52.  3.100 / 52.  3.100
> Input #0, image2, from '164470_2.jpg':
>   Duration: 00:00:00.04, start: 0.00, 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.00, 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.00, 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  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@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
>
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] Create a video using images and audio with blend and zoom filters using FFmpeg

2016-10-12 Thread Reto Kromer
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@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] Create a video using images and audio with blend and zoom filters using FFmpeg

2016-10-12 Thread Nikhil M Ranka
Thank for the reply. It is this command that I am facing issues with. Can
you tell me how to fix it? Have already spent hours if not days finding a
solution for this

**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
>   libavformat55. 43.100 / 55. 43.100
>   libavdevice55. 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
>   libpostproc52.  3.100 / 52.  3.100
> Input #0, image2, from '164470_2.jpg':
>   Duration: 00:00:00.04, start: 0.00, 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.00, 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.00, 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*
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] Create a video using images and audio with blend and zoom filters using FFmpeg

2016-10-12 Thread Carl Eugen Hoyos
2016-10-12 12:36 GMT+02:00 Nikhil M Ranka :

> ffmpeg -framerate 1/4 -start_number 1 -i 164470_%d.jpg -c:v libx264 -r
>> 30 -pix_fmt yuv420p -vf scale=16:9 out.mp4

start_number 1 is / was never necessary.

> Then, tried adding an audio to the video, and this is the command I used.
>
> ffmpeg -framerate 1/4 -start_number 1 -i 164470_%d.jpg -i audio.wav
> -c:v libx264 -tune stillimage -c:a aac -strict experimental -b:a 192k
> -pix_fmt yuv420p -shortest outWithAudioNew.mp4

-strict experimental is not necessary anymore for our aac encoder.

> ffmpeg version N-63893-gc69defd Copyright (c) 2000-2014

This is old and unsupported, if you don't want to compile yourself,
you can download a binaries that other users provide from external
sites linked from our download page:
http://ffmpeg.org/download.html

> Not all the images I use have the same resolution, can FFmpeg
> work with such images?

It will automatically scale them to the output resolution (that defaults to
the resolution of the first input frame).

Carl Eugen
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".