Auto play live audio stream - Raspberry Pi Q&A, Help & Troubleshooting

Hi all,
Apologies, another newbie question! (Don't you just hate us newbies!).
I need my Pi to play a live audio stream (AAC+) and keep playing it (so the player needs to have a repeat option that can be saved so it will keep on trying the same stream continuously (or a file that contains the stream URL preferably). The idea is that the Pi starts playing a live stream as soon as it's powered and will keep playing it indefinitely (and keep retrying if the connection drops).
I'm not sure which software to use to play the live stream OR how to make an entry into what would be the same as Windows 'start up' folder to that it auto starts when it loads up.
I am also unsure about whether I need to load the GUI for this to work, or if it can start from the command line.
I appreciate I'm asking a lot, but I'd like to hear peoples suggestions about the best way to handle this and where to start.
Thanks in advance for any input into the subject.

I'm using Clementine for listening network radio stations, but I haven't seen a function to autoplay while starting. I need to find a better music streamer too...

You don't need a GUI for anything. Mplayer plays internet radio. Write a loop in bash that starts mplayer again and again if it looses connection so that mplayer stops (while loop with a sleep and the mplayer command).
Sent from my Nexus 4 using xda premium

Related

Audio broadcasting.

I've done some googling to no avail. Hopefully someone here might know the answer. Is it possible to stream audio from my PC to my phone? To be specific, I would like to listen to the audio coming from my PC i.e. if I'm watching a movie I'd like the movie's audio steaming from the device, not music. I'm also not talking about watching movies from my PC on the device i.e. Orb. Thanks for any help!
could you clarify it a different way? do you mean play just the audio on your phone while watching a movie on the pc?
i use subsonic to play music on my phone that resides on my pc with a server app on my pc.
you could also use streamfurious if you have a shoutcast playlist stream set up already
seeing what you guys were talking about, i remembered that i have winampremote instaled in my pc at home, and went to get the aplic from the market to use in my N1 (went also to another site to get the server app to install in my pc. it all worked well and i get access to my library at home. i see the names of the music, etc etc. the only thing that is not working is the sound (I can't hear anything ) is it possible the N1 phone couldn't play this kind o. streams?
if some of you could give a tip i would be much appreciated. i'm trying over the net and not kn my lan...
Sent from my Nexus One using the XDA mobile application powered by Tapatalk
and of course i did open the port in my rooter firewall.
Sent from my Nexus One using the XDA mobile application powered by Tapatalk

[Q] Streaming mp3 from PC

Anyone uses this?
We all have gigs of mp3's on our PC's and I found only one app which can simply stream music, using wireless router for connection - Gmote. So this way I plug in my headphones and can listen to anything on my PC from anywhere in the house.
Sadly, it seems that it isn't developing anymore and a lot of my music is encoded in a way that Gmote doesn't like. I think it has problems with variable higher bitrates, maybe.. not sure.
Is there anything else that can do the job? DLNA maybe?
You can easy convert al your MP3-files to a right format.
http://www.nch.com.au/switch/index.html
Let your computer do the job at night, and in the morning you're a smiling human
No way, that would permanently lower sound quality . And PC is also connected to hi-fi
I'd rather find an app that works like it should . DLNA could be beter option, that way PC would recode music on-the-fly, just for listening on Hero. Ill try 2Player, looks promising
u never heard of orb or sugersync or oh there are tooo many to list
Not really the same thing. SugarSync uses "personal cloud", so it's over internet and Gmote uses home network which is free, fast and local. No upload/download.
As far as I remember, Orb was for internet radio? Can't find it on AppBrain.
Anyway, 2Player works with Tversity as DLNA server. Music only. Good to know

Issue "seeking" though very long songs

Hi xda'ers
I couldn't really find another place to ask this so I thought I would try here.
When streaming music from Google music to the chrome cast I find that when the song is very long (say a live dj set mp3) and i seek somewhere to the middle all audio cuts out. Both the chromecast and the android devices both think they have buffered the new area of the song and say they are playing but no audio comes out. Furthermore if after I start a long song I wait 3-4 mins (enough time for the full 100-200MB mp3 to have fully buffered on the chromecast) then seeking works fine.
Is anyone else noticing this behavior? I also noticed that the same thing happened when streaming to the nexusQ but i ignored it because that was an unreleased product.
I have had trouble with podcasts. If GPlay Music loses the connection there's no way to reestablish it without losing my place in the podcast. However the third party app Remotecast seems to work for seeking even after having resumed a lost connection.
Sent from my Galaxy Nexus using Tapatalk 4

[Q] Did someone try the PLEX app with chromecast ?

All is said in title
Sent from my HTC Desire X using xda app-developers app
Yes. It works on my non-rooted chromecast. You need to have purchased a Plex pass subscription in order for it to work.
Movies & TV shows work well if they are burned to your computer & follow the correct naming scheme. Some Plex channels work & some don't. The only thing I haven't been able to stream to chromecast is pictures & slideshows. Otherwise, it has worked great.
What Plex channels worked for you? None of the ones I tried at random worked for me.
Overall it works fine for casting local content. The only issue is that the Plex app on my Android tablet disconnects from the Chromecast after a few minutes, and I have to reconnect it to get control back. I can reconnect without interrupting the video if I do it the right way. The Plex app doesn't disconnect from my Roku player, so it looks like the issue is on the Chromecast side.
DJames1 said:
What Plex channels worked for you? None of the ones I tried at random worked for me.
Overall it works fine for casting local content. The only issue is that the Plex app on my Android tablet disconnects from the Chromecast after a few minutes, and I have to reconnect it to get control back. I can reconnect without interrupting the video if I do it the right way. The Plex app doesn't disconnect from my Roku player, so it looks like the issue is on the Chromecast side.
Click to expand...
Click to collapse
There is a bug in the Plex Control protocol but it seems to be limited to the device that starts the stream as others seem to be able to jump onto the control and not have restart issues.
Try this and see if I'm correct there....
Next time you lose control, Force Kill the Plex App on your device, Then reload and select the CCast that is streaming.
You should resume control without seeing the Restart from scratch bug.
The loss of control may be CCast related but it may also be WiFi related. Any loss of connection on the device side (even switching bands) seems to disrupt the ability to control.
Plex Devs are aware there is an issue but right now all their CCast attention seems to be focused on the Transcoder and the Surround Sound Transcoding issue.
MediaBrowser will be adding Chromecast support soon.
www.mediabrowser3.com
MediaBrower Server can also act as a backend server for Plex
Asphyx said:
Next time you lose control, Force Kill the Plex App on your device, Then reload and select the CCast that is streaming.
You should resume control without seeing the Restart from scratch bug.
Click to expand...
Click to collapse
I don't have to do anything that drastic. I can simply reconnect to the Chromecast and resume control of the current Plex stream without interrupting it as long as I don't change the selection. That's why it's not a big deal.
DJames1 said:
I don't have to do anything that drastic. I can simply reconnect to the Chromecast and resume control of the current Plex stream without interrupting it as long as I don't change the selection. That's why it's not a big deal.
Click to expand...
Click to collapse
So your not seeing the Loss of Control, Reconnect and Restart from beginning bug?
I wonder if they fixed that in a recent update...Could be...
DJames1 said:
What Plex channels worked for you? None of the ones I tried at random worked for me.
Overall it works fine for casting local content. The only issue is that the Plex app on my Android tablet disconnects from the Chromecast after a few minutes, and I have to reconnect it to get control back. I can reconnect without interrupting the video if I do it the right way. The Plex app doesn't disconnect from my Roku player, so it looks like the issue is on the Chromecast side.
Click to expand...
Click to collapse
I am able to get Nickjr, That Daily Show, and The Colbert Report channels working. However, many others don't work.
Sucks that if your internet goes down that you can't stream local plex content to a chromecast. I was sad when I observed that. Maybe that'll be fixed in the future.
Sent from my Nexus 5 using xda app-developers app
Huh, you're right about that, just tried it. With no internet connection the Chromecast won't connect to Plex over the LAN and instead gives the cheery error message "Oops, shouldn't be here." Along with that other delightful message "Brain freeze!" that you get when Pandora doesn't work, it really helps give the impression of a mature, well-designed, user-friendly product. I'm expecting to see "Shucks, we done screwed up." any time now.
The real player cloud app works well. No $$ needed. And you don't have to upload anything. It'll play smoothly regardless. I'm sorry I spent money on plex to find out that I still needed a subscription
Sent from my SCH-I605 using xda app-developers app
You don't need Plex pass, just the Plex for android app is enough. It's released about 10 days ago. It works like a charm for me.
betizad said:
You don't need Plex pass, just the Plex for android app is enough. It's released about 10 days ago. It works like a charm for me.
Click to expand...
Click to collapse
That's not true. You do need the $3.99/month Plex Pass. The paid Plex for Android app alone is not enough. Perhaps you are referring to the special developer version that was temporarily linked here in this forum before being removed. That was not an officially sanctioned release.
As said above, you need to be PlexPass member. PlexPass members have access to the development Android app which is no extra cost. On a side note, I thought they brought back the life subscription.
More on topic, I have used the Chromecast with Plex. It works fine for me. I don't recall if I tried on my LAN that has the PMS. I have used it work and worked well; I bring a TV, use my smartphone for internet access and router, and a tablet to control plex (phone doesn't get an local IP).
Towards channels that work, I've tried Revision3 and worked fine.
The only issue I have encountered is that the resume feature for movies/tv shows doesn't work. I get the load screen. The load screen disappears, but no movie plays. The tablet doesn't show the movie playing either. Basically, you have to restart the movie, and then jump to where you left off. I've seen this issue before with the Android app, which was eventually fixed.
I haven't tried music or pictures.
This is how I get around the problem of Plex for Android disconnecting from the Chromecast while playing a video:
1. The problem:
I start the stream on the Chromecast from Plex on my Android tablet. Initially I can control it from the tablet. A few minutes later I check the tablet screen again, and I see that Plex has disconnected from the Chromecast and the playback controls have disappeared. If I reconnect to the Chromecast, the controls do not come back. If I back up to the previous screen and hit Play again, the video restarts from the beginning.
2. The solution:
When I reconnected to the Chromecast, I should have noticed a small Plex notification icon appear in the notification area at the bottom of the screen. If I click on that, it shows me that the Chromecast is currently playing a video, and I can tap the entry to reconnect to that video stream. The controls come back without interrupting the Chromecast.
It only stays connected for a few minutes before it disconnects again, but at least I can regain control at any time with a few clicks. It's a bit of a strange quirk, because this doesn't happen when I play a video remotely on my Roku using Plex on the tablet to control it (and BTW there's no extra cost or requirement for Plex Pass to play from the Android app to the Roku).
This always works reliably when I am playing a single video. I have seen problems though when I have played multiple videos in a row. In that case when I reconnect to the Chromecast it may suddenly flip back to a previous video and restart at the beginning of that stream before it gives me the chance to select the current stream from the notification icon.
Slightly OT but newsworthy....
Plex has released a PlexPass preview of PMS (0.9.9.0) that is said to fix the Surround Sound Transcoding issues.
Back to the topic at hand...
I'm sure there is a bug in the Plex Control Protocol...
Just about everyone has seen the problem you describe. And I think it is in the Player App that gets loaded to the CCast which they probably haven't looked at recently. Too busy on the Transcoding and PlexWeb stuff.
Why it loses the connection in the first place may not be Plex related just something that is related to Normal WiFi connections that Plex needs to compensate for in their app.
I don't have any info to back up this notion but I am betting that whatever dev team they have working on the Player App for the CCast side is busy working on Music and Picture support (and it's playlist requirements) and what we are using now is just a down and dirty Video Player since that is the Primary Media people stream from Plex and there are so many other options for playing Music available already (Like Google Music app)
Music will on it's own require an expansion and fleshing out of the Control protocol to enable things like Repeat, Shuffle, FF and REW as well as solving the problem of the CCast sending a signal to play next file in the Playlist. That should also solve the issue some are having with multipart videos not playing properly as well.
Works for me. You have to purchase a full subscription in order for it to work. Also make sure when you open the browser you refresh it after you turn or or wake your computer. Chromecast doesn't need to be rooted.
Sent from my SAMSUNG-SGH-I317 using xda premium
I pointed the Plex PC application to the folder on my hard drive where my local media content is stored and was subsequently able to use the plex android app to play these items on my chromecast but my question is how do I make sure that the chromecast is playing these media files via the local LAN and not using the internet to do it? i.e. I want to make sure its not using my internet cap space to stream when Ive already downloaded the files and have them on my PC.
kingofkings11 said:
I pointed the Plex PC application to the folder on my hard drive where my local media content is stored and was subsequently able to use the plex android app to play these items on my chromecast but my question is how do I make sure that the chromecast is playing these media files via the local LAN and not using the internet to do it? i.e. I want to make sure its not using my internet cap space to stream when Ive already downloaded the files and have them on my PC.
Click to expand...
Click to collapse
Try disconnecting your Internet connection while the video is playing then wait a while (at least a minute or two). If continues to play without Internet connection you can rest assured, it's not proxying the media through an external server.
If you disconnect before Plex launches on the Chromecast it may not launch because Chromecast won't be able to look at the Google whitelist.
bhiga said:
Try disconnecting your Internet connection while the video is playing then wait a while (at least a minute or two). If continues to play without Internet connection you can rest assured, it's not proxying the media through an external server.
If you disconnect before Plex launches on the Chromecast it may not launch because Chromecast won't be able to look at the Google whitelist.
Click to expand...
Click to collapse
I'm a newbie in all of this and curious to learn... Why is this necessary? When I'm home, my smartphone is connected to my home network via wifi. Couldn't he just make sure his smartphone is connected to his home network via wifi? If he disconnects, he will no longer be able to browse his collection on the PC and will have to reconnect to select a different movie, correct?

Local Media not playing well with Chromecast

I have looked around but haven't seen anyone talking about this issue so apologize if I missed something.
I am trying to play movies that I have on my phone. They are in the .MP4 format. I currently have tried Avia, LocalCast and AllCast (though I have not purchased the full version yet). I can start watching a video and it will play great and look great. Inevitably though it will start acting like it is buffering and then it will quite working at all. On top of this, the controls on my phone (HTC One rooted) will disappear. For instance, Avia controls will be in my status bar when I first start the movie but will soon disappear giving me no control over what is playing.
At first I thought it might be Greenify doing something but I don't have them greenified. I have tried a few different things to fix this issue but it just won't go away. Could this be a problem with the Chromecast or my phone or is there just something I am not doing correctly. I don't want to use plex or anything I have to upload and then stream from.
Appreciate the help.
srb7215 said:
I have looked around but haven't seen anyone talking about this issue so apologize if I missed something.
I am trying to play movies that I have on my phone. They are in the .MP4 format. I currently have tried Avia, LocalCast and AllCast (though I have not purchased the full version yet). I can start watching a video and it will play great and look great. Inevitably though it will start acting like it is buffering and then it will quite working at all. On top of this, the controls on my phone (HTC One rooted) will disappear. For instance, Avia controls will be in my status bar when I first start the movie but will soon disappear giving me no control over what is playing.
At first I thought it might be Greenify doing something but I don't have them greenified. I have tried a few different things to fix this issue but it just won't go away. Could this be a problem with the Chromecast or my phone or is there just something I am not doing correctly. I don't want to use plex or anything I have to upload and then stream from.
Appreciate the help.
Click to expand...
Click to collapse
Almost sounds like your network is encountering a loop, traffic storm, or increasing packet retries.
If your router has an STP (Spanning Tree Protocol) option, try toggling that.
Also try disabling WiFi Sleep in your phone (keeps WiFi connected even when phone goes to sleep).
It could also be his device is running out of steam (overheating and therefore the OS throttles the Clock down especially true when heavy radio use like constant WiFi causes excessive heat in the unit), Starts doing some Background tasks that take priority or is generally going into a lower power state after awhile of no activity.
People need to understand while it may seem convenient to stream files off your phone or tablet they are not built for such activities.
They are meant as media consumers and not much more than that.
Too much going on inside them and Manufacturers put an extreme emphasis on saving power in all of their drivers that makes the devices just not suited to doing a long duration activity without user interaction.
Between the screen going off, WiFi going to sleep, Unit going into deep sleep mode and constant monopolizing of the Network and radios when the Device has a Pull task scheduled like getting Email....It is really not the ideal device to stream media from.
Since most media servers available today support remote (Home Cloud) streaming to a variety of devices and can transcode on the fly there is no longer any reason to store media on your device unless you have no network access at all. And in those cases the CCast won't work anyway because it needs to be able to load the player apps from the internet. Many of those same media servers also support some sort of local sync so you can store and play media locally on that mobile device when network is not available.
We need to start changing the way we think about storing and using media for Mobile...
Thanks for the advice and I will keep exploring. I have WiFi sleep disabled already.
It very well might be the device. I tried using my Touchpad and it didn't seem to run into any problems although I haven't used it enough to be sure it wasn't going to run into the same issues.
What is happening just seems like odd behavior. Like I don't understand why Avia would lose the player controls in my status bar after such a short time.
Maybe I need to think about a media server instead. Though one of the things that made me interested in the Chromecast was the portability of playing movies on large screens.
Again thanks for the response and if anyone else has any idea, I would love to hear it.
you could try y2cast from google play store, it is easy to use.
I'm getting a similar issue when try to cast Pandora. It runs fine on the tablet but won't run on the chromecast, seems like it tries but doesn't make it.

Categories

Resources