Is it possible to set a destination for streaming audio?

GuyBooth

Active Member
Licensed User
Longtime User
Looking at the MediaPlayerStream it appears I can stream from a specified source to the device that is running my program, but I would like to be able to stream instead to a media box - in other words use my Android device to control the stream, but not necessarily be the recipient.
Is there a way to do this?
 

kanaida

Active Member
Licensed User
Longtime User
Just a guess here, but passing the stream sounds litterally just as it sounds. I'd figure out the ports/protocol that works, maybe it's already in the format needed. Then send the bytes to the destination ip address as they stream in. Probably via UDP packets, but not sure 100%. There might have to be some negotiation prior to that as well like handshaking your target device. Protocol documentation reading would help you out quite a bit.

If i'm not mistaken, typically the 3rd device requests the stream, connects to a server and the server sends it the data. So it may actually be easier than you think. It may just be something like passing a URL to the 3rd device telling it to stream from there, then the device connects on it's own to the stream, bypassing your android device all together. It's how i'd go about it, if possible.

Something like this i'm guessing:
codejugglers - VLC Remote/Stream
 
Upvote 0

GuyBooth

Active Member
Licensed User
Longtime User
Kanaida I really appreciate your input ... so sad that because of my limited understanding I find I understand very little of what you have said!
So I must take this one piece at a time. I have been able to stream from a local folder on my S3 to my S3 applicatoin. This works fine, doesn't require ports, passwords etc., just

B4X:
url = "/mnt/sdcard/Music/TrackFile.mp3"
MPS.Load(URL)

So next step - how do I request a stream from my local Server, which does require a logon name and password? The basic request I know should be something like:

B4X:
URL = "\\ServerName\\Music\TrackFile.mp3"
MPS.Load(URL)

But how do I add the user/password? And would I need to do this for every track loaded, or can it be done for a "session"?
 
Upvote 0

GuyBooth

Active Member
Licensed User
Longtime User
The media box I'm using is a WDTV, or could also be an AppleTV.
My media server is a Synology Diskstation.

There is an app that does some of what I want, published I believe by Synology themselves. When I open it it gives me a list of all the media devices on my network (including my S3). I can then choose the destination.

The problem with the app is that its interface is missing some vital pieces (no reference to composers, Orchestras, for example) so I want to adapt my own front end.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…