You are not logged in.

#1 2014-01-21 17:26:23

idomeneo
Member
Registered: 2013-07-19
Posts: 25

[SOLVED] Getting mpv player to work in the framebuffer

Hi,

I can't get mpv to display video with framebuffer/directfb.

Would adding

--enable-sdl2

to the PKGBUILD enable it?
If so, how do I /petition for it?

(I haven't been able to actually try it out, because I keep getting errors with Waf, when trying to compile from source.)

Last edited by idomeneo (2014-01-22 15:05:06)

Offline

#2 2014-01-21 17:44:37

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Getting mpv player to work in the framebuffer

Post the errors you're getting.

If it's possible to compile it yourself using ABS, the developers may decline the feature request (open one in the bug tracker).

Offline

#3 2014-01-21 18:05:50

idomeneo
Member
Registered: 2013-07-19
Posts: 25

Re: [SOLVED] Getting mpv player to work in the framebuffer

OK I'll post it as a "bug". Other apps seem to be compiled to work with framebuffer if available.

(Also I don't have time atm to sit through more compiling of this. I forget the last error, but the first one was that the /use/lib/waf couldn't be written to, but the permissions were correct, and I was using makepkg -s. I was also adapting the PKGBUILD from the general repo, not AUR. I gave the dir global write permission, and that got that working, but the error didn't seem to make much sense.)

Offline

#4 2014-01-21 18:11:42

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Getting mpv player to work in the framebuffer

Install mpv-git from jelle's unofficial repo: https://wiki.archlinux.org/index.php/Un … ries#jelle , it has sdl2 among its dependencies, see if it works in the framebuffer.

Offline

#5 2014-01-21 18:25:34

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: [SOLVED] Getting mpv player to work in the framebuffer

SDL2 needs to be compiled with directfb in order to support the framebuffer console, I'm not sure that's the case with the Arch SDL2 package.

Offline

#6 2014-01-22 15:02:31

idomeneo
Member
Registered: 2013-07-19
Posts: 25

Re: [SOLVED] Getting mpv player to work in the framebuffer

Okaaaay, I got the build to work.
(Libreoffice required python, but didn't recognize python2, so I linked /usr/bin/python to /usr/bin/python2. 1.6M mpv has 158M in make-dependencies including python3, which wanted the /usr/bin/python slot, and refused to install because it couldn't get it. Removing the python link and installing python3 fixed the build problems.)

Gusar, you're right, sdl2 autodetects many things but not directfb, which needs to be compiled in, which the Arch package doesn't do.

mpv
  --enable-sdl             enable SDL audio output [disable]
  --enable-sdl2            enable SDL 2.0+ audio and video output [disable]

sdl2
  --enable-video-directfb        use DirectFB video driver [[default=no]]


Sdl2 also comes with instructions for directfb:

SDL on DirectFB

Supports:

- Hardware YUV overlays
- OpenGL - software only
- 2D/3D accelerations (depends on directfb driver)
- multiple displays
- windows

What you need:

DirectFB 1.0.1, 1.2.x, 1.3.0
Kernel-Framebuffer support: required: vesafb, radeonfb ....  (https://wiki.archlinux.org/index.php/uvesafb on Arch)
Mesa 7.0.x	   - optional for OpenGL

/etc/directfbrc

This file should contain the following lines to make
your joystick work and avoid crashes:
------------------------
disable-module=joystick
disable-module=cle266
disable-module=cyber5k
no-linux-input-grab
------------------------

To disable to use x11 backend when DISPLAY variable is found use

export SDL_DIRECTFB_X11_CHECK=0

To disable the use of linux input devices, i.e. multimice/multikeyboard support,
use

export SDL_DIRECTFB_LINUX_INPUT=0

To use hardware accelerated YUV-overlays for YUV-textures, use:

export SDL_DIRECTFB_YUV_DIRECT=1

This is disabled by default. It will only support one 
YUV texture, namely the first. Every other YUV texture will be
rendered in software.

In addition, you may use (directfb-1.2.x)

export SDL_DIRECTFB_YUV_UNDERLAY=1

to make the YUV texture an underlay. This will make the cursor to
be shown.

Simple Window Manager
=====================

The driver has support for a very, very basic window manager you may
want to use when running with "wm=default". Use

export SDL_DIRECTFB_WM=1

to enable basic window borders. In order to have the window title rendered,
you need to have the following font installed:

/usr/share/fonts/truetype/freefont/FreeSans.ttf

OpenGL Support
==============

The following instructions will give you *software* OpenGL. However this
works at least on all directfb supported platforms.

As of this writing 20100802 you need to pull Mesa from git and do the following:

------------------------
git clone git://anongit.freedesktop.org/git/mesa/mesa
cd mesa 
git checkout 2c9fdaf7292423c157fc79b5ce43f0f199dd753a
------------------------

Edit configs/linux-directfb so that the Directories-section looks like
------------------------
# Directories
SRC_DIRS     = mesa glu 
GLU_DIRS     = sgi
DRIVER_DIRS  = directfb
PROGRAM_DIRS = 
------------------------

make linux-directfb
make

echo Installing - please enter sudo pw.

sudo make install INSTALL_DIR=/usr/local/dfb_GL
cd src/mesa/drivers/directfb
make
sudo make install INSTALL_DIR=/usr/local/dfb_GL
------------------------

To run the SDL - testprograms:

export SDL_VIDEODRIVER=directfb
export LD_LIBRARY_PATH=/usr/local/dfb_GL/lib
export LD_PRELOAD=/usr/local/dfb_GL/libGL.so.7

./testgl

Last edited by idomeneo (2014-01-22 15:32:47)

Offline

#7 2014-01-22 15:19:32

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Getting mpv player to work in the framebuffer

When posting configs, code or command output, please use [ code ] tags, not [ quote ] tags https://bbs.archlinux.org/help.php#bbcode

like this

It makes the code more readable and - in case of longer listings - more convenient to scroll through.

Offline

#8 2014-01-22 15:53:20

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,787
Website

Re: [SOLVED] Getting mpv player to work in the framebuffer

idomeneo wrote:

(Libreoffice required python, but didn't recognize python2, so I linked /usr/bin/python to /usr/bin/python2.


Just a heads up, that may cause you problems down the line. In theory, scripts that call for "python" should be able to run in either python2 or python3 [1]

  • In order to tolerate differences across platforms, all new code that needs to invoke the Python interpreter should not specify python, but rather should specify either python2 or python3 (or the more specific python2.x and python3.x versions; see the Migration Notes). This distinction should be made in shebangs, when invoking from a shell script, when invoking via the system() call, or when invoking in any other context.

  • One exception to this is scripts that are deliberately written to be source compatible with both Python 2.x and 3.x. Such scripts may continue to use python on their shebang line without affecting their portability.

But in practicality, a lot of scripts are written with the assumption that '/usr/bin/env python', or '/usr/bin/python' will always get them the python shell they get on the machine that they were developed on. Arch moved to python3 being /usr/bin/python over three years ago [2], so there's a chance that some Arch packages call for python, but are expecting python3.

If you end up getting a lot of python stack traces in your journal/logs, this is (probably) why. In the event that you do find some Arch packages that complain about python being the wrong python, you should open a bug report for the package in question (either in Arch's bug tracker, or upstream's).

You'll also get an error if you ever try to install the python package, as that package provides the /usr/bin/python file (which you have just created). If that happens, you'll need to remove the symlink.

[1] http://www.python.org/dev/peps/pep-0394/#recommendation
[2] https://www.archlinux.org/news/python-is-now-python-3/


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB