0

I want what is essentially a kiosk, to display a video stream using ffplay, without a whole Desktop environment.

I started with minimal CentOS7, and installed xterm and X11, per this simple guide: https://linuxconfig.org/how-to-run-x-applications-without-a-desktop-or-a-wm

I've created a .xinitrc file:

#!/bin/bash
exec firefox

and when I execute startx, it opens an X11 window containing Firefox.

But, when I replace the .xinitrc file with this one:

#!/bin/bash
exec ffplay udp://192.168.0.237:5444

I just get a blank screen, in spite of knowing that ffplay command is right. Though I can tell from ps -ef | grep ffplay that ffplay is indeed executing. I think it is just piping the output video someplace different from where Firefox did. I don't know how to tell where that is, nor how to force it to go to localhost:0.0.

Note the CentOS7 box is a Hyper-V VM, which I am accessing via a Hyper-V console.

0

Works for me, on my Archlinux.

My ffmpeg is 4.4. You might need to upgrade yours, in case this is a FFMPEG/ffplay bug.

Note that ffplay requires being told the resolution like this: ffplay -x 1920 -y 1080 some.mp4 when started without a window manager. Throwing in -noborder probably also wouldn't hurt.

But most probably your error lies somewhere else: are you sure you have all the dependencies necessary for graphics? Are you sure the VM has the necessary virtual hardware?

Are you sure you don't need to run something else before the exec ffplay in your .xinitrc? For example, I use NVIDIA graphics, and so I have this at the start of my .xinitrc:

xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto

There are also some system-wide scripts meant for .xinitrc:

for f in /etc/X11/xinit/xinitrc.d/*; do
        [ -x "$f" ] && . "$f"
done

I think for a start you need to make sure that you are able to get any Xorg graphics from your VM.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.