I found a video posted on discord once that made the whole webpage underneath it bounce up and down when it was played. I assume it must have been encoded using a codec that supports a variable resolution, so the y frame height got shorter and longer to make the whole page bounce. I downloaded the video and these are the details:

enter image description here

It appears to be a WebM file. I don't understand how it would have been encoded using a variable resolution though. Any ideas how to do this? Can ffmpeg encode a PNG sequence with variable resolutions for each frame into a single video that also has variable resolution?


1 Answer 1


create videos with different resolutions:

ffmpeg -lavfi "color=green:704x396;anullsrc" -t 1 "in-01.webm" -y
ffmpeg -lavfi "color=yellow:640x480;anullsrc" -t 1 "in-02.webm" -y
ffmpeg -lavfi "color=red:800x450;anullsrc" -t 1 "in-03.webm" -y

and concat:

echo "file 'in-01.webm'" > list.txt
echo "file 'in-02.webm'" >> list.txt
echo "file 'in-03.webm'" >> list.txt

ffmpeg -f concat -safe 0 -i "list.txt" -c copy output.webm -y

mpv output.webm

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.