Audio/video stream recording forums

Attention Visitor:
You may have to register or log in before you can post:
  • Click the register link to sign up.
  • Registered members please fill in the form below and click the "Log in" button.
To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Audio/video stream recording forums > Streaming media recording forum > rtmpdump
Register FAQ Members List Calendar Mark Forums Read

Reply Post New Thread
 
Thread Tools Display Modes
  #1  
Old 01-26-2011, 02:10 AM
srpenn82 srpenn82 is offline
Banned
 
Join Date: Dec 2010
Posts: 29
srpenn82 is on a distinguished road
Default

How to use rtmpsrv in Windows


How to use rtmpsrv in Windows
Quote:
Originally Posted by srpenn82.blogspot.com/2011/02/rtmpsrv.html
  1. put grep.exe and sed.exe into the same folder as rtmpdump.exe
  2. Find the Host
    1. Windows Task Manager
      right click plugin-container.exe > Create Dump File
    2. get host
      Code:
      grep -Pao rtmp.{40} plugin-container.DMP | sort -u
  3. start monitoring
    Code:
    rtmpsrv > rtmpsrv.txt
  4. edit hosts file
    Code:
    cd C:\Windows\System32\drivers\etc & sed s/#// hosts > tmp & mv tmp hosts
  5. start the audio/video stream
  6. after rtmpsrv captures the parameters kill the processes
    Code:
    taskkill /im plugin-container.exe /im rtmpsrv.exe /f
  7. restore hosts file
    Code:
    cd C:\Windows\System32\drivers\etc & sed "s/^/#/" hosts > tmp & mv tmp hosts
  8. the command to download the video will be in the text file
    Code:
    rtmpdump --verbose --flv output.flv  
    --swfVfy  http://www.hulu.com/player.swf --rtmp  
    rtmpe://hulufs.fplive.net --app   
    "hulu/593/50111593?sessionid=0BFAD9DD35D19ED8B6CB274534A8BFE3&token=c3RhcnRfdGltZT0yMDExMDEyNjA3NTEzMCZlbmRfdGltZT0yMDExMDEyNjA3NTQzMCZkaWdlc3Q9NDllOWMwNWQzODlhN2E0M2ZmMTZjNzM4ZGFjMTY4YTY=&mbr=1&hgt=OZU7Pvs7j27-nhteNno7wh2rW2KI7E9RRATmcsvy_NF5xCHAoM7C8u_J91OZBxBR9DnvqD7raxmXD1j6B_Vd8D0KoHAe6m0_yAr8olsIPsaw9xk756zhNlD5YwyJ2Sp_1zr6BoZJszElO98gvx-Fiaas94sNlr65RihN6nJmzBAJKF6_xuXsDvJlBGskVLT5pKYys4g8MS46syG8YG_N81peD_6dR_Y1YdXHPWg6q6fT7Tt8ycDp7ogMw0xHWRwTRQcpP6y_lXKjoQYOXIYIrg==&hgt_ver=331370278"
      --playpath mp4:agave50111593_4261809_H264_1000.mp4
rtmpdump might not work if BitTorrent is running. with Hulu you have 3 minutes to make a connection with rtmpdump after the video has started
Reply With Quote
  #2  
Old 04-14-2011, 02:50 AM
Stream Recorder
 
Posts: n/a
Default

Re: How to use rtmpsrv in Windows


I don't really understand how it works. May be that's because I know nothing about grep and sed.

Why do we need to get a host with grep from the plugin_container if we use rtmpsrv > rtmpsrv.txt? And where do we use the host value?

Also I don't understand how the following works for changing the hosts file.
Code:
cd C:\Windows\System32\drivers\etc & sed s/#// hosts > tmp & mv tmp hosts
cd C:\Windows\System32\drivers\etc & sed "s/^/#/" hosts > tmp & mv tmp hosts
Where are the values that are added into the hosts file and how they are removed?
Reply With Quote
  #3  
Old 04-14-2011, 03:27 AM
placebo placebo is offline
Moderator - exTerminator
 
Join Date: Aug 2010
Posts: 477
placebo is on a distinguished road
Default

Re: How to use rtmpsrv in Windows


rtmpsrv is an integral part of rtmpexplorer. and RTMPexplorer is even easier to use than the instructions here.

So if someone wants to use rtmpsrv in Windows, i would suggest taking rtmpexplorer for that purpose OR do it in the original way: manually editing the hosts file.
Reply With Quote
  #4  
Old 04-14-2011, 04:35 AM
Stream Recorder
 
Posts: n/a
Default

Re: How to use rtmpsrv in Windows


Quote:
Originally Posted by placebo View Post
rtmpsrv is an integral part of rtmpexplorer. and RTMPexplorer is even easier to use than the instructions here.

