[FFmpeg-devel] loop Video Filter Not Looping
TalkVideo at TalkVideo.net
TalkVideo at TalkVideo.net
Thu May 9 00:36:14 EEST 2019
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.
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>
More information about the ffmpeg-devel
mailing list