LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-07-2015, 07:18 AM   #1
yash_tripathi
LQ Newbie
 
Registered: Dec 2015
Location: India
Distribution: Ubuntu,CentOS
Posts: 11

Rep: Reputation: Disabled
Stream audio over ssh (openssh).


I played a video over ssh but could not get the audio to stream over the same.
To experiment I connected to a pc (local lan) running openssh server, when I tried to play a video in the client, the audio was played in the server though i could see the video in the client side.
 
Old 12-07-2015, 10:18 AM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
I've never experienced that before. What video player were you using and how did you connect and set your environment?
 
Old 12-07-2015, 11:30 AM   #3
yash_tripathi
LQ Newbie
 
Registered: Dec 2015
Location: India
Distribution: Ubuntu,CentOS
Posts: 11

Original Poster
Rep: Reputation: Disabled
I installed MPlayer 1.1-4.8 on ubuntu 14.04 server and ssh'ed (openssh) to the server.

Issued the following command on the client,

$ mplayer <video_name>

and couldn't stream audio in the client.
 
Old 12-07-2015, 04:29 PM   #4
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Hm, apparently this is pretty standard, I guess I've just never tried. Apparently all of the times I've run mplayer on a remote system through ssh the file hasn't had any sound anyway, and all of the times I've played a remote file with sound I've used mplayer locally and opened the file through NFS or similar.

Here are a couple of alternate ways to play a video stored on a remote machine:
http://www.systutorials.com/24806/mp...m-remote-host/

I always do the last one, mounting the directory using sshfs or nfs and running mplayer locally.
 
2 members found this post helpful.
Old 12-08-2015, 12:00 AM   #5
MEINKS
LQ Newbie
 
Registered: Dec 2015
Posts: 3

Rep: Reputation: Disabled
Quote:
Originally Posted by yash_tripathi View Post
I played a video over ssh but could not get the audio to stream over the same.
To experiment I connected to a pc (local lan) running openssh server, when I tried to play a video in the client, the audio was played in the server though i could see the video in the client side.
Your best bet is to setup a DLNA server and a DLNA client. Plex, Kodi (formerly known as XBMC) and VLC are a few examples for streaming media.

Last edited by MEINKS; 12-08-2015 at 12:03 AM.
 
Old 12-08-2015, 01:42 AM   #6
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by yash_tripathi View Post
I installed MPlayer 1.1-4.8 on ubuntu 14.04 server and ssh'ed (openssh) to the server.

Issued the following command on the client,

$ mplayer <video_name>

and couldn't stream audio in the client.
mplayer controls the audio interface on the computer where it runs. Audio has nothing to do with the shell, thus it's not transferred to the ssh client.

On the other hand there must be ways to do that, using an audio server like Jack perhaps. Also, maybe X can be made to control audio, thus permitting to transfer it via X forwarding.

Newbies talking to newbies
 
Old 12-08-2015, 01:49 AM   #7
yash_tripathi
LQ Newbie
 
Registered: Dec 2015
Location: India
Distribution: Ubuntu,CentOS
Posts: 11

Original Poster
Rep: Reputation: Disabled
Thumbs up it works !!

suicidaleggroll, that worked like a charm. I mounted the remote directory over ssh
and was able to play video (along with audio). Though I would try to set up a DLNA server
as pointed out by MEINKS and see if that works.

Thanks.
 
Old 12-08-2015, 02:00 AM   #8
yash_tripathi
LQ Newbie
 
Registered: Dec 2015
Location: India
Distribution: Ubuntu,CentOS
Posts: 11

Original Poster
Rep: Reputation: Disabled
Thank you, berndbausch for providing that link. I was really desperate to know it.
 
Old 12-08-2015, 03:07 AM   #9
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by yash_tripathi View Post
Thank you, berndbausch for providing that link. I was really desperate to know it.
Credit where it's due - I didn't provide a link, but I am certainly happy to see you happy
 
Old 12-08-2015, 02:09 PM   #10
MEINKS
LQ Newbie
 
Registered: Dec 2015
Posts: 3

Rep: Reputation: Disabled
@yash_tripathi

The DLNA method can do streaming media to PC as well as to TV, bluray player, smartphones and tablets with a DLNA client.


Any hoo, I'm glad that suicidaleggroll and berndbausch solved it for you.

Last edited by MEINKS; 12-08-2015 at 02:11 PM.
 
  


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
stream audio over ssh (openssh). yash_tripathi LinuxQuestions.org Member Intro 2 12-07-2015 04:35 PM
openSSH vs SSH gautamnarayan Linux - Networking 5 10-31-2008 09:40 AM
How do I get AmaroK to stream audio over an ssh connection? martinr Linux - Software 2 04-18-2006 10:11 AM
Setting up an Audio Stream tebucky Linux - General 4 09-24-2005 11:01 AM
SSH/OpenSSH mikesvx1 Linux - Security 2 12-21-2001 05:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:11 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