You are not logged in.

#1 2007-08-30 12:55:59

azerty
Member
Registered: 2007-08-23
Posts: 90
Website

[SOLVED]mplayer in the shell

Hey

How can I make mplayer display a video in the shell?

I tried watching a video in Xorg using xterm and mplayer and it worked just fine.

But after quitting Xorg and being in the 'real' shell I tried it again, this time mplayer doesn't display anything beside some weird letters appearing randomly. (The sound of the video is there, so just the video itself is not displayed)

Is this a bug, or does mplayer need Xorg to display videos?
If it's not the case, how can I make mplayer display videos in the shell without any X-Server?

Thanks in advance.

Last edited by azerty (2007-08-30 16:51:51)


Why are we here? What is the sense of life?
INVITATION TO THE TRUTH

Offline

#2 2007-08-30 14:51:03

harlekin
Member
From: Germany
Registered: 2006-07-13
Posts: 408

Re: [SOLVED]mplayer in the shell

It's not a bug. It's a feature! (tm)

Mplayer by default selects the video output it finds most suitable. What you've seen was libaa oder libcaca (coloured libaa) as video output.

No help for you actual problem, though. Sorry.

Last edited by harlekin (2007-08-30 14:51:23)


Hail to the thief!

Offline

#3 2007-08-30 16:51:20

azerty
Member
Registered: 2007-08-23
Posts: 90
Website

Re: [SOLVED]mplayer in the shell

harlekin wrote:

It's not a bug. It's a feature! (tm)

Mplayer by default selects the video output it finds most suitable. What you've seen was libaa oder libcaca (coloured libaa) as video output.

No help for you actual problem, though. Sorry.

Ok if it's a feature, fine. I'll stay with that.

Maybe there's a possibility the force a certain video output, I'll take a look at the manual.

Thanks.


Why are we here? What is the sense of life?
INVITATION TO THE TRUTH

Offline

#4 2007-08-30 19:26:46

samoturk
Member
From: Ljubljana, Slovenia
Registered: 2007-02-12
Posts: 86

Re: [SOLVED]mplayer in the shell

It is possible to force certain video output.
Try:
mplayer -vo help

And you'll get list of possible video output options.

Offline

#5 2007-08-30 19:50:29

harlekin
Member
From: Germany
Registered: 2006-07-13
Posts: 408

Re: [SOLVED]mplayer in the shell

Really nice that mplayer is capable of playing in a framebuffer.

mplayer -vo fbdev2 file

Is there a way to obtain fullscreen output even out of X?


Hail to the thief!

Offline

#6 2007-08-30 20:27:37

azerty
Member
Registered: 2007-08-23
Posts: 90
Website

Re: [SOLVED]mplayer in the shell

harlekin wrote:

Really nice that mplayer is capable of playing in a framebuffer.

mplayer -vo fbdev2 file

Is there a way to obtain fullscreen output even out of X?

Yeah, I finally managed to get mplayer working without X too. Mplayer is really an amazing piece of code.


If you want to have at least the video centered in the screen, try 'mplayer -vo fbdev2 file -fs'.

I tried fullscreen by pushing the key 'f' during playback, but it don't works.

Any ideas about fullscreen mode? I'm sure it is possible, I must have overseen it in the manual..

Last edited by azerty (2007-08-30 20:28:08)


Why are we here? What is the sense of life?
INVITATION TO THE TRUTH

Offline

#7 2007-08-30 20:30:25

samoturk
Member
From: Ljubljana, Slovenia
Registered: 2007-02-12
Posts: 86

Re: [SOLVED]mplayer in the shell

It is possible:

mplayer -vo fbdev2 -fs -zoom -x 1024 -y 768 FILENAME.avi

You can adjust -x and -y according to your resolution. Yes mplayer is realy amazing!

Offline

#8 2007-09-02 10:17:00

s26c.sayan
Member
From: Kolkata, India
Registered: 2007-02-07
Posts: 176
Website

Re: [SOLVED]mplayer in the shell

Being able to play video in the console sounds very interesting!

