Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blu-ray playback over file dialog only #20935

Open
1 of 7 tasks
gebim opened this issue Jan 31, 2022 · 10 comments
Open
1 of 7 tasks

Blu-ray playback over file dialog only #20935

gebim opened this issue Jan 31, 2022 · 10 comments
Assignees
Labels
Component: Discs Related to discs/optical functionality v19 Matrix v20 Nexus

Comments

@gebim
Copy link

gebim commented Jan 31, 2022

Bug report

Describe the bug

Blu-ray disks (BD) are just playing using a file dialogue, although the BD disk is correctly mounted (thanks to recent patches in the master branch). Direct playback by pressing the play disc button is broken. DVD and audio-CD are working fine.

Expected Behavior

BD should work via pressing the play disc button.

Actual Behavior

Inserting the BD the disc is automounted via the udisk2 provider. mount gives:
/dev/sr1 on /media/gebi/Lawrence of Arabia type udf (ro,nosuid,nodev,relatime,uid=1000,gid=1000,iocharset=utf8,uhelper=udisks2)
See log: https://pastebin.com/DLB6uevU

2022-01-31 21:50:10.630 T:121621   DEBUG <general>: UDisks2: Mounting /dev/sr1
2022-01-31 21:50:12.009 T:121621   DEBUG <general>: HandleAutorun: Could not execute autorun
2022-01-31 21:50:12.155 T:121638   DEBUG <general>: Presentation: Frame was discarded by compositor
2022-01-31 21:50:13.553 T:121621    INFO <general>: Skipped 22 duplicate messages..
2022-01-31 21:50:13.553 T:121621    INFO <general>: UDisks2: Added /media/gebi/Lawrence of Arabia

clicking on the disc symbol shows the play disc/eject dialogue. Pressing the "play disc" button, nothing
happens
. Also, the eject button does not work. Console output:

gebi@gebi-tablet:~/bin/xbmc/kodi$ ./kodi.bin 
libva info: VA-API version 1.12.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_12
libva info: va_openDriver() returns 0
umount: /media/gebi/Lawrence\040of\040Arabia: No such file or directory
umount: /media/gebi/Lawrence\040of\040Arabia: No such file or directory
umount: /media/gebi/Lawrence\040of\040Arabia: No such file or directory

umount failed (maybe due to the spaces in the mount path) and the disc remains mounted.

Possible Fix

it is possible to play the BD via the file dialog via opening:
Movies/../Files/BD_symbol/BDMV/index.bdmv

👍 encryption including the java menus works.
Here is the full log: https://pastebin.com/wJs4JQ2r

Your Environment

Used Operating system:

  • Android

  • iOS

  • tvOS

  • Linux

  • OSX

  • Windows

  • Windows UWP

  • Operating system version/name: Ubuntu 21.10

  • Kodi version: 20.0-ALPHA1 (19.90.101) Git:20220130-bffe7c98c7

note: Once the issue is made we require you to update it with new information or Kodi versions should that be required.
Team Kodi will consider your problem report however, we will not make any promises the problem will be solved.

@enen92
Copy link
Member

enen92 commented Jan 31, 2022

Hum, you might have just dig some really old hidden bug :) My guess is that it's caused by the spaces on your drive label "Lawrence of Arabia". At least with all my discs, the label is always uppercase and separated by _, e.g: LAWRENCE_OF_ARABIA. Do you have some other bluray (without spaces) to confirm that one works? It's not clear from the bug report if this only happens with this particular disc or with all of them.
Will try to look into it when I find a bit of time.

@gebim
Copy link
Author

gebim commented Feb 1, 2022

Thanks;
and yes, the spaces are a problem. But these are not uncommon for BD discs (not for DVD):
I tried 3 BD discs:

