[FFmpeg-user] fast forward and overlay blinking

Andreas Nadobnik andreas at nadobnik.de
Mon Jan 8 09:55:29 EET 2018


Hi there,

I'm trying to cut out and fast forward a part of a video and adding an  
overlay to it. The overlay should change its enable state every 15  
frames. At the moment I'm using this piece of code ...

===== cut ======
ffmpeg_p=(
	-i "${IMG_Path}/media_fastforward.png"
	-filter_complex  
"[0:v]setpts=${Multiplier}*PTS[v1];[0:a]asetrate=(44100/${Multiplier}),aresample=44100[a];[v1]overlay=enable='lt(mod(n\,30)\,15)':x=(main_w-overlay_w-50):y=50[v]"
	-map "[v]"
	-map "[a]"
	-r $RATE
	)

ffmpeg -loglevel error -ss $B -t $BC -i "$IN" "${ffmpeg_p[@]}" -strict  
-2 "$scratch/part-2.mp4"
===== cut ======

My problem is, that the blinking is also increasing its blink  
frequency. Is it possible to avoid this behavior and do the overlay  
(with the defined blink frequency) after the fast forward?

Thanks in advance and best regards,
Andreas



More information about the ffmpeg-user mailing list