stu54
Posts: 9
Joined: Tue Jul 09, 2019 10:16 pm

Can't get 3D to work with omxplayer

Tue Jul 09, 2019 10:31 pm

I have a projector that does alternate frame 3D and uses shutter-type LCD glasses.
I have a 3D demo file MKV and I have another MKV which is a 3D blu-ray rip.
I have a PI 4 with 1GB running raspbian buster.
I am trying to play the MKV files with omxplayer. My projector OSD says the input it's getting is 3D but the image on the screen is not the alternating left and right eye views. It still looks 2D. What's even more odd is the sync signal from the
projector to the glasses puts the glasses in anaglyph mode (which I did not even know they could do). The image on the screen is not anaglyph, though.

I don't know if the problem is a flag in the MKV file that is wrong or if it's a command line argument to omxplayer
that is wrong or a lack of 3D capability in the PI 4. Below is the output from omxplayer. Any help would be appreciated.

pi@raspberrypi:~ $ omxplayer -3 FP -r --passthrough /plex/kodi/Hugo\ 3D_MVC.mkv
Chapter : 0 Chapter 01 0.00
Chapter : 1 Chapter 02 575.00
Chapter : 2 Chapter 03 1040.00
Chapter : 3 Chapter 04 1412.00
Chapter : 4 Chapter 05 1834.00
Chapter : 5 Chapter 06 2306.00
Chapter : 6 Chapter 07 2856.00
Chapter : 7 Chapter 08 3337.00
Chapter : 8 Chapter 09 3823.00
Chapter : 9 Chapter 10 4366.00
Chapter : 10 Chapter 11 4799.00
Chapter : 11 Chapter 12 5230.00
Chapter : 12 Chapter 13 5583.00
Chapter : 13 Chapter 14 6161.00
Chapter : 14 Chapter 15 6827.00
Chapter : 15 Chapter 16 7198.00
Output mode 32: 1920x1080@24 :20
ntsc_freq:1 3DFP
Video codec omx-mvc width 1920 height 1080 profile 100 fps 23.976025
Audio codec dtshd_ma passthrough channels 8 samplerate 48000 bitspersample 24
Subtitle count: 1, state: off, index: 1, delay: 0
V:PortSettingsChanged: 1920x1080@23.98 interlace:0 deinterlace:0 anaglyph:0 par:1.00 display:0 layer:0 alpha:255 aspectMode:0

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7329
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Can't get 3D to work with omxplayer

Wed Jul 10, 2019 6:33 am

How have you told the hdmi output to be 3d? What does "tvservice - s" report?

Currently the fkms driver doesn't support 3d (although the lower layers should), so I'm not sure what it will be actually producing.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

stu54
Posts: 9
Joined: Tue Jul 09, 2019 10:16 pm

Re: Can't get 3D to work with omxplayer

Wed Jul 10, 2019 3:17 pm

Thanks for your response.

I run:
omxplayer -3 FP -M -r --passthrough /plex/kodi/d6_3D_MVC.mkv
Output mode 32: 1920x1080@24 :20
ntsc_freq:1 3DFP
Video codec omx-mvc width 1920 height 1080 profile 100 fps 23.976025
Audio codec ac3 passthrough channels 6 samplerate 48000 bitspersample 16
Subtitle count: 0, state: off, index: 1, delay: 0
V:PortSettingsChanged: 1920x1080@23.98 interlace:0 deinterlace:0 anaglyph:0 par:1.00 display:0 layer:0 alpha:255 aspectMode:0

tvservice says:
state 0xa [HDMI CEA (32) 3D FP RGB lim 16:9], 1920x1080 @ 24.00Hz, progressive

