Capturing Video Content from Flash Based Players Online w/python
#1
Question 
Hi, I'm new to python scripting but not to programming. I want to create a simple application to request a website via HTTP GET and then be able to play a flash based movie player and grab the video stream from the flash movie playing in the swf player on this website. I have wireshark and have investigated the data transfers between my host computer and the website, but all I see is TCP protocols of data coming from the video site to my computer. I assume this is the video data since it was playing while I was capturing while i was playing the video.

I'm clueless on where to begin making such a script that can request the data from the online flash player, i can understand simple HTTP GET requests or POST requests to webpages, but to play and grab content from online flash players I am clueless. I'm asking anyone's advice on how to do such a task via Python or any other suitable programming language that works with XBMC.
My overall goal is to be able to type a url to a video file, push a button on my xbox and then have it play the stream with XBMC's media player. I'm willing to learn whatever language I need to get this done, whether it by python or any other language you recommend in doing this.

The easy way to capture the stream from an online flash video site is to simply parse the sourcecode from the url and find the flv file, but most sites don't reveal the flv direct video link in the source, and its dynamic. I'd rather like to have a way to directly grab the stream from the swf player.

I'd appreciate some advice for what language to program this in, and what functions/methodology to execute this in that language, and ultimately on the XBOX.

Thanks for reading.

Here's of an example video stream i'd like to grab and play from an online flash video site:
http://www.tudou.com/programs/view/hW0s3K4cnRw/
Reply
#2
anyone?
Reply
#3
You might want to start by reading through this topic-thread about BBC iPlayer:
http://forum.xbmc.org/showthread.php?tid=27063
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#4
I'll check it out.. how do you make the order of the posts in the thread be latest on bottom, earliest on top? The order of the posts is really confusing to me.
Reply
#5
Ok I looked at that thread, but this doesn't really answer my question. Could anyone answer it?

If you don't understand a part about what I'm asking, ask which part and I'll further explain, other than that I don't think I can explain my question any further, its pretty self explanatory.
Reply
#6
I've seen a bunch of web-based tools to rip the video streams from flash players, and also a couple xbmc plugins (youtube, powerflv). All of these that I have seen only work one of these ways:
1. Access via defined API
2. Use some trick or special algorithm to grab the direct link after parsing through some data, each flash video site requires a different algorithm.

The problem is it is especially time consuming to do #2 and it relies on certain data not changing, which of course something on the flash video site is bound to change. Thus, it makes your customized algorithm to grab the video stream useless when small things change and/or the website takes measures against the vulnerability used in the algorithm.

Rather, what would be better and more universal and easier to continue to add new flash video sources, is to sniff the video url from the swf itself. The swf is like a script itself and GETS the flv url, the only way to find this out is too sniff it out from the network, while the swf is running or has been allowed to boot up and therefore load the video. This is an easy task on a PC because swf's can run in your browser, and then you can sniff while the run to find out the video stream urls.
HOWEVER, there is no swf support on the xbox so you can't monitor something that never starts. If someone could develop a swf booter, not necessarily one that has all the capabilites and features of flash on the PC, but just enough for it to boot up and make its remote requests for video streams. That would be enough to sniff out the video stream url and then this way dynamically be able to sniff a flv file from any swf url.

I'd like to work with anyone to develop something like this for the xbox. Imagine then, all you need is the swf url and you can simply sniff the video streams right out, making it ludicrously simple to add new streams and websites..etc..
Reply

Logout Mark Read Team Forum Stats Members Help
Capturing Video Content from Flash Based Players Online w/python0