1

I have a large 8k 360 degree image file that I recently rendered. For showcasing purposes, I want to convert this into a few minutes of video so people can view it in youtube's VR 360 viewer. However, this is turning out to be an exceedingly slow process.

Currently I am using ffmpeg: ffmpeg -loop 1 -i input.png -pix_fmt yuv420p -c:v libx264 -preset ultrafast -r 24 -threads 128 -t 1 output.mp4

This only gives me around 1FPS on my (reasonably fast) laptop, and a few more on my more powerful desktop CPU. I have tried using GPU, however FFMPEG errored out saying that my GTX card couldn't handle the 8192x8192 image. So, I'm currently stuck with hours of encoding for a few minutes of video - are there any faster ways of doing this?

BTW I am using linux, I have access to a gaming card (although it might not be useful, as mentioned earlier). I am limited to FOSS/free software at this time - no payed applications. Preferably I would like to do this in ffmpeg. I have an NVME SSD drive so I'm not expecting data read to be a bottleneck, but maybe it is?

2
  • 1
    I would try 2 threads for each physical core. Running too many threads will make the cpu run out of L1 and L2 cache, so It will use system memory which is much slower. Mar 26, 2019 at 5:22
  • I'll try that, thx! As my desktop has 8cores/16 threads, I thought a higher core count would help with the encoding. However, I was hoping for a more elegant solution - something that doesn't decode an 8192x8192 image each time just to re-encode it at 24FPS? seems like a lot of useless work Mar 26, 2019 at 5:29

1 Answer 1

1

If's it just one still image, just render a short segment and then loop a larger file out of it.

ffmpeg -loop 1 -framerate 24 -i input.png -pix_fmt yuv420p -c:v libx264 -preset veryfast -t 5 5s.mp4

and then

ffmpeg -stream_loop 50 -i 5s.mp4 -c copy 255s.mp4 to get a 255 second file.

1
  • Why didn't I think of that? This is genius - thanks a lot Mar 26, 2019 at 15:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .