Day 13: No zero days November – 2023

Another big breakthrough today. Yesterday I was able to create videos with the FFmpeg library with dummy code (random PackedByteArray filled with random to generate the video you saw yesterday), but today the renderer completely works.

Render profiles

When you start the render process, you need to supply a render profile which contains the data the renderer need to process the frames and create the result (video file). There is data which I’ll add later such as a way to change the swscaler ‘s SWS_BILINEAR setting which causes some graphical glitches when the size is too small.

Rendering images was a pain

I want to quickly talk about my journey today, first of all thanks to Slander on Discord for helping with some of the coding advice today. Been struggling a bit more with my migraine, only 3 hours of sleep and nothing seemed to work anymore. The overall code is surprisingly little, but as it often is with coding, the smallest mistake can break everything hahah. Problems ranging from crashing (which are impossible to troubleshoot if the crashes come from the gdextension), video files being completely empty, video files with only render artifacts, video files, with the scaling being all over the place, …

Basically a busy day hahaha. Glad that it’s over and starting tomorrow I will or work on the timeline for a bit, or work on the importer. Probably the latter one now that all the FFmpeg stuff is still in my head. The importer will be a real challenge. Also, the renderer is “complete” between brackets as I still have no way of testing audio as long as the timeline does not work. So Audio is not implemented in the renderer yet.

Render times

Right now it can render out a 10 second video at:

  • 11.76 seconds with codec mpeg2video (.mp4)
  • 13.28 seconds with codec mpeg1video (.mp4)
  • 33.77 seconds taken by codec libtheora (.ogg) but failed to render
  • dnf for vp8/vp9 (libvpx), takes too long and I don’t have patience hahah my pc is just too old ^^”
  • 38.33 seconds with codec libwebp (.webp)
  • 10.79 seconds with codec libx264 (.mp4)
  • 17.20 seconds with codec libx265 (.mp4)
  • 13.00 seconds with codec libxvid (basically mpeg-4)