How to find the stream behind a Flash player

45

29

I am watching a Flash stream. I can watch the same stream in two different players (set up by someone else), but I don't like any of them.

Is there a way I can find/get/extract the direct link to the flash stream that those two players are playing? So that I can watch it using a different player?

Edit: The player is streaming an RTMP stream, not an FLV video file.

Svish

Posted 2010-02-27T11:14:16.910

Reputation: 27 731

I am confused that you have selected as definitive answer one that says to download the file. If that is done, it can be played with many players (what the question asks), and that offline, without the need for the URL! I am sure that all the interest and up-voting of the question comes from the how to find the real URL part, which makes sense only if the download part is left aside, although, as in my answer below, the easy way to see the URL is with a tool which is aimed at downloading. – None – 2014-09-22T12:32:35.960

1@cipricus: You wouldn't downloadthe actual video, but the SWF to then decompile and get the stream URL. Regarding your confusion, I recommend that you start looking at timestamps if you find accepted answers that look a bit weird. In this case the answer I accepted was the one that gave me what I wanted shortly after I asked the question. Most alternatives were posted long after, and in your case over 4 years after. I'm leaving it as it is since it'll probably still be correct and the answer most "raw". If I did it now, I'd probably use the Firebug version. – Svish – 2014-09-22T18:55:31.070

Maybe useful: I noticed that the author of the answer on Firebug had used the word 'sometimes' not without reason: I found streams that neither Chrome nor Firebug were displaying the URL thereof, at least not where the answer points to look --, but that DownloadHelper was able to... etc – None – 2014-09-23T12:14:58.587

2