I see the screen flickering as if it was trying to do 3D (or maybe that's just the 24Hz) but it's just a 2D picture. The projector says it is in 3D mode. I am not sure if the MKV has all the right flags set and I don't know how to verify that there is, in fact, left and right eye streams in the file except to say I got the file from a 3D demo site. For the blu-ray 3D rip I did, I also don't know how to verify if makemkv produced the correct 3D format file.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7329
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Can't get 3D to work with omxplayer

Wed Jul 10, 2019 3:33 pm

Sorry, I'd missed the -3 parameter on your omxplayer command line. I dread to think how confused that is making the system as that mode change is done without Linux knowing.

Stereoscopic is still on the list of things to be implemented in the new driver. I don't know the state of the low level drivers for 3D, so I'll have to ask you to bear with us on this one. It's moderately near the top of my list of things to check, just not hit the top yet (and I need to find a 3D TV to test with!)
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

stu54
Posts: 9
Joined: Tue Jul 09, 2019 10:16 pm

Re: Can't get 3D to work with omxplayer

Wed Jul 10, 2019 4:15 pm

So you think it's a video driver issue? I just wanted to make sure it wasn't something I did wrong when I ripped the blu-ray or in the demo file I found on a website. Thanks for your help. I can test code for you if you tell me how to update my driver when you have a release.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7329
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Can't get 3D to work with omxplayer

Wed Jul 10, 2019 4:38 pm

I don't believe it's something that has been checked, therefore I can fully believe it to be a driver issue.
The HDMI block is all new on Pi4. Then again my brief checking indicates that the 3D mode is signalled in one of the HDMI AVI Infoframes, and those are pretty much a pass through.

Then again there are multiple 3D interleaving modes. Copying the modes out of the source code:

Code: Select all

HDMI_3D_STRUCT_FRAME_PACKING                          = (1<<0),
HDMI_3D_STRUCT_FIELD_ALTERNATIVE                      = (1<<1),
HDMI_3D_STRUCT_LINE_ALTERNATIVE                       = (1<<2),
HDMI_3D_STRUCT_SIDE_BY_SIDE_FULL                      = (1<<3),
HDMI_3D_STRUCT_L_DEPTH                                = (1<<4),
HDMI_3D_STRUCT_L_DEPTH_GRAPHICS_GRAPHICS_DEPTH        = (1<<5),
HDMI_3D_STRUCT_TOP_AND_BOTTOM                         = (1<<6),
HDMI_3D_STRUCT_SIDE_BY_SIDE_HALF_HORIZONTAL           = (1<<7),
HDMI_3D_STRUCT_SIDE_BY_SIDE_HALF_ODD_LEFT_ODD_RIGHT   = (1<<8),
HDMI_3D_STRUCT_SIDE_BY_SIDE_HALF_ODD_LEFT_EVEN_RIGHT  = (1<<9),
HDMI_3D_STRUCT_SIDE_BY_SIDE_HALF_EVEN_LEFT_ODD_RIGHT  = (1<<10),
HDMI_3D_STRUCT_SIDE_BY_SIDE_HALF_EVEN_LEFT_EVEN_RIGHT = (1<<11),
HDMI_3D_STRUCT_FRAME_SEQUENTIAL                       = (1<<12),
The FP reported from tvservice is Frame Packed. I'd need to check which mode is which, but I suspect you want HDMI_3D_FORMAT_FRAME_SEQUENTIAL

I don't believe omxplayer allows selection of frame sequential from the commmand line, so try

Code: Select all

tvservice -e "CEA_3D_FS 32 HDMI"
before running omxplayer, and drop the "-3 FP" and "-r" from the omxplayer command line.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

stu54
Posts: 9
Joined: Tue Jul 09, 2019 10:16 pm

Re: Can't get 3D to work with omxplayer

Wed Jul 10, 2019 5:11 pm

I tried that but the projector is not in 3D mode after running tvservice. It goes into 1080p 24Hz mode.

stu54
Posts: 9
Joined: Tue Jul 09, 2019 10:16 pm

Re: Can't get 3D to work with omxplayer

Thu Aug 29, 2019 5:30 pm

I noticed something that was happening when I tried the latest kernel for the PI. I said in a previous post that the glasses looked like they were being put into anaglyph mode. In fact, it is the projector going into anaglyph mode instead of alternating left and right frames. If I was going to guess, I would say that either the picture is interlaced with left and right views, alternating red and blue lines, or alternating frames of red and blue. Definitely not SBS or Top/Bottom. I don't how to determine what mode the projector is in or what is in the HDMI signal to trigger the projector into the right mode. I am thinking of looking at the omxplayer source code to see if I can understand how 3D mode is done but maybe it's at the driver level.

KaraokeAmerica
Posts: 4
Joined: Wed Jul 10, 2019 2:52 pm

Re: Can't get 3D to work with omxplayer

Thu Aug 29, 2019 5:37 pm

6by9 wrote:
Wed Jul 10, 2019 3:33 pm
(and I need to find a 3D TV to test with!)
I have 3 including a projector. If you promise to get mine up and and going you can come over to test.

I’ll even get beer.....;)

djholt
Posts: 1
Joined: Sun Sep 15, 2019 11:25 pm

Re: Can't get 3D to work with omxplayer

Sun Sep 15, 2019 11:27 pm

I am in the same situation with the same problem. Any developments on this? I'd love to find a secret to make this work. :)

Return to “Graphics, sound and multimedia”