How software update works in VLC media player - vlc

I am interested to know the what are the major steps involving in the software update process in VLC player. Also I'm interested to know, whether it will be done through the HTTP or FTP server.

The VLC player's updating steps are as follows.
VLC player or any applications sends HTTP "POST" to the server which replies
the URL of the update file if the update present.
Then VLC player downloads the update file using HTTP "GET" method.
This process also includes the check sum verification of the file.

Related

How to load my local mpd(mpeg-dash) file to online players?

I am trying to use some online players to test my local mpd file, but it could't be loaded as 'file:///path-to-file' form like local urls, what's the correct format to load the file? Or should I upload it online or so?
DASH is designed to be streamed from a server so the player will be expecting to send requests for the mpd and for each media chunk to a server which will respond with the mpd or corresponding chunk.
The mpd is the 'index file' or manifest for the individual video and audio streams.
If you want to test locally then this is definitely possible and the easiest way is to set up a local test server and stream from there. You will need to create the mpd and the chunked media streams and make them available on your server, but it sounds like you have already these created.
You can then point your test player to your local server. Remember to ensure the server serves the streams using HTTPS as this is required by most players and browsers now.
There are a good set of step by step instructions available from Mozilla: https://developer.mozilla.org/en-US/docs/Web/Media/DASH_Adaptive_Streaming_for_HTML_5_Video

How to find out what my live stream URL is?

I am trying to stream from obs or similar to maybe restream, but I also want to send the feed to a custom RTMP player on my site, it's asking for the Live Streaming URL. How can I find that?
I believe obs asks you to connect to a streaming platform (I think this is what you meant by "restream"). Depending on the platform you are streaming to (Twitch, Youtube, etc), then you would need to get the URL from that site. Connect to one of these first and it should give you a URL. I think YouTube requires 24 hours to enable live streaming.
If you can stream directly to your website I am not aware of it. Reason being, in most cases you have a dynamic IP or port that is not open for your website to view the original stream from your Obs software/computer.

Is it possible to send file through actioncable ? If possible, how?

I already implemented the chat function using actioncable but don't know how to send file through it or is it even possible or not.
I am trying to make chat application where user can upload file in chatroom other users can see that immediately without reloading the page as actioncable offers.
It's possible to upload files using websockets. (File upload using java websocket API and Javascript)
But through ActionCable that's not possible at the moment. As ActionCable wraps the Websocket in Javascript this is also going to be "hacky" to patch this in, so I would wait for a new release and write an issue on the rails repo instead.
So for your chat app you still need to use a normal form submit to upload a file. If you want it to happen asynchronously you can use my "patched" version of jquery-ujs which allows sending files with the "data-remote=true" flag.
See https://github.com/Elektron1c97/jquery-ujs-files
It's possible by transforming your file into a base64 data url on the client via some js then to send this url thru actioncable to the server who's gonna broadcast just a base64 data url.
I have test it with image, audio and video files. Not with pdf or txt but it should work. For big file like a video it's instable.
It's just experimental.
VoilĂ .

Response header from AVPlayer

I have a special use case where I need to track a response header from AVPlayer while it is streaming an HLS playlist.
I searched in the internet and read the AVPlayer documentation and did not find any specific way to get this. I know that there is a way to get the HTTP response headers from the request made by the app but I could not find anything to get the response header for the requests made by the AVPlayer.
I spent weeks looking for a way to do this for both requests and responses for the playlist and chunk requests. The only way I was able to find that worked was by passing the playback request through a reverse proxy on the device. This allows you to intercept the request, add headers, send it to the real server, and then extract the headers from the response before returning it to the AVPlayer.
I made a simple example project (with lots of comments and documentation) here:
https://github.com/kevinjameshunt/AVPlayer-HTTP-Headers-Example

How to I access a SoundCloud public stream?

How do I play a track from a SoundCloud URL, which, for example, I got from the xml response from a query
<stream-url>https://api.soundcloud.com/tracks/31164607/stream</stream-url>
I should have thought that it would have been as easy as:
https://api.soundcloud.com/tracks/31164607/stream&client_id=my_client_id
yet I get
<error>401 - Unauthorized</error>
All I want to do is consume it in a Silverlight MediaElement, so all I need is set some url to the MediaElement's Source property.
I've checked an application that I wrote about 2 years ago, and THEN, accessing the stream url was as easy as this for a public track:
http://api.soundcloud.com/tracks/18163056/stream&consumer_key=MY_CONSUMER_KEY
however this no longer seems to work.
For example, all I had to do then in C# was:
MediaElement me = new MediaElement();
me.Source= new Url("http://api.soundcloud.com/tracks/18163056/stream&consumer_key=MY_CONSUMER_KEY");
me.Play();
Any hints would be appreciated.
I had a reply on a Microsoft forum that seems to imply that SoundCloud might not be possible to stream to Windows 8 Metro devices without consuming the whole stream before playback starts - which is quite worrying and would seem to imply that to make authentication possible, it would have to be done entirely in the url querystring insterad of using the header:
(The following reply is the answer to the following question: 'I am able to access an audio stream by http using the MediaElement, however I need to access it via https in which I need to add the oAuth info to the header of the initial request.
How is this done when using a MediaElement, and if it cannot be done, what is the workaround for consuming an audio feed in Metro 8 that requires header authentication to stream?')
"Direct access to the underlying network stream is not currently permitted by the MediaElement. Because of this there is currently no way to modify the header of the HTTP request to include any additional authentication information. That said, you do have control over the URL. You could theoretically setup an HTTP proxy service that translated the HTTP GET request parameters into the necessary oAuth credentials. Keep in mind that this is just a theoretical workaround. You may find different behavior in practice. Another theoretical workaround would be to handle the oAuth yourself via a raw stream socket and pass the retuned media data to the MediaElement via "Set Source" and a "Random Access Stream". Please keep in mind that this method has major limitations. in order to use a "Random Access Stream" with the ME you need to make sure all of the data is available before passing it to the ME."
The proxy service is not scalable for an application that is merely distributed for free as every stream would need to come via the proxy. And the raw stream socket, although getting around this, would mean that playback could not start until the whole file had downloaded - and this goes against all current UX (User Experience) guidelines.
So once again, if anyone has any tips, or info about how the whole authentication thing can be achieved in a querystring instead of using headers, I'd appreciate it!
I'm a little confused about whether you're referring to a public or a private track? If it's a public track, then you shouldn't need to send any authentication information, just your client id.
When I request https://api.soundcloud.com/tracks/31164607/stream?client_id=YOUR_CLIENT_ID then I get a 302 redirect to the proper mp3 stream.
Remember, adding parameters to a URL must start with a ? not &. This could (more than likely) be the reason why you are getting a 401 (SC is not picking up the client_id).
After authentication the link like this
http://api.soundcloud.com/tracks/103229681/stream?consumer_key=d61f17a08f86bfb1dea28539908bc9bf
is working fine. I am using Action Script.
I'm following up on Tom's reply because he calls attention to url character specificity. My HTTP requests randomly started failing today, and I was prefacing my client_Id with a ?. As soon as I changed that single ? to &, it started working. So in my case, SC wasn't picking up my client_Id because I used the wrong character. I think depending on where in the request we're talking about specifically, it's worth noting that differences between ? and & do make a difference.

Resources