So if someone wants to use rtmpsrv in Windows, i would suggest taking rtmpexplorer for that purpose OR do it in the original way: manually editing the hosts file.
This is absolutely true, but I'm interested in learning how to use sed, grep, regular expressions, ...
Reply With Quote
  #5  
Old 04-14-2011, 07:35 AM
placebo placebo is offline
Moderator - exTerminator
 
Join Date: Aug 2010
Posts: 477
placebo is on a distinguished road
Default

Re: How to use rtmpsrv in Windows


ok, i see. you want to learn. learning new things is always good, i guess. ok then. i want to learn it too.

so where is Steven?
Reply With Quote
  #6  
Old 04-14-2011, 10:47 AM
srpenn82 srpenn82 is offline
Banned
 
Join Date: Dec 2010
Posts: 29
srpenn82 is on a distinguished road
Default

Re: How to use rtmpsrv in Windows


on windows you cannot just use rtmpsrv by itself. you have to:
1. modify the hosts file
2. start rtmpsrv
3. start video
4. restore host file
5. download video with rtmpdump

steps 1 and 4 can be done many different ways.

method 1
modify:
open hosts in notepad and set it to something like this
127.0.0.1 cp27886.edgefcs.net

restore:
open hosts in notepad and just delete everything

method 2
uncomment the hosts file, for use with running rtmpsrv and getting rtmpdump parameters
cd C:\Windows\System32\drivers\etc & sed s/#// hosts > tmp & mv tmp hosts

this command opens the hosts file, replace comment symbol "#" with nothing, saves to a temp file, then replaces the original host file with the temp file

comment the hosts file, for use with actually downloading the file with rtmpdump
cd C:\Windows\System32\drivers\etc & sed "s/^/#/" hosts > tmp & mv tmp hosts

this command opens the hosts file, adds a comment symbol (#) to every line, saves to a temp file, then replaces the original host file with the temp file

method 3
probably the easiest of all would be do something similar to method 2, but just wrap it in a batch file. i would go ahead and make that, but i have neglected that blog post because currently rtmpdump does not work with hulu, the only reason i used it
Reply With Quote
  #7  
Old 04-14-2011, 10:57 AM
srpenn82 srpenn82 is offline
Banned
 
Join Date: Dec 2010
Posts: 29
srpenn82 is on a distinguished road
Default

Re: How to use rtmpsrv in Windows


Quote:
Originally Posted by Stream Recorder View Post
Why do we need to get a host with grep from the plugin_container if we use rtmpsrv > rtmpsrv.txt? And where do we use the host value?
the problem with using rtmpsrv on windows is that in windows cannot do a transparent redirect like on linux. basically that means that before you can use rtmpsrv you have to tell it the server that you are trying to download from. at first this seems impossible because you are relying on rtmpsrv to get you that information!

the workaround is to pull the server (--host) directly from your RAM. with firefox the process for adobe is plugin-container.exe. so the idea is to create a dump file of that process after the video has loaded, then search through that file and find the server (--host) information. grep is the easiest tool to do that. once you have the (--host), modify the hosts file and boom, rtmpsrv working. the fact is you can actually find all the rtmpdump parameters in the dump file, and you do not even need to use rtmpsrv. i choose to use it because it seems easier to find the host then to sift through and try to figure out all the other rtmpdump parameters.
Reply With Quote
  #8  
Old 04-14-2011, 12:38 PM
Stream Recorder
 
Posts: n/a
Default

Re: How to use rtmpsrv in Windows


Thanks a lot, Steven!!! This was really helpful and educational!
Reply With Quote
  #9  
Old 04-14-2011, 12:54 PM
KSV KSV is offline
Senior Member
 
Join Date: Apr 2011
Posts: 853
KSV is on a distinguished road
Question

Re: How to use rtmpsrv in Windows


This procedure seems incomplete. where does it pushes the detected host to hosts file.

Code:
cd C:\Windows\System32\drivers\etc & sed s/#// hosts > tmp & mv tmp hosts
cd C:\Windows\System32\drivers\etc & sed "s/^/#/" hosts > tmp & mv tmp hosts
These two lines just comment and uncomment all hosts in the file.
Reply With Quote
  #10  
Old 04-14-2011, 01:04 PM
placebo placebo is offline
Moderator - exTerminator
 
Join Date: Aug 2010
Posts: 477
placebo is on a distinguished road
Default

Re: How to use rtmpsrv in Windows


Quote:
Originally Posted by Stream Recorder View Post
Thanks a lot, Steven!!! This was really helpful and educational!
Yes, thanks a lot Steven. Too difficult for me pumpkin. I go now.. back to my lego bricks

And when there's some actual download task to do, call me. I'll then take out my GetFLV and download the stream, no prob.
Reply With Quote
Reply Post New Thread
Tags: ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 12:31 AM.


Powered by All-streaming-media.com; 2006-2011
vB forum hacked with Zoints add-ons