Closed mattgorski closed 4 years ago
Logs?
@mseeley Grabbing both logs in a min. Thanks for the reply :)
Here is the log from my NVIDIA Jetson TX1 (which I am mainly focused on for a pmp system)
Could this be the issue from the log? 2020-03-31 18:42:10 [ INFO ] PlayerComponent.cpp @ 1085 - Audio Config - device: alsa/hdmi:CARD=tegrahda,DEV=0, channel layout: auto, passthrough codecs: none, ac3 transcoding: no
@gbooker, @rcombs do you see anything out of the ordinary with the attached audio device logs above?
Are you building current mpv, or using a recent distro-provided package? There's been a change to the hook API that current PMP isn't yet compatible with. I'm not positive when it was introduced, but using mpv 9abb710a should work for now until we get that updated.
Here's the mpv change removed legacy hooks API: https://github.com/mpv-player/mpv/commit/2337fa4e0213993398d36cb3222633766d677dfd
Thanks a million guys I'll try to build mpv with the provided changes.
FWIW this also affects x86_64 builds (Kubuntu 19.10). Winding back my mpv to commit 9abb710a
didn't fix the issue for me, however. I may try winding mpv back to 2337fa4^
if I get time later today.
ETA: mpv wound back to 2337fa4^
restores audio. If I get time I may upload a patch that does an effective git revert 2337fa4
(as it doesn't revert cleanly from master) until such time the PMP devs co-ordinate with the MPV master.
Still no audio for me checking out mpv at 2337fa4. I can hear click navigation sounds just no audio driver/codec etc even after selecting alsa/default hdmi 0.3.
Go up one more, to 2337fa4^
(the up-arrow means "the commit before that one").
Ahhhh ok one up thanks @kennysgithub
BTW, should we be building PMP against the original MPV repo, or Plexinc's fork, or does it matter?
That did the trick! Now how to tell plex to use only specific video codecs, doesnt seem to use the custom mpv.conf in .local/plexmediaplayer. I want to enable specific codecs that allow hardware accel on NVIDIA TX1 but this embedded device doesnt have vdpau or nvdec/nvenc my only option is a custom ffmpeg with nvmpi vc.
--vo=gpu --hwdec=auto --hwdec-codecs=h264_nvmpi,hevc_nvmpi,mpeg2_nvmpi,mpeg4_nvmpi,vp8_nvmpi,vp9_nvmpi --vd=h264_nvmpi,hevc_nvmpi,mpeg2_nvmpi,mpeg4_nvmpi,vp8_nvmpi,vp9_nvmpi
Funny you say that- it was the exact reason why I'd wanted to build PMP myself, to enable vaapi
acceleration on my IceLake laptop. Turns out that the player uses libmpv
and not the standalone player, so it doesn't use the standard config files- but instead uses library "property" callbacks to set libmpv
's characteristics. So I made the following change:
index 8280636..eb3143d 100644
--- a/src/player/PlayerComponent.cpp
+++ b/src/player/PlayerComponent.cpp
@@ -1178,6 +1178,10 @@ void PlayerComponent::updateVideoSettings()
{
hwdecMode = "auto-copy";
}
+ else if (hardwareDecodingMode != "disabled")
+ {
+ hwdecMode = hardwareDecodingMode;
+ }
mpv::qt::set_property(m_mpv, "hwdec", hwdecMode);
mpv::qt::set_property(m_mpv, "videotoolbox-format", hwdecVTFormat);
Then what you do is write the hwdec
option you'd like to use into the hardwareDecoding
entry in the video
section of your ~/.local/share/plexmediaplayer/plexmediaplayer.conf
file. (Be careful that the "Settings" menu in TV mode doesn't overwrite this).
In my case, I use vaapi-copy
, which really reduces my CPU load when watching 4K video.
so it doesn't use the standard config files
it does. however it overrides some of parameters, including hwdec.
@kennysgithub That's a great workaround!
I just patched up src/player/PlayerComponent.cpp
to use the new libmpv hook API; once I double-check it I'll put up a patch here.
Question for the devs: I was going to send up a pull request, but that would mean requiring a MPV_CLIENT_API_VERSION of (lib)mpv >= 108; it's fairly straightforward to support older versions of libmpv via #ifdefs, but would you guys be willing to just want the version requirement?
Here's the patch; seems to be OK. Should handle both API levels seamlessly.
PMP Version: 2.54-dev Platform Linux/Ubuntu 18.04 amd64 Laptop and NVIDIA Jetson TX1 arm64
Steps to reproduce
Current behavior
Built MPV on both systems and audio works fine. Tried custom mpv.conf with same results.
Expected behavior