Audio/video stream recording forums (http://stream-recorder.com/forum/index.php)
-   Video stream recording (http://stream-recorder.com/forum/forumdisplay.php?f=4)
-   -  

teleru.com: failed to read RTMP packet header. any suggestions please?

(http://stream-recorder.com/forum/showthread.php?t=6438)

Monte 04-23-2010 07:21 AM

teleru.com: failed to read RTMP packet header. any suggestions please?


 
Hi,

teleru.com is a video archive of Russian TV channels. It requires free registration, though some videos are available without registration in this section: "http://teleru.com/video?free=1"

I was able to find out --rtmp, --playpath and --swfUrl parameters, but can't download any videos. It seems this web-site uses some sophisticated authentication technique, maybe based on tickets limited in time.

Let me take a tennis program as an example, the address is:
"http://teleru.com/video/play?free=1&media=50477"

There is an XML URL which contains links to other URLs:
"http://teleru.com/video/xmlstruct?media=50477"

We need the last one: "http://bl.teleru.com/video/fileinfo/50477"
Once you visit it, you obtain these parameters for flash player:

Code:

<?xml version="1.0" encoding="UTF-8"?>
<redirect>
    <tickettime sec="60"/>
    <newticket>http://bl.teleru.com/video/purchase/50477</newticket>
    <protocols>
<address protocol="rtmp">rtmp://st-0-4.teleru.com:1935</address>    </protocols>
    <tracks>
        <track bitrate="1000"><![CDATA[?check_ip=0.0.0.0&exp=1272023671&file=57%2F60%2F57605be6ebb3e841f0a6705c18b573df-hdp.mp4&host=&max_time=210&route=st-0-4.teleru.com&start=0&sign=0cd865ad9e1ced5bb117b693b4923cc7]]></track>
        <track bitrate="600"><![CDATA[?check_ip=0.0.0.0&exp=1272023671&file=57%2F60%2F57605be6ebb3e841f0a6705c18b573df-hd.mp4&host=&max_time=210&route=st-0-4.teleru.com&start=0&sign=9cf4e663c895bb80583f63a2044cd6de]]></track>
        <track bitrate="300"><![CDATA[?check_ip=0.0.0.0&exp=1272023671&file=57%2F60%2F57605be6ebb3e841f0a6705c18b573df-sd.mp4&host=&max_time=210&route=st-0-4.teleru.com&start=0&sign=d1013f3a9655e7cfd7e71fa7da51c136]]></track>
    </tracks>
    <events><event id="cdfd969b7b4274ee14fb75ef93b5a661" time="243"><![CDATA[http://bl.teleru.com/video/continue/50477/cdfd969b7b4274ee14fb75ef93b5a661]]></event></events>
</redirect>

(I have replaced my IP with 0.0.0.0).

Here we have the --rtmp parameter: rtmp://st-0-4.teleru.com:1935,
and the --playpath (for the best quality mp4): ?check_ip=0.0.0.0&exp=1272023671&file=57%2F60%2F57 605be6ebb3e841f0a6705c18b573df-hdp.mp4&host=&max_time=210&route=st-0-4.teleru.com&start=0&sign=0cd865ad9e1ced5bb117b693 b4923cc7
The --swfUrl is "http://teleru.com/10/player.swf"

So when I invoke
Code:

rtmpdump --rtmp rtmp://st-0-4.teleru.com:1935 --playpath "?check_ip=0.0.0.0&exp=1272023671&file=57%2F60%2F57605be6ebb3e841f0a6705c18b573df-hdp.mp4&host=&max_time=210&route=st-0-4.teleru.com&start=0&sign=0cd865ad9e1ced5bb117b693b4923cc7" --swfUrl http://teleru.com/10/player.swf --flv 57605be6ebb3e841f0a6705c18b573df-hdp.mp4 --debug
I get:
Code:

RTMPDump v2.2c
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
WARNING: No application or playpath in URL!
Connecting ...
INFO: Connected...
ERROR: RTMP_ReadPacket, failed to read RTMP packet header

Although rtmpdump complains about the playpath, I believe the playpath I supplied is correct, at least this is what I got using several rtmp downloaders in Windows (Orbit Downloader, Replay Media Catcher etc.). They were not able to download from this site either. I tried to use "sign" from the playpath and the "event" ID as --auth , but it did not make any difference.

I have not yet given up on finding out how to download from this web-site. If anyone have any suggestions please don't hesitate to share them.

Take notice of "newticket", "tickettime" and "event" parameters in "http://bl.teleru.com/video/fileinfo/50477". I don't know how to make use of them. Maybe some perl script, which is beyond my skills at the moment.

Thanks in advance.


The same discussion in Russian:
teleru.com - Как сохранить видео

Stream Recorder 04-23-2010 07:58 AM

Re: teleru.com: failed to read RTMP packet header. any suggestions please?


 
CooJah should give you all RTMP parameters that you need. You can also try rtmpsrv.

So far you don't use the app parameter.
rtmp://host/app/playpath
But actually you can probably trt to download without it providing --rtmp only. Just find the RTMP URL correctly using software mentioned above.

And you should be able to capture the stream with Jaksta in the recording mode.

Monte 04-23-2010 08:33 AM

Re: teleru.com: failed to read RTMP packet header. any suggestions please?


 
Thank you, Stream Recorder,

I tried Jaksta, and it didn't even intercept the rtmp stream, let alone download.

I am looking forward to trying CooJah.

I didn't supply --app because it did not show up anywhere. As seen from above, the "full path" seems to be:
rtmp://st-0-{3,4}.teleru.com:1935/?check_ip=<IP>&exp=<exp>&file=<path-to-file>.mp4&host=&max_time=210&route=st-0-{3,4}.teleru.com&start=0&sign=<sign>

Debug log: http://pastebin.com/raw.php?i=tD3fxX2J

hyc 04-23-2010 11:48 AM

Re: teleru.com: failed to read RTMP packet header. any suggestions please?


 
The "file" parameter you're using was obviously urlencoded in the XML file and you didn't urldecode it before using it as a playpath.

There are probably other issues too, but that is certainly a problem.

Stream Recorder 04-23-2010 12:30 PM

Re: teleru.com: failed to read RTMP packet header. any suggestions please?


 
Jaksta recording works ok here:



But timestamps sent by the server are way off so you would need to use the Fix FLV tool in Jaksta to adjust the time stamps. The standard 15 seems to work well and play back has sound and video in sync.

Monte 04-23-2010 09:59 PM

Re: teleru.com: failed to read RTMP packet header. any suggestions please?


 
Thank you, hyc,
I already tried to decode urlencoded file, and it didn't work.

Stream Recorder,
as I said, Jaksta did not work for me.

I am only interested in using rtmpdump for this web-site.

hyc 04-24-2010 01:25 AM

Re: teleru.com: failed to read RTMP packet header. any suggestions please?


 
I took a look using rtmpsuck instead. This stream is using a couple of commands I haven't seen before, so they're not supported in rtmpdump. rtmpsuck 2.2c had a small parsing bug too, now fixed in SVN. Aside from that, it saves the stream with no trouble.

current SVN rtmpdump now has a "-Y" option to trigger the set_playlist command that this stream requires. That should get you started. When I tried to grab your stream though, it stopped after only 4.3% was transferred. The playpath specifies max_time=210 and it stopped at 211 seconds. I guess the actual player must have to send a series of commands to get an entire stream down.

Monte 04-27-2010 02:56 AM

Re: teleru.com: failed to read RTMP packet header. any suggestions please?


 
Hi,

hyc, thank you so much!

--playlist did the trick, and max_time can easily be dealt with. :)

I appreciate your job with rtmpdump very much. Thank you once again.


All times are GMT -6. The time now is 09:53 PM.