I am listening to a radio stream (flash content in a browser). I want to play this stream directly with mplayer or the like.

Doing lsof -ni shows me these two lines (among others):

plugin-co 13248 erik   16u  IPv4 5256160      0t0  TCP> (ESTABLISHED)
plugin-co 13248 erik   17u  IPv4 4956101      0t0  TCP> (CLOSE_WAIT)

where I suppose the line with macromedia-fcs shows the connection to the stream.

How can I get the URL of the stream? Or is it enough to get the exact network address with port number to play the content with mplayer?

  • You can decompile the flash, and see the address of station. Works sometimes to me. – Jose Carlos Sep 1 '14 at 12:43

The way I have found is to inspect the data stream in the browser itself using browser developer tools. In Chrome, launch the developer tools, then click on the network tab. Then navigate to the page containing the stream. The stream will appear in the network tab - you may have to scroll up or down to find it but it will be the resource that is constantly moving over time.

  • This is a possible method I’ve used already. But if I want to automatize it, I do have to know how to get the URL or the data stream that comes into my computer with linux tools. – erik Feb 21 '15 at 17:32
  • OK, you should've mentioned in the original post that you want to automatize it. – phk Oct 15 '15 at 22:50

If we are talking about plain, not encrypted traffic, I often see this kind of URLs simply sniffing the connection.

I usually use this command (you might have to change the port or the http string):

sudo ngrep "http" "port 80" 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.