Viewing S3D videos with MPlayer on Linux using Genlock

Post Reply
User avatar
Fredz
Petrif-Eyed
Posts: 2255
Joined: Sat Jan 09, 2010 2:06 pm
Which stereoscopic 3D solution do you primarily use?: LCD shutter glasses
Location: Perpignan, France
Contact:

Viewing S3D videos with MPlayer on Linux using Genlock

Post by Fredz »

Hi,

following my post about Compiling and using Genlock on Linux, I didn't realize it was immediately usable with MPlayer. Actually, you just need to launch MPlayer with a S3D video in side-by-side full resolution format, then go fullscreen while the genlock module and the eDimensional glasses are activated.

The only problem is that there is no control to invert the eyes with Genlock yet, so you'll need to keep on activating/unactivating the stereo effect until the display order is correct, depending on the ordering of the frames in the video. You may have to do the same when a vertical retrace is missed during playing too.

I think it should not be that hard to modify genlock to make it able to invert the display when there is a missed vertical retrace. An addition to MPlayer to send a command to genlock to invert the rendering could be a nice addition too.

You can watch other formats than side-by-side full resolution by playing with MPlayer parameters as described in this thread : Using mplayer/mencoder with 3d videos.

I'll keep you informed when I come up with something more usable...

User avatar
Fredz
Petrif-Eyed
Posts: 2255
Joined: Sat Jan 09, 2010 2:06 pm
Which stereoscopic 3D solution do you primarily use?: LCD shutter glasses
Location: Perpignan, France
Contact:

Re: Viewing S3D videos with MPlayer on Linux using Genlock

Post by Fredz »

Just a little addition for half resolution side-by-side movies, since they seem to be quite common these days. You just need to add "-x 2" to see them with MPlayer and Genlock.

After intensive testing, I'm quite disappointed by the frequency of lost vertical retraces which produce eyes inversion. I don't know if the code can be modified to avoid them though, I'll investigate a little bit further...

mickeyjaw
Cross Eyed!
Posts: 131
Joined: Sun Feb 15, 2009 12:50 pm

Re: Viewing S3D videos with MPlayer on Linux using Genlock

Post by mickeyjaw »

That's weird because in my testing last night I didn't have any missed retraces as far as i can tell. The longest video I watched was about 10mins and I was watching mostly 720p side-by-side video leeched off youtube (Firefox+DownloadHelper rocks), as well as some 480p clips from 3dtv.at. My command line was usually something like:

Code: Select all

mplayer filename.mp4 -vo x11 -vf dsize=1280x720,scale=2048:768
My setup:

Pentium D 3.0Ghz (2xPentium 4 HT in one package, 800mhz FSB)
2GB DDR2 666
Geforce 7900GTX 512MB (Not using hardware accelaration because -vo is set to X11)
Ubuntu 9.04

Not quite sure if the mplayer I used was the stock one that comes with Ubuntu or the version I built from SVN a few months ago, I will have to check when I get home. Some things to think about:

Does your machine hit 100% CPU when it drops frames?
Does the CPU load causing frame drops come from userland or the kernel?
How fast is your machine?
Does mplayer drop frames playing the same video without genlock enabled?
What timer options do you have in your kernel? Hight precision event timers? Tickless/Dynamic Kernel?

User avatar
Fredz
Petrif-Eyed
Posts: 2255
Joined: Sat Jan 09, 2010 2:06 pm
Which stereoscopic 3D solution do you primarily use?: LCD shutter glasses
Location: Perpignan, France
Contact:

Re: Viewing S3D videos with MPlayer on Linux using Genlock

Post by Fredz »

mickeyjaw wrote:That's weird because in my testing last night I didn't have any missed retraces as far as i can tell.
Did you have a look at /var/log/messages ? It shoes a lot of "PROBABLY OUT OF SYNC" messages on my machine.
mickeyjaw wrote:My command line was usually something like:

Code: Select all

mplayer filename.mp4 -vo x11 -vf dsize=1280x720,scale=2048:768
Why don't you use the X Video driver ? It's a lot faster than the x11 one on my machine.
mickeyjaw wrote:Does your machine hit 100% CPU when it drops frames?
Does the CPU load causing frame drops come from userland or the kernel?
How fast is your machine?
Does mplayer drop frames playing the same video without genlock enabled?
What timer options do you have in your kernel? Hight precision event timers? Tickless/Dynamic Kernel?
I don't see much CPU use either in userland or kernel space and my machine has an Athlon XP 2400+ processor, which should be quite enough to play videos up to 720p. MPlayer doesn't drop frame with or without genlock, it's just that genlock misses some retraces. My kernel is the stock kernel from Debian, I didn't modify any parameter.

mickeyjaw
Cross Eyed!
Posts: 131
Joined: Sun Feb 15, 2009 12:50 pm

Re: Viewing S3D videos with MPlayer on Linux using Genlock

Post by mickeyjaw »

Fredz wrote:Did you have a look at /var/log/messages ? It shoes a lot of "PROBABLY OUT OF SYNC" messages on my machine.
Just to let you know, there are a lot of "PROBABLY OUT OF SYNC" messages in /var/log/messages, but i didn't actually notice the left/right views swap at all when watching video through the glasses (about 30mins or so). Subjectively, it looked a lot more stable than the image i get from oldskool nvidia/XP.

User avatar
Fredz
Petrif-Eyed
Posts: 2255
Joined: Sat Jan 09, 2010 2:06 pm
Which stereoscopic 3D solution do you primarily use?: LCD shutter glasses
Location: Perpignan, France
Contact:

Re: Viewing S3D videos with MPlayer on Linux using Genlock

Post by Fredz »

Nice to hear that, as I had quite frequent jumps I thought their number corresponded to the lines in syslog. I was going to ditch this solution, maybe I'll give it another chance.

Post Reply

Return to “General Hardware & Software Technical Support”