Closed elijahsgh closed 10 months ago
I haven’t run it myself, but I suspect the issue might be with the flags passed to ffmpeg. The essence of write_video is that it calls imageio-ffmpeg for rendering, but the flags for webm are probably incorrect. I will verify this later, so please wait a bit
I was trying to poke around a bit but I'm not sure what the problem is. Here are the flags output:
FFMPEG COMMAND:
/home/user/projects/movis-playground/.venv/lib/python3.11/site-packages/imageio_ffmpeg/binaries/ffmpeg-linux64-v4.2.2 -y -f rawvideo -vcodec rawvideo -s 1080x1900 -pix_fmt rgba -r 30.00 -i - -an -vcodec libx264 -pix_fmt yuv420p -v error /home/user/projects/movis-playground/output.webm
Ah, I see. Since WebM does not support h264 but uses vp9, try specifying the codec like this:
scene.write_video("output.webm", codec="libvpx-vp9")
Also, as movies use (W, H) instead of (H, W), I think scene = mv.layer.Composition(size=(1920, 1080), duration=4.0)
would probably be appropriate.
Worked perfectly. Thanks! The vertical resolution was intended for vertically oriented social media shares.
Code:
Output:
Is this my version of ffmpeg or...? I'm not sure how to solve this.