You are not logged in.
Dear all,
this is my first post as a newbie, so please bear with my ignorance.
I use Linux Mint 18.3 on an Acer Aspire F15 laptop and as an adventure installed Arch Linux on a VM via virtualbox.
I have come to a fairly good point, with i3wm as window manager in a very simple installation.
I can play audio and HD video just fine e.g. via smplayer in X (although vlc kills my CPU).
For the next step I wanted to try playing video without X, using only the framebuffer console. However, I failed to do so.
I issued the following command:
mplayer -vo fbdev -ao alsa horr.mkv
(both with and without sudo, the errors are the same)
and got the following output:
MPlayer SVN-r38101 (C) 2000-2018 MPlayer Team
225 audio & 464 video codecs
Playing horr.mkv.
libavformat version 58.20.100 (external)
Mismatching header version 58.12.100
libavformat file format detected.
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (aac), -aid 0, -alang jpn
[lavf] stream 2: subtitle (ssa), -sid 0, -slang eng
VIDEO: [H264] 848x480 0bpp 23.976 fps 0.0 kbps ( 0.0 kbyte/s)
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 58.35.100 (external)
Mismatching header version 58.18.100
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
Clip info:
encoder: no_variable_data
creation_time: 1970-01-01T00:00:00.000000Z
Load subtitles in ./
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 2 ch, floatle, 0.0 kbit/0.00% (ratio: 0->352800)
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
AO: [alsa] 48000Hz 2ch floatle (4 bytes per sample)
Starting playback...
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
[swscaler @ 0x7f65129b1040]bicubic scaler, from yuv420p to bgra using MMXEXT
[swscaler @ 0x7f65129b1040]using unscaled yuv420p -> bgra special converter
VO: [fbdev] 848x480 => 852x480 BGRA
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [fbdev] 848x480 => 852x480 BGRA
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [fbdev] 848x480 => 852x480 BGRA
....
and intelaced with this output the following errors:
do_connect: could not connect to socket
connect: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
Can't put VSCREENINFO: Invalid argument
FATAL: Cannot initialize video driver.
Can't put VSCREENINFO: Invalid argument
FATAL: Cannot initialize video driver.
Can't put VSCREENINFO: Invalid argument
FATAL: Cannot initialize video driver.
...
This loops forever.
I then tried using fbdev2 instead and I got the following:
MPlayer SVN-r38101 (C) 2000-2018 MPlayer Team
225 audio & 464 video codecs
Playing horr.mkv.
libavformat version 58.20.100 (external)
Mismatching header version 58.12.100
libavformat file format detected.
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (aac), -aid 0, -alang jpn
[lavf] stream 2: subtitle (ssa), -sid 0, -slang eng
VIDEO: [H264] 848x480 0bpp 23.976 fps 0.0 kbps ( 0.0 kbyte/s)
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 58.35.100 (external)
Mismatching header version 58.18.100
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
Clip info:
encoder: no_variable_data
creation_time: 1970-01-01T00:00:00.000000Z
Load subtitles in ./
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 2 ch, floatle, 0.0 kbit/0.00% (ratio: 0->352800)
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
AO: [alsa] 48000Hz 2ch floatle (4 bytes per sample)
Starting playback...
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
[swscaler @ 0x7f027115e040]bicubic scaler, from yuv420p to bgra using MMXEXT
[swscaler @ 0x7f027115e040]using unscaled yuv420p -> bgra special converter
VO: [fbdev2] 848x480 => 852x480 BGRA
do_connect: could not connect to socket
connect: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
MPlayer interrupted by signal 7 in module: flip_page
- MPlayer crashed. This shouldn't happen.
It can be a bug in the MPlayer code _or_ in your drivers _or_ in your
gcc version. If you think it's MPlayer's fault, please read
DOCS/HTML/en/bugreports.html and follow the instructions there. We can't and
won't help unless you provide this information when reporting a possible bug.
My video driver is vboxvideo, and I have installed guest additions from the virtual image.
The file in question is a 640x480 resolution video and I am trying to play it in a console at resolution 1920x1080.
I tried with the -fv scale=... option as well, but I get the same errors.
Please let me know if I should post more detailed hardware info and how; in Mint I use inxi for hardware info, I do not know if arch has a similar tool.
Thanks!
Edit for solution: Following Gusar's suggestion below, I replaced the call to mplayer with
mpv --gpu-context=drm file-to-play.mkv
and it worked perfectly! Further suggestions for software rendering can be found in the comments below.
Last edited by num18 (2019-02-08 16:07:48)
Offline
Please edit your post and use [ code ] tags (not quote tags) when posting output.
https://wiki.archlinux.org/index.php/Co … s_and_code
https://bbs.archlinux.org/help.php#bbcode
Offline
On actual hardware, mpv can do exactly what you want and does it much better than mplayer:
mpv --gpu-context=drm some_movie.mkv
You can even have hardware decoding, though I haven't tested lately if that actually works or if patching mpv is requred:
mpv --gpu-context=drm --hwdec=vaapi some_movie.mkv
But I have no idea what the state of virtualbox driver is, whether it supports drm/kms or not. It definitely does not support hardware decoding.
Then there's the question that does need to be asked - why do you want to do this? Things are a bit different nowadays with drm/kms, but generally X can make much better use of your hardware than the console can. So if you already have a lightweight X environment installed, just use that.
Last edited by Gusar (2019-02-08 00:08:53)
Offline
On actual hardware, mpv can do exactly what you want and does it much better than mplayer:
mpv --gpu-context=drm some_movie.mkv
You can even have hardware decoding, though I haven't tested lately if that actually works or if patching mpv is requred:
mpv --gpu-context=drm --hwdec=vaapi some_movie.mkv
But I have no idea what the state of virtualbox driver is, whether it supports drm/kms or not. It definitely does not support hardware decoding.
Then there's the question that does need to be asked - why do you want to do this? Things are a bit different nowadays with drm/kms, but generally X can make much better use of your hardware than the console can. So if you already have a lightweight X environment installed, just use that.
I will try to use mpv when I get the time; my audio hardware is now occupied and I cannot turn off X to test. As for why, just for the challenge! I saw in forums that this could be done, so why not try it? After all, I am trying Arch for fun and experimentation.
Last edited by num18 (2019-02-08 12:57:45)
Offline
Ok, "for the heck of it" is a valid reason to try something
The thing is, mplayer hasn't seen development in years, so it's not surprising things have stopped working. The fbdev output hasn't worked since forever. The fbdev2 output should work, but there might be something with the virtualbox driver that mplayer doesn't like, or the virtualbox driver doesn't implement certain things that mplayer needs. So mpv is a better option.
Then there's another thing with mpv - use --vo=drm instead of --gpu-context=drm. vo=drm is software rendering, it's better to use gpu-context=drm for more efficient hardware rendering, but virtualbox may not provide hardware rendering outside of X, so vo=drm might work while gpu-context=drm might not. Virtualbox is just not that good when it comes to graphics.
Offline
Ok, "for the heck of it" is a valid reason to try something
The thing is, mplayer hasn't seen development in years, so it's not surprising things have stopped working. The fbdev output hasn't worked since forever. The fbdev2 output should work, but there might be something with the virtualbox driver that mplayer doesn't like, or the virtualbox driver doesn't implement certain things that mplayer needs. So mpv is a better option.
Then there's another thing with mpv - use --vo=drm instead of --gpu-context=drm. vo=drm is software rendering, it's better to use gpu-context=drm for more efficient hardware rendering, but virtualbox may not provide hardware rendering outside of X, so vo=drm might work while gpu-context=drm might not. Virtualbox is just not that good when it comes to graphics.
Hah, about the last point, I definitely experienced that! I will try the software rendering option, although with my low end pc and through virtualbox the machine will probably flip out
Ideally I would like to get a fairly cheap linux compatible dell or lenovo laptop just for doing experiments with arch linux and bsd.
On a more relevant note: I did not know mplayer was not being developed. So my smplayer is using mpv as backend because the mplayer backend is deprecated? I guess that makes sense, but I never realized. That's a newbie for you!
Offline
Ok, "for the heck of it" is a valid reason to try something
The thing is, mplayer hasn't seen development in years, so it's not surprising things have stopped working. The fbdev output hasn't worked since forever. The fbdev2 output should work, but there might be something with the virtualbox driver that mplayer doesn't like, or the virtualbox driver doesn't implement certain things that mplayer needs. So mpv is a better option.
Then there's another thing with mpv - use --vo=drm instead of --gpu-context=drm. vo=drm is software rendering, it's better to use gpu-context=drm for more efficient hardware rendering, but virtualbox may not provide hardware rendering outside of X, so vo=drm might work while gpu-context=drm might not. Virtualbox is just not that good when it comes to graphics.
I am posting again to inform you your suggestion works perfectly! The video is a bit choppy, but this is probably because of the limitations of virtualbox, the amount of vram allocated and my subpar hardware. Thanks! I updated the OP to note the solution.
Offline