5 Replies - 1233 Views - Last Post: 15 June 2014 - 04:22 PM

#1 Robbss  Icon User is offline

  • D.I.C Head

Reputation: 21
  • View blog
  • Posts: 57
  • Joined: 26-December 10

RaspBerry Pi, struggling with fancy audio

Posted 14 June 2014 - 08:02 PM

Hey there everyone, recently I've been setting up a project for myself where I want to use a RaspBerry Pi as a media server/nas/video player on my TV, however though I've run into a few things that I'd really like to get working.

I live in a room with a mate (long story, tl;dr wierd rules on welfare forced me out because of my mom), so, if we're watching a movie at night we can't have the TV running at a volume that is acceptable for us without waking the rest of the house, so my idea was to stream the audio from Pi through the network that it's connected to and if possible pick up that audio with our phones, laptop etc and play it in our headsets, however this is the point I'm struggling with.

Does anyone have any experience with this that are willing to give me a helping hand, I feel like I've tried absolutely everything and it just doesn't appear to be working.

In short terms what I want is to stream the audio that the Pi is "hearing" or if possible just the audio from omxplayer through ethernet.

I've currently set up Node.JS on the Pi and written a fancy websocket server that listens for clients (I gotta finish a fancy UI for it), and those clients can then send commands to the Pi like a remote control, the way I've set it up is by using a SSH extension for node, so basically the node server first creates a connection to local host with SSH, and then sends the appropriate commands for the actions it receives through the websocket (It isn't directly sent for pretty obvious reasons), it works really well and it's for all intents and purposes instant.

I have a external hard drive connected to the Pi that I use to store movies on, and I've set it up so that the folder can be accessed from any computer, so you can just drag and drop the movies onto the Pi and then play them.

Everything works really well except the streaming audio "problem", but any suggestions on making any part of it better would be appreciated, I might follow up with some photos if anyone's interested :)

This post has been edited by Robbss: 14 June 2014 - 08:09 PM


Is This A Good Question/Topic? 0
  • +

Replies To: RaspBerry Pi, struggling with fancy audio

#2 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5675
  • View blog
  • Posts: 12,192
  • Joined: 02-June 10

Re: RaspBerry Pi, struggling with fancy audio

Posted 14 June 2014 - 08:19 PM

Sounds like too many pieces. If you have a NAS for the PI, and a laptop to stream to, then what do you need the PI for? Just connect directly from the laptop to the NAS and watch on the laptop.

OR... If your TV is new enough to be able to hook up to the PI then I have to beleive it has some flavor of headphone/audio-out jack.

Wait... Doesn't the PI have a headphone jack you can use? Just get one of the countless bluetooth transmitters that plug into a headset jack that are all over Amazon for $20. Then you can connect your phone to that, and put a splitter on the phone to 2 pair of headsets.

In this case I think you're over complicating the plumbing. Its a lot cheaper and easier for a small one-off situation like this to just do it through wiring than trying to go fancy with some custom ethernet solution.
Was This Post Helpful? 0
  • +
  • -

#3 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5675
  • View blog
  • Posts: 12,192
  • Joined: 02-June 10

Re: RaspBerry Pi, struggling with fancy audio

Posted 14 June 2014 - 08:35 PM

Completely personal rant nothing to do with coding. If you only want to read about the ways the OP can fix their tech situation don't open the spoiler.
Spoiler

This post has been edited by tlhIn`toq: 14 June 2014 - 08:35 PM

Was This Post Helpful? 0
  • +
  • -

#4 Robbss  Icon User is offline

  • D.I.C Head

Reputation: 21
  • View blog
  • Posts: 57
  • Joined: 26-December 10

Re: RaspBerry Pi, struggling with fancy audio

Posted 15 June 2014 - 04:25 AM

As a reply to your personal rant, I'll justify myself and say that I had to move out because I make to much money, my mother has post traumatic stress as is therefore unable to work, I'm currently working part time and I'm just finishing my education, my friends dad offered me to live there while we finish school for a low rent and also the friend I live with is a one that I'm gonna be creating games with.

I make the equivalent of about 3000 USD a month after taxes and after paying my rent and car insurance, so I wouldn't really say that I'm poor nor that I'm flooding anywhere, I live here for my moms sake, not my own, also, I'm starting university as software engineer next year and I'm going to take a special in game engine development, so I'd say that I am taking care of my career too.

So to sum up, I'm 19, I make 3000$ a month, I have a car and I moved away from home because as I'm over 18 my income affected the welfare my mom got to a point where she wouldn't be able to live for it.

I want to get this done as a solution so that we both can watch the movie on our own audio devices, my laptop just died (in the middle of math exam, gg) so I'd need to use my phone and my friend might use his phone or laptop depending on what he has in with him.

I didn't know about those blue tooth jacks so I'll definitely take a look at that, thanks for the suggestion.
Was This Post Helpful? 0
  • +
  • -

#5 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5675
  • View blog
  • Posts: 12,192
  • Joined: 02-June 10

Re: RaspBerry Pi, struggling with fancy audio

Posted 15 June 2014 - 09:48 AM

I have to say I'm impressed. I'm man enough to admit when I make a hasty snap judgement about someone based on too little information and that I was wrong. Please accept my apologies.

I do have to ask though... If you are taking home US$3000 a month after taxes, then why are you living with your mate's dad? Is the cost of living in your country so high that US$50,000/year isn't enough? Because when I was making that at my last job I had a current year car and pick-up truck, and an 1,800 sq.ft. house (4 bedroom 3 bath). And my wife and I were pretty comfortable with me on that wage. My niece in Australia is 20, earns about that same amount and just bought a condo in Southport QLD.

Getting back to your audio issue. If you want for both you and your friend to receive the audio SEPARATELY on different devices then you have an even bigger issue: Synchronization. You would each have different streams. It would be as if you both started the same movie from NetFlix at the same time... but is it truly the same time? Digital streams aren't really meant for splitting. At best you can try to create two streams and hope to have the start within a few milliseconds of each other. But you'd have to make a system that reads the data from the drive once then pushes it out on two different streams and hope there isn't a problem keeping up with the video to where it looks like a badly dubbed Godzilla movie.

Instead of bluetooth which can only pair to one device at a time maybe you could go even more basic: FM transmitter. If you plug in a small FM transmitter to the headphone jack of the TV then you could both tune it in on different radios. You see this all the time at a gym/health club where they have one TV showing the news, another showing sports, another showing daytime TV. Each TV is broadcasting on a different frequency and the people on the treadmills tune their radio to the right channel for that TV.

There are plenty of transmitter like this. People that don't have bluetooth in there car will connect them to their phones so they can broadcast to their car stereo. Here's one on Amazon.com for less that US$7
http://www.amazon.co...=fm+transmitter
Was This Post Helpful? 0
  • +
  • -

#6 Robbss  Icon User is offline

  • D.I.C Head

Reputation: 21
  • View blog
  • Posts: 57
  • Joined: 26-December 10

Re: RaspBerry Pi, struggling with fancy audio

Posted 15 June 2014 - 04:22 PM

It's mainly for convenience, as I stated I'm going to university next year, so getting an apartment and everything that follows would be really expensive and inconvenient for just 1 year, instead I was offered to just live here and pay for food and rent, that way I'll have a huge saving for when I gotta get a place at the university and also he lives right next to the college and we're working on games together, so really I don't see any reason to find a place to live in alone ;)

The FM transmitter is an amazing idea, I can't believe that it never crossed my mind, thank you very much for the suggestion I'm sure it'll fit right in with the set up, however that poses another slight issue, can the Pi play audio through the HDMI while also outputting that audio through the jack?

I believe there's a jack on the TV, but it's quite a bit away from the Pi, so I wouldn't be able to power the transmitter unless I pulled some long micro usb cables to it, which of course is possible, but if there was a command to make linux output on both it'd be a lot more convenient.

ps.

Apology accepted and really no offence taken, I know a lot of that kind of people too and it annoys me to no end. ;)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1