But when I try

mplayer -vo fbdev2 file

it gives an error something like :

/dev/fb0: No such device

sad

I even tried

mknod /dev/fb0 c 29 0

to create /dev/fb0, but still no help!!

What else do I need to do?? (I am already  googling to find an answer, but still any help will be appreciated!)


March Linux : An Arch Linux "distrolet" that I am trying to develop (March = My Arch!)
Please take a look......:)

Offline

#9 2007-09-02 10:26:53

azerty
Member
Registered: 2007-08-23
Posts: 90
Website

Re: [SOLVED]mplayer in the shell

Try

mplayer -vo fbdev file

On my system I'm able to use both fbdev and fbdev2. But as far as I know, the mplayer manual states that not every system is able to use both framebuffers. So just try it out without the '2'.


Why are we here? What is the sense of life?
INVITATION TO THE TRUTH

Offline

#10 2007-09-02 10:34:25

s26c.sayan
Member
From: Kolkata, India
Registered: 2007-02-07
Posts: 176
Website

Re: [SOLVED]mplayer in the shell

azerty wrote:

Try

mplayer -vo fbdev file

On my system I'm able to use both fbdev and fbdev2. But as far as I know, the mplayer manual states that not every system is able to use both framebuffers. So just try it out without the '2'.

Thank you, but I've already tried it!! (After reading 'mplayer -vo help' & man mplayer)

But even that doesn't work!! sad


March Linux : An Arch Linux "distrolet" that I am trying to develop (March = My Arch!)
Please take a look......:)

Offline

#11 2007-09-03 07:33:49

samoturk
Member
From: Ljubljana, Slovenia
Registered: 2007-02-12
Posts: 86

Re: [SOLVED]mplayer in the shell

You have to configure framebuffer in grub. Add vga=0x317 at the end of kernel line in /boot/grub/menu.lst. This will set you framebuffer with 1024x768@16K.
Something like this:

title           Arch fb
root            (hd0,4)
kernel          /boot/vmlinuz26 root=/dev/sda5 ro lapic acpi nmi_watchdog=0 vga=0x317
initrd          /boot/kernel26.img
boot

If you'd like other resolutions you can choose from one of theese:

#  FRAMEBUFFER RESOLUTION SETTINGS
#     +-------------------------------------------------+
#          | 640x480    800x600    1024x768   1280x1024
#      ----+--------------------------------------------
#      256 | 0x301=769  0x303=771  0x305=773   0x307=775
#      32K | 0x310=784  0x313=787  0x316=790   0x319=793
#      64K | 0x311=785  0x314=788  0x317=791   0x31A=794
#      16M | 0x312=786  0x315=789  0x318=792   0x31B=795
#     +-------------------------------------------------+

Offline

#12 2007-09-11 20:36:19

Tigertailz
Member
From: Sweden
Registered: 2007-09-11
Posts: 89

Re: [SOLVED]mplayer in the shell

Nice, but how does one get fullscreen with correct AR ?

and is there away so you dont have to write mplayer -vo fbdev2 -fs -zoom -x 1024 -y 768 FILENAME.avi everytime?

Last edited by Tigertailz (2007-09-11 20:37:01)

Offline

#13 2007-09-11 20:38:53

s26c.sayan
Member
From: Kolkata, India
Registered: 2007-02-07
Posts: 176
Website

Re: [SOLVED]mplayer in the shell

Tigertailz wrote:

Nice, but how does one get fullscreen with correct AR ?

and is there away so you dont have to write mplayer -vo fbdev2 -fs -zoom -x 1024 -y 768 FILENAME.avi everytime?

Yeh...I guess you could write a shell script for it!!


March Linux : An Arch Linux "distrolet" that I am trying to develop (March = My Arch!)
Please take a look......:)

Offline

#14 2007-09-11 20:48:00

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: [SOLVED]mplayer in the shell

s26c.sayan wrote:
Tigertailz wrote:

Nice, but how does one get fullscreen with correct AR ?

