Audio/video stream recording forums
|
Attention Visitor: |
You may have to register or log in before you can post:
|
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Flazr - open source RTMP stream saveri found a new program called flazr
I don't know how to use that. maybe you can help. it is not a user-friendly software. flazr is more for programmers than for regular users. Quote:
|
#2
|
|||
|
|||
Re: Flazr - open source RTMP stream saverScript for downloading videos from Yahoo ! Music with flazr
This is an example of how you can easily write a script to request an HTML page (or XML data in this case), parse the contents and extract the values needed to invoke the main RTMP client / download routine Code:
import com.flazr.* def videoId = "201620741" def url = "http://video.music.yahoo.com/ver/268.0/process/getPlaylistFOP.php?node_id=v" \ + videoId + "&tech=flash&bitrate=5000&eventid=1301797"; def xml = Utils.getOverHttp(url) println xml def data = new XmlSlurper().parseText(xml) def stream = data.'SEQUENCE-ITEM'[1].STREAM def tcUrl = stream.@APP.text() def host = stream.@SERVER.text() def queryString = stream.@QUERYSTRING.text() def path = stream.@PATH.text().substring(1) def app = tcUrl.substring(tcUrl.lastIndexOf('/') + 1) def playParam = path.substring(0, path.lastIndexOf('.')) + '?' + queryString println 'queryString: ' + queryString + '\n' println 'path: ' + path + '\n' println 'playParam: ' + playParam + '\n' println 'app: ' + app + '\n' def session = new RtmpSession(host, 1935, app, playParam, 'test.flv') RtmpClient.connect session |
#3
|
|||
|
|||
Re: Flazr - open source RTMP stream saverScript for downloading videos from Yahoo ! Music with flazr
this is an example of how you can customize the low-level details of things like the handshake and pass values that the server is expecting Code:
import com.flazr.* def videoId = "201620741" def url = "http://video.music.yahoo.com/ver/268.0/process/getPlaylistFOP.php?node_id=v" \ + videoId + "&tech=flash&bitrate=58&mode=&lg=Lox6nE093DOEBHJ_XTuPaP&vidH=326&vidW=576&rd=new.music.yahoo.com&lang=us&tf=controls&eventid=1301797&tk="; def xml = Utils.getOverHttp(url) println xml def data = new XmlSlurper().parseText(xml) def stream = data.'SEQUENCE-ITEM'[1].STREAM def tcUrl = stream.@APP.text() def host = stream.@SERVER.text() def queryString = stream.@QUERYSTRING.text() def path = stream.@PATH.text().substring(1) def app = tcUrl.substring(tcUrl.lastIndexOf('/') + 1) def playParam = path.substring(0, path.lastIndexOf('.')) + '?' + queryString println 'tcUrl: ' + tcUrl println 'queryString: ' + queryString println 'path: ' + path println 'playParam: ' + playParam println 'app: ' + app def mysession = new RtmpSession(host, 1935, app, playParam, 'test.flv') params = mysession.connectParams params.flashVer = 'WIN 10,0,12,36' params.swfUrl = 'http://d.yimg.com/cosmos.bcst.yahoo.com/ver/268.0/embedflv/swf/fop.swf' params.tcUrl = tcUrl params.pageUrl = 'http://new.music.yahoo.com/videos/Beyonc/Single-Ladies-(Put-A-Ring-On-It)--201620741' params.audioCodecs = 3191 params.remove 'objectEncoding' println params def handler = { Object[] args -> invoke = args[0]; session = args[1]; resultFor = session.resultFor(invoke) switch (resultFor) { case "connect": packet = Packet.serverBw(0x2625A0) packet.header.time = 2436539 session.send packet session.send new Invoke("createStream", 3) break case "createStream": streamId = invoke.lastArgAsInt println 'using streamId: ' + streamId session.send Packet.ping(3, 1, 0) play = new Invoke(streamId, "play", 8, null, playParam) play.time = 2335 session.send play break default: println "not handling result for: " + resultFor } } as InvokeResultHandler mysession.invokeResultHandler = handler RtmpClient.connect mysession |
#4
|
|||
|
|||
Re: Flazr - open source RTMP stream saverScript for downloading from oxy.videolectures.net with flazr
this is the simplest example, if you know the host and the values for the "app" and "play" params you can use this Code:
import com.flazr.* def host = 'oxy.videolectures.net' def app = 'video' def playParam = '2008/active/iswc08_karlsruhe/swcbtc/iswc08_swcbtc_01' def saveAs = 'test.flv' def session = new RtmpSession(host, 1935, app, playParam, saveAs) RtmpClient.connect session |
#5
|
|||
|
|||
Re: Flazr - open source RTMP stream saverWere the def url and other variables taken from within a Wireshark capture as I have seen the basic scripts do? Would you be able to give any advice on making this reusable? Could an html page hypothetically be created to pass the url through and have the script auto generated?
Thanks in advance! Matt Quote:
|
#6
|
|||
|
|||
Re: Flazr - open source RTMP stream saverQuote:
These groovy scripts are reusable, but they hardly can be created without some programming skills. IMHO the approach should be different. It should be similar to Replay Media Catcher. The RTMP URL should be sniffed first and then the RTMP downloader should start downloading the RTMP stream automatically. |
#7
|
|||
|
|||
Re: Flazr - open source RTMP stream saverThanks for your response, I agree that the Replay Media Catcher is great at sniffing the RTMP URL. One item that got me pondering was the included groovy script for yahoo. Was this video RTMP or RTMPE? I ask because I saw no traffic through Wireshark when filtering RTMPT and also didnt notice any RTMPE url within the pages source. Does the swf verification pass the connection through regular HTTP protocol?
Quote:
|
#8
|
|||
|
|||
Re: Flazr - open source RTMP stream saverI've downloaded the trunk of the latest version with RTMPE support but I'm getting hung up on operating as I did with the .5 release (i.e can you still call the batch file and use the same groovy scripts?) Ive attempted passing along a RTMPE url and save location but failed to actually download. I know there are different ways to call the command:
Code:
(String host, int port, String app, String playName, String saveAsFileName) (String host, int port, String app, String playName, String saveAsFileName, boolean encrypted) (String url, String saveAsFileName) |
#9
|
|||
|
|||
Re: Flazr - open source RTMP stream saverQuote:
Yahoo ! Music uses RTMP protocol, so you should filter for RTMP, not for RTMPT or RTMPE. Most probably yes, but Yahoo ! Music doesn't use SWF verification. |
Tags: download, download rtmp, downloader, flazr, flv, groovy, open source, rtmp, rtmp downloader |
Thread Tools | |
Display Modes | |
|
|