mpetroff / pannellum

Pannellum is a lightweight, free, and open source panorama viewer for the web.
https://pannellum.org/
MIT License
4.15k stars 710 forks source link

pannellum with video js shows in poor quality #1207

Open aproni34f opened 3 months ago

aproni34f commented 3 months ago

I have the following code to display video with pannellum from video js.

I had to put code on the server so you can see it live: https://interactivepixel.net/tst/2/

I have left video below visible so you can compare (otherwise I would hide the video).

The problem is that the video quality in pannellum is poor. Its like the pannellum is zoomed in but I cannot zoom it out.

Also, if possible how do I make pannellum not zoom video it like that but have the same resolution as the video on start?

Thanks

mpetroff commented 3 months ago

That video isn't an equirectangular panorama. Pannellum only support equirectangular videos.

Since you're telling Pannellum that's it's an equirectangular panorama, even though it isn't, and aren't using the haov, vaov, and vOffset parameters (as demonstrated in the partial panorama example), Pannellum assumes that it's a full 360 x 180 deg panorama and displays it as such, hence it being "zoomed in."

aproni34f commented 3 months ago

Sorry, please try again, I actually wanted to check hls type video. This video is 2x in size (1440/720)

mpetroff commented 3 months ago

Now everything appears to be working as expected.

The resolution is low because your video's resolution is low. In regard to viewing resolution, a 720p equirectangular video, such as the one in your example, with Pannellum's default 100deg horizontal field of view is roughly equivalent to a 240p standard 16:9 video. If you go to YouTube and play a video at 240p, it also looks bad. For equirectangular video, you really want 4096px horizontal resolution, which in the projected view is similar to standard 720p video.