and is there away so you dont have to write mplayer -vo fbdev2 -fs -zoom -x 1024 -y 768 FILENAME.avi everytime?

Yeh...I guess you could write a shell script for it!!

Or maybe an alias :
alias mpfb="mplayer -vo fbdev2 -fs -zoom -x 1024 -y 768"
Or just put these settings in mplayer config if you only use mplayer in the shell.


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#15 2007-09-11 21:05:50

Tigertailz
Member
From: Sweden
Registered: 2007-09-11
Posts: 89

Re: [SOLVED]mplayer in the shell

Yes I created an alias, but I have to use sudo to start the commands, do root have to own /dev/fb0 ?

and correct AR would pwn

Last edited by Tigertailz (2007-09-11 21:07:12)

Offline

#16 2007-09-11 21:18:48

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [SOLVED]mplayer in the shell

I recently tried the cvidix driver on framebuffer, just out of curiosity, and it worked fine - correct AR etc. I needed to set screenw and screenh on the command line, and you can only run the vidix drivers as root.

Offline

#17 2007-09-11 21:21:37

Tigertailz
Member
From: Sweden
Registered: 2007-09-11
Posts: 89

Re: [SOLVED]mplayer in the shell

Can you plz give an exampkle of your command?

Offline

#18 2007-09-11 21:38:31

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [SOLVED]mplayer in the shell

mplayer -vo cvidix -screenh <blah> -screenw <blah> awesome_video.avi

Offline

#19 2007-09-11 21:43:16

Tigertailz
Member
From: Sweden
Registered: 2007-09-11
Posts: 89

Re: [SOLVED]mplayer in the shell

Damn didnt work for me, could find working VIDIX driver

Offline

#20 2007-09-11 22:40:11

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [SOLVED]mplayer in the shell

Offline

#21 2007-09-12 10:05:13

Tigertailz
Member
From: Sweden
Registered: 2007-09-11
Posts: 89

Re: [SOLVED]mplayer in the shell

Unfortunaly my graphicscard wasnt supported, any other thought on how to get correct AR ?

Offline

#22 2007-09-13 00:37:15

kagerato
Member
Registered: 2007-09-10
Posts: 45
Website

Re: [SOLVED]mplayer in the shell

Tigertailz wrote:

Unfortunaly my graphicscard wasnt supported, any other thought on how to get correct AR ?

If the fbdev output works fine but you just have the wrong aspect ratio, you probably just need to set the right options.  I don't think the aspect ratio will be preserved if you manually specify both the x+y resolution on the command line.

Here's some arguments you probably should look into:

-xy (xres)  -- sets the x resolution and allows scaling, but determines y res by the aspect ratio
-monitoraspect (ratio)  -- sets your display's aspect ratio
-aspect (ratio)  -- manually overides the video aspect ratio

I would probably specify these options in the config file, but you can do it manually on the console as well.

References:

http://www.mplayerhq.hu/DOCS/man/en/mplayer.1.html
http://www.mplayerhq.hu/DOCS/HTML/en/index.html

http://forum.doom9.org/showthread.php?t=41057
http://lists.mplayerhq.hu/pipermail/mpl … 52276.html

Offline

#23 2007-09-13 19:16:03

Tigertailz
Member
From: Sweden
Registered: 2007-09-11
Posts: 89

Re: [SOLVED]mplayer in the shell

Thank you so much, works like a charm ! big_smile

Offline

#24 2007-09-18 14:37:57

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Re: [SOLVED]mplayer in the shell

Sorry for reopening the thread, but how did you get rid of the console writings?

Using setterm -cursor off I can remove the cursor, using mplayer bla bla &>/dev/null I can remove mplayer output, but I'd like a whole clean screen or the movie seen OVER the console text...

Offline

#25 2007-09-19 20:07:48

ProzacR
Member
Registered: 2007-04-29
Posts: 272

Re: [SOLVED]mplayer in the shell

use clear command before startting, but still it would be nice to see non 100% fullscreen movie in the middle of sreen not on top side.

Offline

Board footer

Powered by FluxBB