3D Support builds for Raspberry Pi

  • Thanks - that answers it, and yours is the one that should go upstream. Ours is superseded.

    One thing I could still usefully add: a cross-check on real material. I compiled your BlurayOffsetMetadata.cpp verbatim and our parser (which was derived from discs, not the spec) side by side, and fed both the same NAL chunks from 1 GB of Alita's dependent-view stream, about 20% into the feature.

    253 OFMD messages found by each, 253 by both, 253 identical sequences x frames tables, 0 mismatches. 32 sequences, 12 of them dynamic, values 0..10 - which is also what an independent survey of that disc reports.

    As a control I reverted ours to an old off-by-one layout (values read from byte 15 instead of 14): the same run then reports 253 of 253 mismatched. So the agreement is not a harness that cannot fail.

    Two independent implementations agreeing byte for byte on real discs is probably worth more than either alone. Happy to send the harness or the ES slice if you want to reproduce it.

    Discs where the effect is easy to see, from the survey: King Arthur: Legend of the Sword (22 of 32 sequences move, -1..37), Kong: Skull Island (24 of 32, -1..30), Jaws 3-D (19 of 32, -6..31). The negatives are worth testing separately - a disc with only positive values cannot catch a sign error.

    (Disclosure as before: written with Claude Code, posted from my account.)

  • I tried this today with the LibreELEC-RPi4.aarch64-13.0-devel-20260831213406-7e8026e.img on a Pi4.

    Amazing!!! I have a 20 foot HDMI cable plugged into my Denon AVR and the 3D is even detected on my projector as expected with my MVC files! Love it!

    I have a couple questions:

    I use the PM4K add on since all my media is served from my Plex server. Since my profile is used on all my TV's I prefer that because it keeps all my media in sync with where I left off etc. It plays fine but if I don't set the 3D setting to "Preferred" on playback it gives you that intermediate screen asking how you want to play it back. If I leave it at that setting the popup screen is not visible unless I "escape" out of whatever is covering it. I think the cause is related to this Kodi build becasue I run PM4K on all my 3D linux players (Vero and RPi) and this is the only one it does that on. If I change that to preferred it doesn't ask that question and it moves on happily to play my media. Is this something that the PM4K would have to address or am I barking up the wrong tree?

    I tried playing a movie with TrueHD 7.1. It plays it fine, but my AVR only shows "multi input" not Atmos like it normally does. I have my Kodi settings to 7.1 audio but can't find any other settings specifically related to Atmos. Is there anything else I need to tweak for this to work?

    Off to more playing! Thanks for the awesome resurrection of this software!

  • Yes, debug enabled log file would be useful. Also is this a regression compared to previous build, or did that do it too?

    Here are the logs: https://www.swisstransfer.com/dl/01a065c8-37…09-a4a2b26e53c4
    1. I resume Cars 2, FP output starts, UI is 3D but video and subtitles are 2D.
    2. I start Cars 3 from the start, video is 3D, did not activate subtitles. I try to skip 5 minutes, video goes black and audio continue.
    3. I try to resume Cars 3, FP output starts, UI is 3D but video and subtitles are 2D.

    Also I keep getting questions about the playlist already being used and if I want to reassign it. Anyway to supress those?

    I see there have been some discussion about 3D-planes and subtitle depth so I will insert this I wrote some time ago where I go through some of the different variant you see on 3D Blu-rays. In case it is to some use :)

    --------------------------------------------------------------------

    First you have Cars 3. This disc shows how every disc should be done. Each subtitle has each own 3d-plane and each of those 3d-plane are different to match each subtitle track. Since different languages take up different amount of space and thus interact with the background object different.

    A bit lazier version of this is having one 3d-plane with dynamic depth and then connecting all subtitles tracks to that. This can work good enough if all of you subtitles are in related languages that produce text in about the same amount of space.

    3D-Plane #00
    NumFrames: 147333
    Minimum depth: -3
    Maximum depth: 24
    Average depth: 6.25
    Number of changes of depth value: 776
    First frame with a defined depth: 1097
    Last frame with a defined depth: 139153
    Number of frames with undefined depth: 9895
    Identical Planes: None

    3D-Plane #01
    NumFrames: 147333
    Minimum depth: -1
    Maximum depth: 24
    Average depth: 6.10
    Number of changes of depth value: 522
    First frame with a defined depth: 1124
    Last frame with a defined depth: 146108
    Number of frames with undefined depth: 2808
    Identical Planes: None

    3D-Plane #02
    NumFrames: 147333
    Minimum depth: -3
    Maximum depth: 24
    Average depth: 6.28
    Number of changes of depth value: 925
    First frame with a defined depth: 1124
    Last frame with a defined depth: 146108
    Number of frames with undefined depth: 3423
    Identical Planes: None

    3D-Plane #03
    NumFrames: 147333
    Minimum depth: -1
    Maximum depth: 11
    Average depth: 6.43
    Number of changes of depth value: 8
    First frame with a defined depth: 3393
    Last frame with a defined depth: 133805
    Number of frames with undefined depth: 16920
    Identical Planes: None

    3D-Plane #04
    NumFrames: 147333
    Minimum depth: 2
    Maximum depth: 11
    Average depth: 7.25
    Number of changes of depth value: 7
    First frame with a defined depth: 20290
    Last frame with a defined depth: 133805
    Number of frames with undefined depth: 33817
    Identical Planes: None

    --------------------------------------------------------------------

    The Super Mario Bros has all the subtitles on the same 3d-plane and that 3d-plane is just a fixed distance from the screen. Lazy creator and lazy maker of the disc. At least this disc has a small positive depth, you can find discs where the 3d-plane is just at screen depth. For these at screen depth it would be nice if you could override the depth and just set a fixed one to your own liking.

    3D-Plane #00
    NumFrames: 132946
    Minimum depth: 10
    Maximum depth: 10
    Average depth: 10.00
    Number of changes of depth value: 1
    First frame with a defined depth: 0
    Last frame with a defined depth: 132945
    Number of frames with undefined depth: 0
    Identical Planes: None

    --------------------------------------------------------------------

    Then you have these really unfortunate cases like The House of Magic disc. Here the creator is nWave Studios, lovers of 3D. But the maker of the disc was an idiot. There is a 3d-plane with dynamic depth but since the idiot swapped the eyes it's all inverted in relation to the video so instead of just swapping the eyes to the standard left eye first they make a fixed -12 depth 3d-plane, to make a small positive pop for the sub, and assigned that to the subtitle instead and called it a day. At least they still included the original 3d-plane so we can use that.

    3D-Plane #00
    NumFrames: 122472
    Minimum depth: -12
    Maximum depth: -12
    Average depth: -12.00
    Number of changes of depth value: 1
    First frame with a defined depth: 0
    Last frame with a defined depth: 122471
    Number of frames with undefined depth: 0
    Identical Planes: None
    *** Warning This 3D-Plane has a fixed depth of -12! ***

    3D-Plane #01
    NumFrames: 122472
    Minimum depth: 1
    Maximum depth: 50
    Average depth: 17.22
    Number of changes of depth value: 533
    First frame with a defined depth: 0
    Last frame with a defined depth: 122388
    Number of frames with undefined depth: 702
    Identical Planes: None

  • Yes, debug enabled log file would be useful. Also is this a regression compared to previous build, or did that do it too?

    Forgot to answer your question. I am not sure if it's a regression. I have not seen black screen or 2D before but I have not tried playing a lot of ISOs and don't know if I tried these before.

  • I did notice a freezing issue on stopping some videos with latest build.

    This wasn't specifically 3d (I was hitting it with youtube) but was a regression from previous build.

    This was a false alarm. Found out my MySQL server machine had a full disk and all SQL requests were failing. That caused the hang on stop (when it updates elapsed time/played count). Deleted some files and all is good for me now. (But I'll look at any logs for clues from others).

  • Have a couple more issues I've found.
    Logs: https://www.swisstransfer.com/dl/01a06788-7e…cd-ad91aff577a1

    1. I resume Driver Angry but the eeyes are flipped, see attached image. This is one of those disc where the right eye is the main och left the MVC track. I go to video settings and enable swap eyes but it has no effect I den disable it again.
    2. Try to play a movie, select the only playlist that is long and it plays in 2D.
    3. Try to play another movie, select the only playlist that is long and it also plays in 2D.

    So Kodi not detecting which stream has which eye and swap eyes not wokring in case the metadata is wrong. Also some dics fails to be detected as 3D at all. Not the same issue as above where it starts FP output and 3D but video is 2D. 2 and 3 never detects 3D at all.

  • Builds in first updates to address issues reported.

    Note: I'm testing with slightly different files - I've found and improved some issues that are similar to what was failing in reports, but there could still be issues I didn't see. Please test and report what was fixed and what wasn't.

  • I tried playing a movie with TrueHD 7.1. It plays it fine, but my AVR only shows "multi input" not Atmos like it normally does. I have my Kodi settings to 7.1 audio but can't find any other settings specifically related to Atmos. Is there anything else I need to tweak for this to work?

    Atmos should just work if you have passthrough enabled in system/audio settings. Make sure TrueHD passthrough enabled and that kodi is playing a TrueHD audio track.

  • Atmos should just work if you have passthrough enabled in system/audio settings. Make sure TrueHD passthrough enabled and that kodi is playing a TrueHD audio track.

    Thank you.

    Are you referring to the "system/audio settings" in Kodi? I have the channels set to 7.1 and the HD Audio option was on but I don't recall it mentioning TrueHD specifically.

  • Builds in first updates to address issues reported.

    Note: I'm testing with slightly different files - I've found and improved some issues that are similar to what was failing in reports, but there could still be issues I didn't see. Please test and report what was fixed and what wasn't.

    Great work! A lot of things now work. Skipping in the Cars movie now preserves 3D. The movies that only had 2D now also show in 3D. Swap eyes now work but Driver Angry still default to the wrong order if I play from the playlist. But if I go to the menu and start it from there the eyes are correct from the start.

    I have notices some issues. First the subtitle 3D dynamic depth sometimes does not work and sometimes is a bit unstable, flickering between screendepth and the correct value. Also is you have the setting "Sterescopic 3D depth of subtitles" set to anything other than 0 it overrides the dynamic depth. It would be great if you could have this enabled for subtitles that do not have any depth info, like SRT, but if you play a subtitle track with dynamic depth it takes priority.

    Some movies have graphical glitches, they seems to happen at the same time every time.
    Log: https://www.swisstransfer.com/dl/01a06fe7-f9…2e-781536a5750a

    1. I play Cars, I think the first two subtitle texts have dynamic depth but then all the rest are just at screendepth. Some minor graphical issues across the whole screen also.
    2. I play Drive Angry via the menu. Graphical issues fairly frequent, mostly in the lower 1/4 of the left eye. Dynamic depth of subtitle works but sometimes flicker back to screendepth.

    I have been testing the latest image on the Raspberry Pi 4 and using the default clock speed I get slowdown and stutters but overclocking to 2.1Ghz seems to boost the performance enough to provide smotth playback of 3D Blu-rays, I have not done extensive testing but have tried several high bitrate scenes from different movies.

    If anyone elese want to try follow the instructions here, https://wiki.libreelec.tv/configuration/config_txt, to modify config.txt. This do require active cooling!
    Add arm_freq=2100 at the bottom of config.txt and reboot

  • popcornmix Have you seen the MVC software decode Jens Duttke has built for the Oku3D player software?https://github.com/jens-duttke/edge264-mvc
    I have tested this player alot and the MVC decoding is very good and stable.

    I also know of this project, https://github.com/5ymph0en1x/SyLC, that also has a MVC software decoder. But I have not tested this player myself.

    In case any of these are of any use :)

    I'd not seen that. Looks like SyLC uses the decoder from edge264-mvc.

    The benchmark numbers do show that ffmpeg is faster (30%) than edge264-mvc, and integrating a different decoder into kodi (which only uses ffmpeg) would be tricky. Possibly trying to wrap edge264-mvc into ffmpeg would be easier.

    But integrating into ffmpeg is probably best. I'm not aware of any current issues with the MVC part. It's the bluray demuxing and state switching through menus/chapters where most of the fiddly stuff is.

  • 2. I play Drive Angry via the menu. Graphical issues fairly frequent, mostly in the lower 1/4 of the left eye. Dynamic depth of subtitle works but sometimes flicker back to screendepth.

    This could be an MVC issue, or it could be a demuxing issue. A sample file would be useful.

    If you are able to extract the movie to an mkv file (still mvc), and test if that has the same glitches, that should narrow it down.

    If mkv glitches then it's an MVC decode error, and creating a 1 minute sample with the glitch should be simple.

    If not we might need a sample from the ISO, which is a bit trickier to create.

  • I asked Claude to to create a sample from BluRay:

    ## The sample itself

    The trick is to keep every byte and every timestamp of the region of interest exactly as the

    disc has them, and blank the rest. A **sparse file of the original length** does that: the

    `.clpi` seek tables still point at the right offsets, so the playlist opens and seeks

    normally, and the file costs only the bytes kept - both on disk and in a compressed archive.


    Copy `BDMV` off the disc (or mount the ISO), then, from the copy:

    ```

    Every other stream on the disc becomes an empty file of the right size, so nothing else has

    to be edited: `index.bdmv`, `MovieObject.bdmv`, the playlists and the clip info files all stay

    as they are, and the disc still opens, lists its playlists and seeks.

    The byte offset is worked out by proportion rather than from the seek table, which is only

    approximate on a variable bitrate stream - hence starting well before the glitch and keeping

    a generous minute. Playback will begin at the first I-frame after the cut and the demuxer

    pairs the two views by timestamp, so an approximate start does no harm.

    Then pack it in a way that keeps the holes:

    ```

    Code
    cd ../..
    tar --sparse -cf - BDMV | zstd -19 -T0 -o drive-angry-sample.tar.zst
    ```

    That should come out at roughly the size of the two 60 second windows.

    ## If that is too much trouble

    Ask instead for `BDMV/PLAYLIST/00100.mpls`, `BDMV/CLIPINF/00037.clpi` and

    `BDMV/CLIPINF/00069.clpi` (a few hundred KB in total) plus the exact time. Those settle what

    the playlist and the clips claim - which eye is the base view, where the dependent view is,

    and what the seek tables say - and are worth having whatever else happens.

  • I have been testing the latest image on the Raspberry Pi 4 and using the default clock speed I get slowdown and stutters but overclocking to 2.1Ghz seems to boost the performance enough to provide smotth playback of 3D Blu-rays, I have not done extensive testing but have tried several high bitrate scenes from different movies.

    Had a look on pi4, and seems bluray dependent. Edge of Tomorrow is a lot better than Coraline.

    We have up until now been creating a SBS buffer to combine the eyes and pass through kodi's default SBS handling, but that does require a copy of decoded frames which does have a cost. I've had a go at (in the usual DRMPrime path displaying using the decoded frames directly) and it does improve things.

    Here is a Pi4 build that may be a bit better - I suspect it will still want an overclock for harder samples, but perhaps can be a little lower. The build also has potential fixes for eye-swaps and subtitle depths. The corruption issue will probably need a sample file.

  • Had a look on pi4, and seems bluray dependent. Edge of Tomorrow is a lot better than Coraline.

    We have up until now been creating a SBS buffer to combine the eyes and pass through kodi's default SBS handling, but that does require a copy of decoded frames which does have a cost. I've had a go at (in the usual DRMPrime path displaying using the decoded frames directly) and it does improve things.

    Here is a Pi4 build that may be a bit better - I suspect it will still want an overclock for harder samples, but perhaps can be a little lower. The build also has potential fixes for eye-swaps and subtitle depths. The corruption issue will probably need a sample file.

    You are beast :)
    This build feel much improved, starting and skipping around is clearly snappier now. I am still running my 2.1 Ghz overclock. The glitching and subtitle depth flickering in Drive Angry seems to be gone now. Setting subtitle depth now also seems to work and no longer overrides subs with dynamic depth :)

    I do notice that it now shows more playlists than before by default. Cars still has the same glitching. I tried making a sample ISO but the glitching does not show up in that one so the issue may be on another level. See the attached video I made that show the glitching and notice how the time jumps back to 00:57 during the first glitch, playlist issues causing them maybe?

    SwissTransfer - Send large files securely and free of charge
    Send up to 50 GB - Free and no registration required - Keep your transfers for 30 days
    www.swisstransfer.com


    I was wondering if it would be possible to support MKVs that has prebaked stereo subs? Quite a few on my SBS or OU MKVs has stereo subs. I included a short sample if you need. One problem though is that some like this one has the subs pre squeezed to match the Half SBS/OU format, some are not however are not. So ideally one would have a switch like swap eyes to manually squeeze/unsqueeze if needed.

  • I was wondering if it would be possible to support MKVs that has prebaked stereo subs? Quite a few on my SBS or OU MKVs has stereo subs. I included a short sample if you need. One problem though is that some like this one has the subs pre squeezed to match the Half SBS/OU format, some are not however are not. So ideally one would have a switch like swap eyes to manually squeeze/unsqueeze if needed.

    I may need a sample to understand exactly how the subs are encoded.
    I assume you don't mean harcoded subtitles (i.e. in the pixels of the video).

    I'm assuming some format where each subtitle's text appears twice for each timestamp, with some positional offset aligning it to left eye or right eye half of screen?

    That sounds like a hack to support a media player that doesn't understand 3d.

    Without some metadata describing the format it is probably going to be awkward to handle.