LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-16-2014, 09:43 PM   #1
derstephen
Member
 
Registered: Sep 2011
Location: Northern Colorado
Distribution: Slackware64
Posts: 79

Rep: Reputation: Disabled
Mplayer Over HDMI Overriding Window Manager?


Hi all,

Wasn't sure exactly what to call this thread as I'm kind of at a loss as to what exactly is going on, but it seems to be at least an mplayer/window manager problem.

The command I run to play mplayer over HDMI:

Code:
mplayer -vo fbdev2 -ao alsa:device=hw=0.3 -fs -zoom -x 1080 -y 720 <movie.avi>
(obviously I've aliased it in my .bashrc so I don't have to keep typing all that)

This command works perfectly as far as actual playback is concerned; audio and video are good, aspect ratio and size are good, (most) mplayer commands are good, etc. No problems there! However, when it starts, my entire screen (on my laptop) goes black with the playback screen in the middle, and...stays that way. Even if I let the movie finish, the playback screen will close but my window manager never returns; all I have is a black screen and a cursor (that I can still move around). If I switch workspaces via hotkey to one that has a shell open, the cursor changes to a text input one as opposed to an arrow, but nothing else happens. Ctrl-C and 'q' stop playback, but that's all; the only way I can get rid of the black screen is a hard reset.

So basically this command works great as long as it's the last thing I want to do on my laptop without restarting.

I'm running Slackware64 14.0 on a Lenovo V570 laptop. The window manager is spectrwm. I've googled around, and while it seems quite a few people use more or less the exact same command, they never mention this issue, so I'm wondering if it is related to my WM (most people in the Google results are Ubuntu users who are most likely not using spectrwm). Ideally I would want the mplayer screen on my laptop to either not appear at all (so the only output is to fbdev2) or to be the normal one that floats on top of my regular console that I can close at any time and return to whatever else I need to do.

Thanks!
 
Old 01-16-2014, 10:34 PM   #2
mutput7
LQ Newbie
 
Registered: Oct 2012
Location: A magical place full of Canadian dirt.
Distribution: Arch Linux
Posts: 12

Rep: Reputation: 4
Take out that "-vo fbdev2", it means "output video directly to screen, bypassing everything."
 
Old 01-17-2014, 08:26 AM   #3
derstephen
Member
 
Registered: Sep 2011
Location: Northern Colorado
Distribution: Slackware64
Posts: 79

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by mutput7 View Post
Take out that "-vo fbdev2", it means "output video directly to screen, bypassing everything."
Thanks for your reply.

If I took that out, wouldn't the video just get played on my laptop screen like normal? How would it know to output to the frame buffer/HDMI?
 
Old 01-18-2014, 09:56 PM   #4
mutput7
LQ Newbie
 
Registered: Oct 2012
Location: A magical place full of Canadian dirt.
Distribution: Arch Linux
Posts: 12

Rep: Reputation: 4
Quote:
Originally Posted by derstephen View Post
Thanks for your reply.

If I took that out, wouldn't the video just get played on my laptop screen like normal? How would it know to output to the frame buffer/HDMI?
(Sorry for the slow response!)
Erm... I don't think I understand.
Why exactly do you need it to output to the framebuffer?
The fbdev drivers are for playing video in a virtual terminal, where there is no window manager or X display.
 
Old 01-20-2014, 01:55 AM   #5
mutput7
LQ Newbie
 
Registered: Oct 2012
Location: A magical place full of Canadian dirt.
Distribution: Arch Linux
Posts: 12

Rep: Reputation: 4
Oh, I understand now.
I re-read your post and came up with:
Code:
DISPLAY="${DISPLAY}.1" mplayer -ao alsa:device=hw=0.3 -fs -zoom -x 1080 -y 720 <movie.avi>
This adds ".1" to the DISPLAY variable. As explanation, if your DISPLAY is set to ':0', which it very (very, very) likely is by default, then your app'll open by default on display 0, output zero (your main monitor). If, however, it's set to ':0.1', it'll output video to display 0, output one (your second monitor).
 
1 members found this post helpful.
Old 01-20-2014, 03:05 PM   #6
derstephen
Member
 
Registered: Sep 2011
Location: Northern Colorado
Distribution: Slackware64
Posts: 79

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by mutput7 View Post
Oh, I understand now.
I re-read your post and came up with:
Code:
DISPLAY="${DISPLAY}.1" mplayer -ao alsa:device=hw=0.3 -fs -zoom -x 1080 -y 720 <movie.avi>
This adds ".1" to the DISPLAY variable. As explanation, if your DISPLAY is set to ':0', which it very (very, very) likely is by default, then your app'll open by default on display 0, output zero (your main monitor). If, however, it's set to ':0.1', it'll output video to display 0, output one (your second monitor).
It's strange; the first time I tried this it worked playback-wise, although I still had to restart my window manager to get the display back when it was done. But I can't seem to get it to work again (I edited it in my .bashrc and haven't changed it so I know it's exactly the same command). Even a reboot of my whole system hasn't gotten it to work again. When I run the command, both screens (the TV and the laptop) go black with a white underscore in the top left corner but nothing else happens until I kill the window manager.

Thanks for your replies and sorry for not being as clear as I could have been earlier; these display concepts are a bit new to me...
 
Old 01-28-2014, 08:06 PM   #7
derstephen
Member
 
Registered: Sep 2011
Location: Northern Colorado
Distribution: Slackware64
Posts: 79

Original Poster
Rep: Reputation: Disabled
So I'm bumping to give this a second shot, seeing as now my previous less-than-ideal solution no longer works either. I can't get any video or audio output to my TV now, with neither the DISPLAY method nor the original fbdev2 method. When I run it, both screens go black with a grayish underscore in the top left corner, but no playback. When I restart my window manager with the HDMI plugged in, my whole desktop gets mirrored on my TV, so I know my cable is still good.

I've also tried using DISPLAY=localhost:0.1 instead of DISPLAY=${DISPLAY}.1, and that at least got video playback on my laptop screen, but it wasn't propagated over the cable to the TV.

I've tried hard rebooting several times but nothing changes. The first time I tried mutput7's change it worked (I watched an entire episode of The Simpsons on my TV) but nothing has worked ever since. I've double checked that $DISPLAY is restored back to :0 as well. None of this really makes any sense...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[ProLiant MicroServer, ATI R6xx HDMI, Digital Out, HDMI] No HDMI sound at all vnatius Linux - Hardware 15 08-16-2012 01:09 PM
No video from mplayer/xine/vlc with HDMI connection pickarooney Linux - Hardware 3 03-04-2010 02:53 PM
Awesome window manager and Mplayer - Slackware 13.0 neosix Slackware 5 11-27-2009 03:03 PM
Sound HDMI 780G MythTV Mplayer Xine forum1793 Linux - Hardware 13 04-26-2009 08:35 AM
mplayer window postion save vs mplayer plugin window matters Slackware 0 03-28-2008 08:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration