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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-16-2014, 09:43 PM
|
#1
|
Member
Registered: Sep 2011
Location: Northern Colorado
Distribution: Slackware64
Posts: 79
Rep: 
|
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!
|
|
|
01-16-2014, 10:34 PM
|
#2
|
LQ Newbie
Registered: Oct 2012
Location: A magical place full of Canadian dirt.
Distribution: Arch Linux
Posts: 12
Rep:
|
Take out that "-vo fbdev2", it means "output video directly to screen, bypassing everything."
|
|
|
01-17-2014, 08:26 AM
|
#3
|
Member
Registered: Sep 2011
Location: Northern Colorado
Distribution: Slackware64
Posts: 79
Original Poster
Rep: 
|
Quote:
Originally Posted by mutput7
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?
|
|
|
01-18-2014, 09:56 PM
|
#4
|
LQ Newbie
Registered: Oct 2012
Location: A magical place full of Canadian dirt.
Distribution: Arch Linux
Posts: 12
Rep:
|
Quote:
Originally Posted by derstephen
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.
|
|
|
01-20-2014, 01:55 AM
|
#5
|
LQ Newbie
Registered: Oct 2012
Location: A magical place full of Canadian dirt.
Distribution: Arch Linux
Posts: 12
Rep:
|
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.
|
01-20-2014, 03:05 PM
|
#6
|
Member
Registered: Sep 2011
Location: Northern Colorado
Distribution: Slackware64
Posts: 79
Original Poster
Rep: 
|
Quote:
Originally Posted by mutput7
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...
|
|
|
01-28-2014, 08:06 PM
|
#7
|
Member
Registered: Sep 2011
Location: Northern Colorado
Distribution: Slackware64
Posts: 79
Original Poster
Rep: 
|
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...
|
|
|
All times are GMT -5. The time now is 12:15 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|