Jump to content

Emby Theater for Linux


xnappo

Recommended Posts

daldana

Installed the new deb and it completely broke any hardware acceleration even if I try to use mpv.conf. The video does play, but without hw acceleration, if I have the setting at "None" or "Unset" (only with hwdec=h264_v4l2m2m-copy). Attached are four logs with the four different options.

Theater_mpv_log_Auto.txt Theater_mpv_log_Auto-Copy.txt Theater_mpv_log_None.txt Theater_mpv_log_Unset.txt

Link to comment
Share on other sites

daldana

@luke or @alucyrd,

Any ideas why hw accel can't be called via mpv.conf now? I did notice that mmal and v4l2m2m have been updated to h264_mmal and h264_v4l2m2m (and a new h264_rkmpp, but that's for rock chips I think). Also, the "Video Output" setting is still not honoring the gpu selection, it always goes to libmpv. Thanks.

Link to comment
Share on other sites

18 hours ago, daldana said:

@luke or @alucyrd,

Any ideas why hw accel can't be called via mpv.conf now? I did notice that mmal and v4l2m2m have been updated to h264_mmal and h264_v4l2m2m (and a new h264_rkmpp, but that's for rock chips I think). Also, the "Video Output" setting is still not honoring the gpu selection, it always goes to libmpv. Thanks.

@alucryd will be looking at this. Thanks.

Link to comment
Share on other sites

daldana

BTW, where are the mpv and ffmpeg folders located with this package? I'd like to run some tests but I haven't been able to locate them. Thanks.

Link to comment
Share on other sites

alucryd

@daldana I think I need to patch mpv's configure files, it seems they're not detecting the pi libraries at compile time even though I have them on the path, that may explain why it fails.

As for mpv and ffmpeg, you won't find them, mpv is shipped as libmpv for use with electron, and ffmpeg is statically linked so libmpv is self-contained.

Link to comment
Share on other sites

daldana

@alucryd I deleted the old install and installed the new build, but now I can't get any playback on any of the video settings. If I switch to an external player, I can get video just not with mpv. What's funny is that it doesn't even generate an mpv log which makes me wonder if it's calling up mpv at all. Anything you'd like me to try?

Link to comment
Share on other sites

alucryd

@daldana Thanks for trying. I'm almost done with the rpi image, looks like I broke mpv by enabling rpi support. I'm actually skipping part of the build because it depends on x11 (and I don't want to build that, especially since it's completely unneeded), but it also includes some functions that are needed for the rpi features. These do not break the build unfortunately and only breaks at run time 😕

I'll try to come up with a fix.

Link to comment
Share on other sites

alucryd

Updated the link above, this one is a tad better, mpv doesn't crash anymore, but I no longer have any video output, currently investigating.

Link to comment
Share on other sites

alucryd

Weird, it does work here. Could you try running an strace on emby-theater, try to watch a video and post the resulting strace.log here?

strace -s 512 -f -o strace.log emby-theater

With vo=libmpv, the file starts playing, but with no video. It doesn't seem to respect my hwdec setting in mpv.conf and always defaults to mmal (which I suspect is not working correctly), tried hwdec=no to no avail.

With vo=gpu it is stuck at Initializing the gpu context "rpi", and I can't force it to use gpu-context=drm either... Wondering if using real kms instead of fkms might fix that.

The mpv guys seem to dislike the rpi blobs, they prefer v4l2m2m as hwdec, and drm as gpu context, even on the rpi, but last I checked at least on the rpi 3 it looked like mmal was still faster than v4l2m2m. BTW, quoting an mpv issue, "v4l2m2m is basically mmal in kernel", I'd be interested in evaluating the state of v4l2m2m if I can get both mmal and v4l2m2m to work.

Link to comment
Share on other sites

daldana

Result of trace;

pi@raspberrypi:~ $ strace -s 512 -f -o strace.log emby-theater
Initializing cec-client...

{
  cecExePath: 'cec-client',
  cecEmitter: EventEmitter {
    _events: [Object: null prototype] {},
    _eventsCount: 0,
    _maxListeners: undefined
  },
  cecHdmiPort: 'null'
}

CEC Client successfully registered.

CEC Adapter Device:    {
  "device": "Recorder1",
  "lAddr": "1"
}
UDP Client listening on 0.0.0.0:57368
starting udp receive timer with timeout ms: 1000
timer expired 0 servers received
[]
cec-client exited with code null
 

With the earlier version, I was only ever able to get v4l2m2m working, never mmal. Also, I could never get it to recognize the gpu0context=drm either and that with the real kms set.

Hope this helps.

Link to comment
Share on other sites

alucryd

@daldana The command should have generated a strace.log file, that's what will tell me what went wrong, the console doesn't contain enough data.

Link to comment
Share on other sites

daldana

Ooops, nothing worked because I forgot to remove the old download and ended up just reinstalling it,sorry!

