<p>create videos with different resolutions:</p>
<pre><code>ffmpeg -lavfi &quot;color=green:704x396;anullsrc&quot; -t 1 &quot;in-01.webm&quot; -y
ffmpeg -lavfi &quot;color=yellow:640x480;anullsrc&quot; -t 1 &quot;in-02.webm&quot; -y
ffmpeg -lavfi &quot;color=red:800x450;anullsrc&quot; -t 1 &quot;in-03.webm&quot; -y
</code></pre>
<p>and concat:</p>
<pre><code>echo &quot;file 'in-01.webm'&quot; &gt; list.txt
echo &quot;file 'in-02.webm'&quot; &gt;&gt; list.txt
echo &quot;file 'in-03.webm'&quot; &gt;&gt; list.txt

ffmpeg -f concat -safe 0 -i &quot;list.txt&quot; -c copy output.webm -y

mpv output.webm
</code></pre>

CC BY-SA 4.0
2023-03-12T07:01:50.890Z
2023-03-12T07:01:50.890Z
Баяр Гончикжапов
<p>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:</p>
<p><a href="https://i.sstatic.net/DRFeP.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/DRFeP.png" alt="enter image description here" /></a></p>
<p>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?</p>

CC BY-SA 4.0
2023-03-11T05:06:41.777Z
concat demuxer http://ffmpeg.org/ffmpeg-all.html#concat-1
Баяр Гончикжапов
CC BY-SA 4.0
2023-03-11T16:14:39.830Z
@БаярГончикжапов, I'm sorry, I'm not quite following. Could you provide an example?
EllipticalInitial
<ffmpeg>
Codecs supporting variable resolution (y height of frame changes with time)?
EllipticalInitial
# Codecs supporting variable resolution (y height of frame changes with time)?

(Asked by: username_0 on 2023-03-10)

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](https://i.sstatic.net/DRFeP.png)](https://i.sstatic.net/DRFeP.png)

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?

**Tags:** ffmpeg

> **Comments:**
> **username_1**: concat demuxer http://ffmpeg.org/ffmpeg-all.html#concat-1  
> **username_0**: @БаярГончикжапов, I'm sorry, I'm not quite following. Could you provide an example?  

---

## 1 answers

### Answer by username_1 on 2023-03-12. Score: 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


---