/dev/sr1 on /media/gebi/Lawrence of Arabia type udf (ro,nosuid,nodev,relatime,uid=1000,gid=1000,iocharset=utf8,uhelper=udisks2)
/dev/sr1 on /media/gebi/From Here to Eternity type udf (ro,nosuid,nodev,relatime,uid=1000,gid=1000,iocharset=utf8,uhelper=udisks2
/dev/sr1 on /media/gebi/2001_A_SPACE_ODYSSEY type udf (ro,nosuid,nodev,relatime,uid=1000,gid=1000,iocharset=utf8,uhelper=udisks2)

including the last classic, I needed for all discs the file-dialog to open index.bdmv manually to play the BD. Eject worked just for the last disc.

There is just one more thing to mention. For the playback of the second and last disc, I needed libmmbd due to missing keys. Libmmbd is a part of makemkv and simulates libaacs and libbdplus. This is activated by two symlinks to these two libraries. Sadly I do not have a disc without spaces in the disc-label not requiring libmmbd. Therefore I cannot say for sure if the spaces are the only problem. But given the fact that we 'just' need to point to index.bdmv, a fix should be possible.
I hope you'll find time for a closer look.
BTW: if there is a need for a BD drive for testing, I'm willing to sponsor one 👍

@enen92
Copy link
Member

enen92 commented Feb 2, 2022

Hey @gebim, thanks for the offer but it's too late (got one recently via the foundation donations) :)
I managed to reproduce your bug by using cdemu and udftools by manually rewriting the disk label of an existing bluray iso file and then emulating a real drive with cdemu:

mkudffs --label="Lawrence of Arabia" myiso.iso

cdemu load 0 myiso.iso

Checking the iso info:

filename=myiso.iso
label=Lawrence of Arabia
uuid=61fad9a4a54f8f70
lvid=Lawrence of Arabia
vid=Lawrence of Arabia
vsid=LinuxUDF
fsid=LinuxUDF
fullvsid=61fad9a4a54f8f70LinuxUDF
owner=
organization=
contact=
appid=*Linux mkudffs 2.3
impid=*Linux UDFFS
winserialnum=0xcd4cf98d
blocksize=512
blocks=24621440
usedblocks=6015
freeblocks=24614905
behindblocks=0
numfiles=0
numdirs=1
udfrev=2.01
udfwriterev=2.01
integrity=closed
accesstype=overwritable
softwriteprotect=no
hardwriteprotect=no
start=64, blocks=12, type=VRS
start=96, blocks=16, type=MVDS
start=128, blocks=1, type=LVID
start=256, blocks=1, type=ANCHOR
start=257, blocks=24620920, type=PSPACE
start=24621183, blocks=1, type=ANCHOR
start=24621280, blocks=16, type=RVDS
start=24621439, blocks=1, type=ANCHOR

Checking the moutpoint:

cat /proc/mounts

....
/dev/sr0 /run/media/arch/Lawrence\040of\040Arabia udf ro,nosuid,nodev,relatime,uid=1000,gid=1000,iocharset=utf8 0 0

Unmount error when ejecting the emulated drive in Kodi.


The root cause of the problem is in libcdio due to the way the /proc/mounts or /etc/mtab is parsed. I've submitted the fix upstream in https://savannah.gnu.org/patch/index.php?10174. Feel free to patch your libcdio installation until it is accepted (no idea how long this stuff usually takes).

As for the playback issue I haven't yet investigate. It would be nice to know if the same patch for eject also fixes the play issue.

Cheers

@gebim
Copy link
Author

gebim commented Feb 4, 2022

Thanks a lot enen92,
next week I'll find time for testing;-
As I'm not a developer it would be a great help for me, to paste here the required git and patch commands....sorry but I could manage building Kodi due to the excellent documentation only.

best

@enen92
Copy link
Member

enen92 commented Feb 4, 2022

The patch was already merged in libcdio master branch:
https://lists.gnu.org/archive/html/libcdio-devel/2022-02/msg00001.html

So you should only need to clone, make and install:

git clone https://git.savannah.gnu.org/git/libcdio.git
cd libcdio

autoreconf -fi

./configure \
    --prefix="/usr" \
    --enable-maintainer-mode \
    --disable-example-progs
 
make

make install

Please confirm after git clone that git log contains the patch. Should be the first commit in the list

@gebim
Copy link
Author

gebim commented Feb 7, 2022

Thanks, enen92 and sorry for my newbie question...
Your patch in libcdio works and eject opens the tray for all discs 👍
For the playback a second look is necessary. In the log
https://pastebin.com/JehcDBZB
in line 676 the play button is selected and nothing happens.
The file dialogue via navigating to index.bdmv is needed for a playback:
https://pastebin.com/XN1m89xV
I hope this information can give you some hints.

Thanks

@enen92
Copy link
Member

enen92 commented Feb 8, 2022

Thanks for confirming the fix.
Looking at your logs I think I know what the problem might be. Let me think about a possible way to overcome the problem and I'll come back with something in a few days

@gebim
Copy link
Author

gebim commented Dec 22, 2022

Look like this bug is still open. BD playback over the file dialogue only.
here is the log: https://pastebin.com/zQwq9zfU

udsks2 mounts correctly:

/dev/sr0 on /media/gebi/2001_A_SPACE_ODYSSEY_BONUS type udf (ro,nosuid,nodev,relatime,uid=1000,gid=1000,iocharset=utf8,uhelper=udisks2)

@enen92
Copy link
Member

enen92 commented Dec 22, 2022

Yeah this is stuff to be done for omega if possible, it requires too many changes on multiple components and also tests on pretty much all platforms. I am sort of waiting for our patches to libdvd* to get merged to resume my work on this.

@gebim
Copy link
Author

gebim commented Dec 24, 2022

Looking forward. Thanks for all your hard work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Discs Related to discs/optical functionality v19 Matrix v20 Nexus
Projects
None yet
Development

No branches or pull requests

2 participants