Options for video pan, zoom, and scrub capabilities

Hello Embers,

I have been asked to provide a video playback solution that would allow for panning, zooming, and scrubbing of high resolution (6K) scientific image video. What would the path look like for doing this with (ideally hardware-accelerated) video in Cinder? And if there is a path to this for an inexperienced graphics programmer like me, what are the possibilities for UI?

I’m trying to gauge feasibility.

Thanks much

I just did a quick test with my video block and was able to play a 60fps 8K AV1 video at 60fps on a 3070 after installing the free AV1 codec from the windows store. I believe HEVC video is supported the same way, though that might cost a nominal fee.

Seek performance isn’t great, but I know there’s an extension method to the underlying media engine that enables approximate seeking which would likely be a bit quicker which I’d be happy to implement for you.

As for UI, imgui has come a long way and you can do a hell of a lot very quickly, as long as your use case falls roughly inline with the problems that library is intending to solve.

1 Like

Hi Lithium,

Lithium! As always, thank you so much for your reply, your video blocks, and support of this community. I really appreciate it.

When you mean seeking, do you mean seeking as related to scrubbing or seeking as related to panning and zooming to a point in the image?

When you said “scrubbing” i assumed you meant jumping around in time. Panning around and drawing sub regions of the image is free.

Oh, I see what you mean. Sorry for any confusion. I am looking to implement scrubbing as well as panning and zooming. And some crazy requests for the UI, but I feel more confident in that area.

Yes! Any additions to your block that support these would be much appreciated. I can trial these as well.

Also, are there any online video playback learning resources that you can recommend and that are top of mind? I’d like to be able to follow along with your code and changes, if possible.

Ok I’ve added the approximate seeking mode changes, but to be honest I didn’t notice a huge performance increase. Obviously the way the source video is encoded will have a huge impact on seek performance because of the various key frame types and whatnot so it may still bear fruit given the right source material. :man_shrugging:

I’m not the guy to ask about the nitty gritty of video playback, this thing is mostly just a wrapper around the windows media foundation with a few added conveniences as it pertains to using it in cinder, much of how this stuff works internally is beyond my grasp, unfortunately.

Okay, I’ll read up on Windows Media Foundation and give this a try this week and report back. Thank you!

when I get requests for a video heavy project I always request a Mac Pro.
It’s super easy and fast to load heavy videos with the Cinder Mac version. Had a lot of projects running multiple 4K proress videos (sometimes with alpha) without any issue and low cpu load due the good decoding on the gpu.

I’m also running Linux Cinder project which runs smooth multiple videos, did not test scrubbing here.
This is also new for me so no experience with Linux in the long run.