You should be able to packetsniff it with wireshark(http://www.wireshark.org/download.html), but I'm sure there must be an easier way.

On the other hand, wireshark is a great tool to have installed anyways.

– Fake Name – 2010-02-27T11:33:59.407

1Yeah, I have the feeling it is too, I just haven't been able to figure out how to use it. – Svish – 2010-02-27T11:36:15.377

See "Download flv file from any video site?" at http://superuser.com/questions/41394/download-flv-file-from-any-video-site

– Arjan – 2010-02-27T12:20:57.080

@Arjan: That works when there is an FLV file that is played. Not when it is an RTMP stream (as far as I know anyways). – Svish – 2010-02-27T12:40:45.550

To get the URL, I guess it doesn't matter if it's a stream or not. But indeed, maybe I was too quick by voting to close. Cannot undo that though; hoping others won't vote if this is indeed different. – Arjan – 2010-02-27T13:01:04.690

i don't have enough rep to answer this question but if you're looking at a .swf hosted on a specific livestreaming platform (say douyu.com), you can use the streamlink command line tool. provide the channel url and use the json output (-j) option to get the available urls for the .swf object on that page. ex: streamlink https://www.douyu.com/AMYL -j. this way you can easily automate the url capture process.

– A__ – 2018-04-06T18:37:35.043

Answers

8

Download and decompile the flash file. The source of the stream should be pretty easy to find.

It's possible that the player is generic, and the file/stream it is playing is being passed in as a param. Grep the webpage source code for "embed"/"swf" or text that's near the flash object on the page. Then look at the contents of "param name"/"param value"

RJFalconer

Posted 2010-02-27T11:14:16.910

Reputation: 9 791

I only have the swf. There is no script or anything like that. How do you decompile a flash file? – Svish – 2010-02-27T11:59:22.327

3

I would recommend http://www.showmycode.com/ which is online swf decompiler as it is safer than installing any of the programs from the previous comment's search: "decompile swf".

– Dan D. – 2012-04-28T07:26:12.797

3Decompiling the SWF is probably the hardest way to do this. Simply opening up Wireshark reveals everything. – Brad – 2013-05-18T14:59:43.090

30

Firebug for Firefox, and the Google Chrome Developer Tools (built-in to Chrome) can show every HTTP request performed by the browser. They sometimes reveal URLs such as these.

In Firefox, install Firebug (no restart), start the addon by clicking the bug icon (use customize to make it visible - but it should be by default), start the stream, and in the Firebug window click Net tab and then All, maybe refresh the video page. The url should appear when putting the mouse over the line that says something like "GET video", right click on the URL and Copy location.

enter image description here

In Chrome, open the Developer tools, check the Network tab and start playing the file.

Simon East

Posted 2010-02-27T11:14:16.910

Reputation: 2 414

1how to use Firebug to see the URL? – None – 2014-09-22T12:33:55.480

got it and added the details with image for Firebug – None – 2014-09-22T12:50:05.877

10The Network tab in google chrome developer tools doesn't support non-http protocols (at least not rtmp) – dvb – 2012-11-26T14:10:05.930

@dvb thats true, i also faced the same – Rat-a-tat-a-tat Ratatouille – 2014-03-21T08:09:21.880

6

Fiddler2 is a great tool for this. Think of it like Wireshark but for HTTP specifically. It will reveal exactly what your browser is doing. It works by setting itself up as a local HTTP proxy. Point your browser to it and it will reveal all of the connections that are made and what data is transmitted.

Segfault

Posted 2010-02-27T11:14:16.910

Reputation: 413

4

As seen from the many answers there must be many ways to do this, but maybe one of the easiest way to go is to take advantage of a Firefox addon like DownloadHelper addon, which has also the advantage of being available on all OSes.

  • Install the Firefox addon DownloadHelper,
  • run the flash stream in Firefox, the DownloadHelper button should start rolling,

(There are different ways to access this feature, but I will mention one that is clearly accessible no matter the configuration, as the addon has settings to hide or show buttons and options)

  • Go to Tools > Video Download Helper (or find is otherwise) > All Actions > [Name of video] > Copy URL.

enter image description here


Some troubleshooting.

Testing such links with VLC I notice that in some cases the player cannot play them or even crashes. But this can be fixed as follows:

The last part of such URLs is something like /video.flv?start=0. Changing that to /video.flv? might make it work.

I discovered this when using the other solution, presented below, Internet Download Manager, in order to capture a such video stream: it displays the link but when trying to select it by clicking on it, IDM selects the URL without the last part start=0 (as seen in the image below). But many URLs can be opened in VLC with that last part too.


In Windows, Internet Download Manager is able to sniff such streams and capture them. Again, I find it easier to use in combination with a Firefox addon, FlashGot, but IDM can also be used alone with any browser. When ready to get the video, IDM displays the URL:

enter image description here


Considering the edit:

"Edit: The player is streaming an RTMP stream, not an FLV video file."

RTMP (Real Time Messaging Protocol) uses either FLV or MP4 as video format.


user162573

Posted 2010-02-27T11:14:16.910

Reputation:

1

URL Snooper or the "Grab++" module of Orbit Download Manager (be carefull for unwanted adware at install) could help you to analyze the network traffic and find the URL

fluxtendu

Posted 2010-02-27T11:14:16.910

Reputation: 6 701

1

I would recommend this extension for Chrome, Grab Any Media.

It's translated into English, Italian, French, German, Portuguese (click the language flags on the right).

Leonardo

Posted 2010-02-27T11:14:16.910

Reputation: 11

3What is it? What does it do? None of the page appears to be in English – Simon Sheehan – 2011-10-29T19:24:19.393

1@Simon There are some flags which toggle a crappy automatic translation. – slhck – 2011-10-30T15:41:27.877

@slhck thanks, they were somewhat hard to find :P – Simon Sheehan – 2011-10-30T15:46:21.443

0

If you 're not necessarily needing it as a stream in real time, you can use DonwloadHelper for Firefox. It lets you store the file behind the stream of offline viewing or viewing with any program you like.

Nicholaz

Posted 2010-02-27T11:14:16.910

Reputation: 1 479

@Svish - I guess there is a file behind it. What do you think after all these years? :) – None – 2014-09-22T12:10:25.720

@Svish - What I do not understand is that you have selected as definitive answer one that says to download the file. If that is done, it can be played with many players offline without the need for the URL! I am sure that all the interest and up-voting of the question comes from the how to find the real URL part, which makes sense only if the download part is put aside. – None – 2014-09-22T12:18:36.003

Well, in this case it is a stream and I don't think there is a file behind it. It is real-time streaming. And I need to watch it in real-time too. – Svish – 2010-02-27T12:00:23.243