Jump to content

OPi-PC: Play a video without a GUI/X11 ?


seif

Recommended Posts

Hello,

 

How can I play a video on the TV without a GUI/X11 installed? When I try mpv it says:

 

mpv 05\ Oscillofun.mp4 
[input/#1] Failed to read LIRC config file ~/.lircrc.
Playing: 05 Oscillofun.mp4
[stream] Video (+) --vid=1 (*) (h264)
[stream] Audio (+) --aid=1 --alang=und (*) (aac)
File tags:
 major_brand: mp42
 minor_version: 512
 compatible_brands: isomiso2avc1mp41
 creation_time: 2016-11-10 13:22:28
 date: 2014-07-02T13:04:18+0200
 encoder: HandBrake 0.10.5 2016021100
[vo/vdpau/x11] couldn't open the X11 display ()!
Error opening/initializing the selected video_out (-vo) device.
Video: no video
AO: [alsa] 44100Hz stereo 2ch float
A: 00:00:01 / 00:02:31 (1%)
Exiting... (Quit)
 
 
I have also tried this in mplayer:
 
 
mplayer -vo directfb 05\ Oscillofun.mp4 
[sudo] password for pi: 
MPlayer2 2.0-728-g2c378c7-4+b1 © 2000-2012 MPlayer Team
Cannot open file '/root/.mplayer/input.conf': No such file or directory
Failed to open /root/.mplayer/input.conf.
Cannot open file '/etc/mplayer/input.conf': No such file or directory
Failed to open /etc/mplayer/input.conf.
Failed to read LIRC config file ~/.lircrc.
 
Playing 05 Oscillofun.mp4.
Detected file format: QuickTime / MOV (libavformat)
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (aac), -aid 0, -alang und
Clip info:
 major_brand: mp42
 minor_version: 512
 compatible_brands: isomiso2avc1mp41
 creation_time: 2016-11-10 13:22:28
 date: 2014-07-02T13:04:18+0200
 encoder: HandBrake 0.10.5 2016021100
Load subtitles in .
commandline read: mplayer
commandline read: -vo
commandline read: directfb
commandline read: 05 Oscillofun.mp4
 
   ~~~~~~~~~~~~~~~~~~~~~~~~~~| DirectFB 1.2.10 |~~~~~~~~~~~~~~~~~~~~~~~~~~
        © 2001-2008  The world wide DirectFB Open Source Community
        © 2000-2004  Convergence (integrated media) GmbH
      ----------------------------------------------------------------
 
(*) DirectFB/Core: Single Application Core. (2014-10-21 10:21) 
(*) Direct/Thread: Started 'VT Switcher' (-1) [CRITICAL OTHER/OTHER 0/0] <8388608>...
(!) [ 3845:    0.000] --> Caught signal 1 (sent by the kernel) <--
(!) DirectFB/fbdev/vt: Unable to restore VT mode!!!
    --> Input/output error
(!) DirectFB/Keyboard: KD_TEXT failed!
    --> Input/output error
 
 
It's an Orange Pi PC,
 
uname -a
Linux orangepipc 3.4.112-sun8i #10 SMP PREEMPT Sun Oct 23 16:06:55 CEST 2016 armv7l GNU/Linux
 
Any ideas?
 
Thank you.
Link to comment
Share on other sites

I wondered about the same thing but libvdpau depends on X and it's where most development effort is focused.

You might be able to use some of the old "proof of concept" projects that used cedar directly but IMO it's not worth the hassle.

Just get a minimal X install if you're worried about resources. If you're having trouble with some content at that point then the POC code probably wouldn't work either.

Link to comment
Share on other sites

Hi mancaveman, thanks for your response. 

 

I tried mpv in the GUI and it plays the videos very nicely. What do you mean with "Just get a minimal X install"? How is that? Would you mind to elaborate?

Link to comment
Share on other sites

You could manually install X without a larger desktop environment on the console-only version of Armbian or strip away the unneeded parts of the desktop version.

You should then be able to use "startx" to run the X server on-demand for a single application. eg. "startx /usr/bin/mpv --fullscreen video.mp4"

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines