[FFmpeg-devel] [SOLVED] loop Video Filter Not Looping
TalkVideo at TalkVideo.net
TalkVideo at TalkVideo.net
Thu May 9 01:10:49 EEST 2019
On Wed, May 08, 2019 at 11:48:38PM +0200, Paul B Mahol wrote:
> On 5/8/19, TalkVideo at talkvideo.net <TalkVideo at talkvideo.net> wrote:
> > The commands below all produce an output with a smaller video overlaid in
> > the upper left. But, it will not loop. It plays
> > the overlay until its end, and stays on the last frame.
> >
> > The overlay must of course be shorter in time than the main video, but in an
> > RTMP stream, I would like to bring overlays in and out, in order to play
> > clips during the stream. When the clip is done, It should disappear.
> >
>
> Your loop filter incarnation is invalid. Size must be size of looped
> frames and not unset.
>
> > The Warning I get is:
> > "[Parsed_movie_1 @ 0x3ccb380] EOF timestamp not reliable"
> >
> > The overlay video was produced with the following command:
> >
> > ffmpeg -y -ss 23 -i <some-video-file> -qmin 1 -qmax 2 -s 640x360 -t 2
> > overlay.flv
> >
> >
> > My FFMPEG Is:
> > ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers
> > built with gcc 7 (GCC)
> > configuration: --extra-libs=-lpthread --extra-libs=-lm --enable-gpl
> > --enable-libfdk_aac --enable-libfreetype --enable-libmp3lame
> > --enable-libx264 --enable-nonfree --enable-fontconfig --enable-libfribidi
> > libavutil 56. 22.100 / 56. 22.100
> > libavcodec 58. 35.100 / 58. 35.100
> > libavformat 58. 20.100 / 58. 20.100
> > libavdevice 58. 5.100 / 58. 5.100
> > libavfilter 7. 40.101 / 7. 40.101
> > libswscale 5. 3.100 / 5. 3.100
> > libswresample 3. 3.100 / 3. 3.100
> > libpostproc 55. 3.100 / 55. 3.100
> >
> > Thanks.
> >
> >
> > /usr/local/bin/ffmpeg -re -y -i Input.flv -c:v libx264 -x264-params
> > "nal-hrd=vbr" -filter_complex "copy[in2];
> > movie=overlay.flv,loop=0,setpts=N/FRAME_RATE/TB,scale=640:360[tmp2];
> > [in2][tmp2]overlay=70:100:shortest=0" -qmin 1 -qmax 15 -c:a aac -b:a 128k
> > -b:v 8M -maxrate 80M -bufsize 80M -g 15 -preset ultrafast -s 1920x1080 -r
> > 30 -pix_fmt yuv420p -f mp4 -t 20 out.mp4
> >
> > /usr/local/bin/ffmpeg -re -y -i Input.flv -c:v libx264 -x264-params
> > "nal-hrd=vbr" -filter_complex "copy[in2];
> > movie=overlay.flv,loop=0,setpts=N/FRAME_RATE/TB,scale=640:360[tmp2];
> > [tmp2]loop=0[tmp3]; [in2][tmp3]overlay=70:100:shortest=0" -qmin 1 -qmax 15
> > -c:a aac -b:a 128k -b:v 8M -maxrate 80M -bufsize 80M -g 15 -preset
> > ultrafast -s 1920x1080 -r 30 -pix_fmt yuv420p -f mp4 -t 20 out.mp4
> >
> > /usr/local/bin/ffmpeg -re -y -i Input.flv -c:v libx264 -x264-params
> > "nal-hrd=vbr" -filter_complex "copy[in2];
> > movie=overlay.flv,setpts=N/FRAME_RATE/TB,scale=640:360[tmp2];
> > [tmp2]loop=0[tmp3]; [in2][tmp3]overlay=70:100:shortest=0" -qmin 1 -qmax 15
> > -c:a aac -b:a 128k -b:v 8M -maxrate 80M -bufsize 80M -g 15 -preset
> > ultrafast -s 1920x1080 -r 30 -pix_fmt yuv420p -f mp4 -t 20 out.mp4
> >
> > /usr/local/bin/ffmpeg -re -y -i Input.flv -c:v libx264 -x264-params
> > "nal-hrd=vbr" -filter_complex "copy[in2];
> > movie=overlay.flv,setpts=N/FRAME_RATE/TB,scale=640:360[tmp2];
> > [tmp2]loop=0[tmp3]; [in2][tmp3]overlay=70:100:shortest=0" -qmin 1 -qmax 15
> > -c:a aac -b:a 128k -b:v 8M -maxrate 80M -bufsize 80M -g 15 -preset
> > ultrafast -s 1920x1080 -r 30 -f flv
> > rtmp://a.rtmp.youtube.com/live2/<stream-key>
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel at ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> > To unsubscribe, visit link above, or email
> > ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
That worked. This page:
https://video.stackexchange.com/questions/12905/repeat-loop-input-video-with-ffmpeg/16933#16933
Has some info regarding that. Thanks.
I changed the loop filter to:
[tmp2]loop=2:60:1[tmp3];
Added number of frames to loop and skip. Worked. Thanks.
More information about the ffmpeg-devel
mailing list