jock Posted June 2, 2020 Posted June 2, 2020 Hello, I'm testing mpv with RKMPP hardware acceleration on legacy 4.4 rockchip kernel. This is what I put in /etc/mpv/mpv.conf: vo=gpu hwdec=rkmpp gpu-api=opengl gpu-context=drm opengl-es=yes If works perfectly fine with low cpu usage BUT only if I launch it from command line either from a virtual terminal or an X11 emulated terminal. In case I launch it double clicking on a video from X11 xfce, mpv starts playing video but then completely forgets of the keyboard. No matter what key I hit, it does not respond, I can't even close and I'm forced to kill the process from a ssh session. Using CTRL + ALT + n combinations, I can see the various virtual terminals flashing in the middle of the running video, and if I hit keys the keystrokes then goes to the background virtual terminals instead of mpv. I tried force-window and input-terminal configuration options, but neither worked. Any ideas?
JMCC Posted June 2, 2020 Posted June 2, 2020 When you launch it from any terminal, the terminal you used must be active for the keyboard shortcuts to work. So, for example, if you launch it from an emulated terminal in a X11 session, keybuard shortcuts will work, unless you for example hit Alt+Tab, and therefore change the focus to another window. In that case, you would need to use Alt+Tab again, to bring the focus back to the terminal you used to launch mpv. So, if you want to use a desktop launcher to open video files with GBM mpv, then you must set that desktop launcher to open a virtual terminal for the process. Otherwise, you will have no way to control the player. That is the reason why in my media script mpv-gbm uses a different launcher. You can have a look at the launcher, by uncompressing the mpv-rockchip deb package.
jock Posted June 3, 2020 Author Posted June 3, 2020 Thanks @JMCC for the answer, now the situation is much more clear, but I even tried to edit the .desktop file and turn "Terminal=" entry to true. It opens up a terminal but mpv still is not executed in the terminal itself, which sounds a bit strange. Also I'm running X11 + armsoc + libmali X11/GB and mpv runs fine without the need to link to libmali-gbm, so it is run as an X11 application and I thought it would have its own window to capture input events, but it seems not the case. Need to make more experiments and wait for mainline goodness that will make all this mess obsolete. BTW, I happily compiled Kodi with full acceleration on my platform (rk322x), unfortunately rkmpp/drmprime is available only with the GBM version. Compiling against X11 + OpenGL ES provides a much smoother interface but no hardware acceleration
Memo Posted October 6, 2021 Posted October 6, 2021 hello I have the same scenario Im not able to use the keyboard when I launch mpv with hw acc and gpu-context=drm, (until I Press ALT+TAB) is there any way to be able to play video and read the keyboard at the same time ? it to be able to control mpv from a external alication. Regards! Saludos
JMCC Posted October 6, 2021 Posted October 6, 2021 1 hour ago, Memo said: hello I have the same scenario Im not able to use the keyboard when I launch mpv with hw acc and gpu-context=drm, (until I Press ALT+TAB) is there any way to be able to play video and read the keyboard at the same time ? it to be able to control mpv from a external alication. Regards! Saludos It will depend on the window manager and/or terminal program you are using. If the terminal loses the focus, then you need to give it back with Alt+Tab. I have not used this program for several months, but in early 2021 the default Armbian XFCE desktop worked fine with the default terminal it shipped. Another option is to launch the program directly from a console session (no X server running)
Recommended Posts