gkv311 / sview

Stereoscopic media player
GNU General Public License v3.0
93 stars 34 forks source link

add page flipping in android and support for shutter glasses #127

Open jandy123 opened 5 months ago

jandy123 commented 5 months ago

I've been experimenting with page flipping in android. For playing SBS videos, there is rekindle, see https://play.google.com/store/apps/details?id=com.holoshader.holoplayer&hl=nl&gl=US which sends sync to active glasses via USB OTG to a certain dongle.

From my experiments (free running, mostly), although frame tearing is an issue without quad-buffer support, the results are acceptable, in my opinion. Probably, it depends on HW, refresh rate, etc. I've been using 120Hz, btw. on a samsung s20 ultra.

Compared to rekindle, for multiple reasons, sView is much more useful. Among others, it's free, open source and supports videos and MPOs. Great work btw. :).

So, here it is: would be great to have page flipping supported in android (via quad-buffer emulation) and support for shutter glasses via nvstusb library https://github.com/eruffaldi/libnvstusb or 3DVisionAVR, see https://github.com/lukis101/3DVisionAVR.

Unfortunately, I have no experience with programming EGL in android. If someone can make a start, I can help too with testing, adding support for the above libraries and glasses, etc.

Curious about devs reactions...

ThreeDeeJay commented 3 months ago

Man, it would be awesome if they kept IR blaster on phones like in some old Galaxy Note phones and we could use them for 3D Vision shutter glasses. Are you using those? if so, did you manage to get the 3D Vision IR emitter working with the glasses on Android?

Are mobile OLED panels really fast enough for minimal ghosting, though? I thought 3D Vision required LCD and lightboost/strobing to work properly.

It would be great to add this to Kodi as well, along with MVC decoding to watch Blu-ray 3D movies on the go šŸ‘€šŸ‘Œ

jandy123 commented 3 months ago

Have a look at Rekindle 3D. They use an IR USB dongle.

I've been myself experimenting with the rekindle app, but with free viewing. The results are very nice on a Samsung S20 ultra (120Hz amoled).

I also built myself a usb dongle (see https://www.mtbs3d.com/phpbb/viewtopic.php?t=22730) which supports multiple glasses, including 3DVision. I also patched sView to use a patched nvstusb library and works decent in linux with a lenovo 144Hz gaming laptop.

It's a pity, but I did not get any reaction from the sView devs.

ThreeDeeJay commented 3 months ago

Interesting. Would you mind posting a photograph of a high-contrast (like with many sharp white on black edges) 3D image? With the lens behind the glasses, ofc, to see how much of a view leaks into the other eye.

I posted this on the 3D Vision discord server, which I recommend joining šŸ‘€šŸ‘Œ Cuz yeah the dev has been inactive for a while so he's probably busy or something šŸ‘€šŸ’¦

But if you or someone do get a chance to implement this on android, you can grab the CI workflow I posted on here to build the android APK easily

BTW I managed to add sView as an external player in Kodi so we could use this method to view 3D. Though come to think of it, Kodi already has 3D support so perhaps you could look into implementing this type of 3D there as well.

ThreeDeeJay commented 1 month ago

Quick follow-up for anyone who's curious jandy123 managed to compile an APK with 3D Vision IR emitter support (via USB Hub) for phones with at least 120hz displays (60FPS per eye): sView_3dvision.zip

And it works!.. mostly. About 2/3 of the display shows proper 3D (minor ghosting aside), but the right side (viewed in landscape mode) one view starts to transition into the other, so we were discussing the possibility of adjusting a delay but we're not sure how to do it for 3D Vision emitters.

Also, when playback starts (whether it's an image in slideshow or a video), it becomes unstable, with judder, framedrops and eye swaps. I tested it with a modern, high-end flagship devices like a Sony Xperia and Samsung Galaxy Ultra though I got worse results with the latter.

For anyone joining the server I linked on my previous message, here's our discussion.