Ffmpeg hangs on last frame during alphamerge

ffmpegvideo

I'm trying to blur specific part of video using alphamerge command.
The command that I'm using is following:

ffmpeg -y -i "odd resolution.3g2" -loop 1 -i cahceg0 -filter_complex "[0:v]scale='320:178',split=3[er0][ero1][er2];[er0][1:v]alphamerge,boxblur=chroma_radius=4:luma_radius=4:ap=0[alfb0];[er2]crop=256.0:18.956467:32.0:10.797836,boxblur=chroma_radius=4:luma_radius=4[alfb1];[ero1][alfb0]overlay[v0];[v0][alfb1]overlay=32.0:10.797836[v1]" -map [v1] -c:a copy -c:v libx264 output.3g2

The whole process works normally until the very last one frame, then ffmpeg just hangs indefinitely with this last output

frame= 312 fps= 19 q=27.0 size= 512kB time=00:00:17.22 bitrate= 243.5kbits/s speed=1.03x .

At this point only fps and speed value change. The issue fixes if I remove '-loop 1' switch from second input or do not scale the first input but then it does not blur the video I want it to be
I am attaching input files and ffmpeg log

odd_resolution.3g2 cahceg0 ffmpeg_log

Best Answer

Try this workaround:

ffmpeg -y -i "odd resolution.3g2" -loop 1 -i cahceg0 -filter_complex "[0:v]scale='320:178',split=3[er0][ero1][er2];[er0][1:v]alphamerge,boxblur=chroma_radius=4:luma_radius=4:ap=0[alfb0];[er2]crop=256.0:18.956467:32.0:10.797836,boxblur=chroma_radius=4:luma_radius=4[alfb1];[ero1][alfb0]overlay[v0];[v0][alfb1]overlay=32.0:10.797836:repeatlast=0[v1]" -map [v1] -c:a copy -c:v libx264 output.3g2
Related Question