The correct download did produce log mpv log files which I have attached. The "Auto" log is with everything set to auto and it tried to use mmal. The "None" was with None in the hw acceleration setting, it broke on "rpi-overlay". The "Unset" log is one where I had tried to force hwdec=v4l2m2m and vo=gpu in the mpv conf file, it also broke on rpi-overlay.

Link to comment
Share on other sites

alucryd

Thanks for the strace, can't find any lead in it unfortunately. I updated the above link with a patched libmpv, backported an open PR and fixed a wrong hardcoded path in their code. Maybe that'll help.

Link to comment
Share on other sites

daldana

@alucryd,

More logs for you! 😆

No playback at all when acceleration set to None or Auto and both seem to break on "rpi-overlay". When I set the video out in Emby to libmpv and acceleration to Auto-Copyback, the log shows it tries to software decode, but still no playback at all. Now when I use Unset with the mpv.conf set to vo=libmpv and hwdec=h264_mmal or v4l2m2m, I can get audio playback and the osd overlay but still no actual video playing.

Let me know if there is anything else I can do.

Theater_mpv_log_All Settings on Auto.txt Theater_mpv_log_None.txt Theater_mpv_log_Setting at libmpv and Auto.txt Theater_mpv_log_Setting at libmpv and Auto-Copyback.txt Theater_mpv_log_Unset with h264_mmal.txt Theater_mpv_log_Unset with h264_v4l2m2m.txt

Link to comment
Share on other sites

alucryd
12 hours ago, daldana said:

@alucryd,

More logs for you! 😆

No playback at all when acceleration set to None or Auto and both seem to break on "rpi-overlay". When I set the video out in Emby to libmpv and acceleration to Auto-Copyback, the log shows it tries to software decode, but still no playback at all. Now when I use Unset with the mpv.conf set to vo=libmpv and hwdec=h264_mmal or v4l2m2m, I can get audio playback and the osd overlay but still no actual video playing.

Let me know if there is anything else I can do.

Theater_mpv_log_All Settings on Auto.txt 22.66 kB · 0 downloads Theater_mpv_log_None.txt 14.64 kB · 0 downloads Theater_mpv_log_Setting at libmpv and Auto.txt 14.64 kB · 0 downloads Theater_mpv_log_Setting at libmpv and Auto-Copyback.txt 22.61 kB · 0 downloads Theater_mpv_log_Unset with h264_mmal.txt 101.07 kB · 0 downloads Theater_mpv_log_Unset with h264_v4l2m2m.txt 80.42 kB · 0 downloads

Thanks for the extensive testing! Not sure I can do much more about this as of now, but there are more things I'd like to try. The first is to add vulkan support to our mpv, and I'd also like to try a 64bit version on the pi.

  • Like 1
Link to comment
Share on other sites

OurfamilySpot
6 hours ago, alucryd said:

 like to try a 64bit version on the pi.

That's an exciting statement.   Here is hoping.. :)      

Link to comment
Share on other sites

Luticus

Sorry, not sure where exactly to ask this, but I was trying to solve the minimize, maximize, close buttons staying visible during playback on version 3.0.15, so I went and got a new copy from https://emby.media/emby-theater-linux.html and installed it as another forum I read suggested. I noticed that one installs as version 3.0.15-1, but the problem is when I install that version playback doesn't seem to work anymore. I get this error:  fs access result for path: Error: ENOENT: no such file or directory <some path/filename>

If I downgrade to the old 3.0.15, sure enough playback is fixed. I'm running Debian 11 Bullseye and no dependencies seem to be missing.

Any advice would be very appreciated! Thanks!

Link to comment
Share on other sites

alucryd

Here are 2 new test debs, they contain the following changes:

  • switched to the latest git head for mpv, it has a lot of welcome enhancements
  • added support for gpu rendering
  • added support for x11 and vulkan (new gpu contexts include x11egl, x11vk, displayvk and a few less interesting others)

https://files.alucryd.xyz/emby-theater-deb_3.0.15_armhf.deb

https://files.alucryd.xyz/emby-theater-deb_3.0.15_arm64.deb

Was able to use gpu rendering via x11egl on the pi3b, no vulkan on pi3b unfortunately, the one unofficial driver doesn't have the necessary extensions. Please give vulkan a try on the pi4 though if you have one, the mesa driver should work there. You will need to build the driver yourself with PiKISS though (it's under the configure sub-menu), please see https://github.com/jmcerrejon/PiKISS

I'd be interested in a performance comparison between egl and vulkan on the pi4.

We will have bootable armhf and arm64 bootable images available for download soon. Raspberry Pi OS is still based on debian buster so drivers are somewhat ancient. I'm looking into providing the mesa egl and vulkan drivers in our packages for ease of use, but I currently have an issue with libEGL so these will have to wait for a fix. For now the debian drivers will have to do, or you can use PiKISS to build a much newer version.

Edited by alucryd
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...