Difficulty saving a video

Nigel Taylor njtaylor at asterisk.demon.co.uk
Mon Jul 18 11:58:37 EDT 2011


On 07/18/11 16:03, Sam Kuper wrote:
> On 18 July 2011 11:14, Nigel Taylor<njtaylor at asterisk.demon.co.uk>  wrote:
>> The auth part depends on the IP address, so you can't cut and paste.
>
> OK, as I suspected. Thanks for confirming.
The auth part is also only valid for a certain period of time.

>
>> rtmpsvr requires you to directs the traffic to it.
>
> Aha! I hadn't clocked that. Thank you.
>
>> On Debian (Linux)
>> I have a user rtmp, under which I run rtmpsrv. The traffic to port 1935 is redirected using iptables -
>>
>> iptables -t nat -A OUTPUT -p tcp --dport 1935 -m owner \! --uid-owner rtmp \
>>   -j REDIRECT
>>
>>
>> For mac don't have one to try this on..
>>
>> sudo ipfw add 40 fwd 127.0.0.1,1935 tcp from any to any 1935
>> sudo ipfw add 40 fwd 127.0.0.1,1935 tcp from any to any 1935 not uid RTMP
>>
>> See http://stream-recorder.com/forum/use-rtmpdump-rtmpsrv-mac-os-x-t7662.html
>
> Made my system hang, as others in that forum thread reported. The
> /etc/hosts trick mentioned there didn't work for me either. Meh.
>
> Am still wondering if Wireshark is the way to go, but my experience
> with Wireshark isn't very substantial, so it might be more effort than
> it's worth.
Wireshark would be difficult to use for this.

I used rtmpsrv, and burpsuite, when I looked at fixing get_flash_videos 
channel 5 downloads. You set the browser to use burpsuite as it's proxy 
server.

 From comparing the rtmpsrv, and get_iplayer debug, should be able to 
determine the correct parameters for rtmpdump.

Things like undefine, duplication ... the changeable part below is the 
&auth=....&, replace that from what get_iplayer  --debug gives

DEBUG: No Encoding used on 
http://www.bbc.co.uk/mediaselector/4/gtis/stream/?server=cp54782.edgefcs.net&identifier=secure/s_geog/s_geog_ec_03049_16x9_bb&kind=akamai&application=ondemand

<?xml version="1.0" encoding="UTF-8"?><stream 
version="0.1"><server>cp54782.edgefcs.net</server><identifier>secure/s_geog/s_geog_ec_03049_16x9_bb</identifier><token>auth=daEajbWakb5cSdYc7bsakdubPbIbGclc1az-bojfqa-bWG-KotDAoDpJEnGwxK&amp;aifp=v001&amp;slist=secure/s_geog/s_geog_ec_03049_16x9_bb</token><kind>akamai</kind><application>ondemand</application><location>UK</location></stream>

Then use auth....

sh a.1 daEajbWakb5cSdYc7bsakdubPbIbGclc1az-bojfqa-bWG-KotDAoDpJEnGwxK
RTMPDump v2.4
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
Connecting ...
INFO: Connected...
Starting download at: 0.000 kB
INFO: Metadata:
INFO:   duration              122.60
INFO:   width                 512.00
INFO:   height                288.00
INFO:   videodatarate         320.00
INFO:   audiodatarate         48.00
INFO:   framerate             25.00
INFO:   creationdate          Tue Oct  7 19:12:51 2008
INFO:   lasttimestamp         123.01
INFO:   lastkeyframetimestamp 122.48
INFO:   videocodecid          4.00
INFO:   audiocodecid          2.00
INFO:   audiodelay            0.00
INFO:   canSeekToEnd          FALSE
INFO:   filesize              5769048.00
INFO:   videosize             4942957.00
INFO:   audiosize             794740.00
INFO:   datasize              7731.00
896.775 kB / 19.80 sec (16.1%)^C
Caught signal: 2, cleaning up, just a second...
960.775 kB / 21.08 sec (17.1%)
Download may be incomplete (downloaded about 17.10%), try resuming


$ cat a.1
AUTH=$1
rtmpdump -r 
"rtmp://195.59.58.142:1935/ondemand?_fcs_vhost=cp54782.edgefcs.net&auth=${AUTH}&aifp=v001&slist=secure/s_geog/s_geog_ec_03049_16x9_bb" 
-a 
"ondemand?_fcs_vhost=cp54782.edgefcs.net&auth=${AUTH}&aifp=v001&slist=secure/s_geog/s_geog_ec_03049_16x9_bb" 
-f "LNX 10,2,152,27" -W 
"http://www.bbc.co.uk/emp/revisions/18269_21576_10player.swf?revision=18269_21576" 
-p 
"http://www.bbc.co.uk/learningzone/clips/thermal-imagery-in-the-desert/3204.html" 
-C B:0 -y "secure/s_geog/s_geog_ec_03049_16x9_bb" -o 
s_geog_ec_03049_16x9_bb.flv


Simple http request to return auth string...

$ curl 
'http://www.bbc.co.uk/mediaselector/4/gtis/stream/?server=cp54782.edgefcs.net&identifier=secure/s_geog/s_geog_ec_03049_16x9_bb&kind=akamai&application=ondemand'
<?xml version="1.0" encoding="UTF-8"?><stream 
version="0.1"><server>cp54782.edgefcs.net</server><identifier>secure/s_geog/s_geog_ec_03049_16x9_bb</identifier><token>auth=daEb4bkacajcOaFd6bad_dqcxaRbMdMd_d2-bojfE7-bWG-HolDCnFpFBoHvxC&amp;aifp=v001&amp;slist=secure/s_geog/s_geog_ec_03049_16x9_bb</token><kind>akamai</kind><application>ondemand</application><location>UK</location></stream>


>
>>> If you compare,
>>> get_iplayer is not passing the correct parameters to rtmpdump, which why you
>>> get the access error.
>>
>> Aha! Thank you for pointing this out. Is this a bug in get_iplayer? If
>> so, ought it to be reported somewhere, or is this mailing list thread
>> sufficient?
>
> Also, please could someone comment on this?

t's not a bug strictly as it's not Iplayer content. The fact the 
parameters are close to being correct means get_iplayer could be made to 
work.

>
> Thanks again,
>
> Sam
>
> _______________________________________________
> get_iplayer mailing list
> get_iplayer at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/get_iplayer




More information about the get_iplayer mailing list