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 > Video stream recording > (Russian) Запись онлайн
Register FAQ Members List Calendar Mark Forums Read

Reply Post New Thread
 
Thread Tools Display Modes
  #1  
Old 05-27-2010, 09:01 AM
any ANONYMOUS forum user any ANONYMOUS forum user is offline
any user of the forum who preferred to post anonymously
 
Join Date: Aug 2011
Location: Server of stream-recorder.com
Posts: 211
any ANONYMOUS forum user is on a distinguished road
Default

www.tsr.ch - не могу стянуть с ТСР флэш фильм


А я никак не могу стянуть с ТСР фильм на 45 минут, грабить экран не хочу, будут глюки, нужен именно флэш

Code:
http://www.tsr.ch/video/divertissement/1966345-roller-babies.html#id=1966345
Reply With Quote
  #2  
Old 05-27-2010, 09:20 AM
elch elch is offline
Member
 
Join Date: Mar 2010
Posts: 78
elch is on a distinguished road
Default

Re: www.tsr.ch - не могу стянуть с ТСР флэш фильм


They're using HTTP.

Sorry, I don't speak Russian. Would you mind translating your message to English?
Reply With Quote
  #3  
Old 05-27-2010, 10:10 AM
alexthunder alexthunder is offline
Senior Member
 
Join Date: Dec 2006
Posts: 202
alexthunder is on a distinguished road
Default

Re: www.tsr.ch - не могу стянуть с ТСР флэш фильм


Если встречается Adobe Flash Player, при этом видео не помогают скачать плагины для браузера, такие как Fast Video Download для огнелиса, то нужно пробовать Flash stream recorders, которые поддерживают RTMP или RTMPE протокол.

В данном случае используется RTMP, так что скачать его можно легко. Попробуйте бесплатные StreamTransport, Orbit Grab Pro, CooJah + Blader. Также можно использовать rtmpdump, VLC player, хотя ссылки на потоки придется находить не при помощи этих программ. Из платных рекомендую Jaksta.

Last edited by alexthunder : 05-27-2010 at 12:36 PM.
Reply With Quote
  #4  
Old 05-27-2010, 10:11 AM
alexthunder alexthunder is offline
Senior Member
 
Join Date: Dec 2006
Posts: 202
alexthunder is on a distinguished road
Default

Re: www.tsr.ch - не могу стянуть с ТСР флэш фильм


Quote:
Originally Posted by elch View Post
Sorry, I don't speak Russian. Would you mind translating your message to English?
I can't grab a 45 min movie from TCP. I don't want to capture from screen, because of the glitches. I need flash.
Reply With Quote
  #5  
Old 05-27-2010, 01:24 PM
elch elch is offline
Member
 
Join Date: Mar 2010
Posts: 78
elch is on a distinguished road
Default

Re: www.tsr.ch - не могу стянуть с ТСР флэш фильм


Thanks for translating, Alex!

Here's a quick'n'dirty script I've written several months ago. Still seems to work perfectly:

Code:
$ cat tsr-scan 
#!/usr/bin/php
<?php

error_reporting(E_ALL);

$subscriptions = array (
        '55', // temps present
        '97', // services religieux
        '90'  // nouvo
);

$fp = fopen('tsrdl.sh', 'w');

fwrite($fp, '#!/bin/sh' . PHP_EOL);

$path = '/mnt/usb/Series';

foreach ($subscriptions as $id) {
        $url = "http://search2.tsr.ch/solr/select?q=xobix_program_id:$id;broadcast_date%20desc,%20xobix_broadcast_position%20asc&wt=xml";
        $contents = file_get_contents($url);

        preg_match('/<str name="source_name">(.*)<\/str>/Umis', $contents, $matches);

        if (!$matches[1]) {
                echo $id . ' is invalid!';
                continue;
        }

        $title = $matches[1];

        fwrite($fp, PHP_EOL);
        fwrite($fp, '# ' . $title . PHP_EOL);
        fwrite($fp, '# -----------------------------------' . PHP_EOL);

        preg_match_all('/<str name="subtitle">(.*)<\/str>/Umis', $contents, $matches2);
        preg_match_all('/<arr name="media_file_info">(.*)<\/arr>/Umis', $contents, $matches3);

        foreach ($matches2[1] as $key => $subtitle) {
                $urls = $matches3[1][$key];

                preg_match_all('/<str>(.*)<\/str>/Umis', $urls, $matchesUrls);

                for ($i = count($matchesUrls[1]) - 1; $i >= 0; $i--) {
                        preg_match('/"url" : \'(.*)\'/', $matchesUrls[1][$i], $match);
                        $url = $match[1];

                        if (stripos($url, 'real.xobix.ch') !== false) {
                                continue;
                        }

                        fwrite($fp, PHP_EOL);
                        fwrite($fp, '# ' . $subtitle . PHP_EOL);

                        $fullpath = $path . '/' . $title . '/' . $subtitle;
                        $filepath =     $fullpath . '/'. substr(basename($url), 0, strrpos(basename($url), '?'));

                        $comment = '';
                        if ((stripos($subtitle, 'Version courte') !== false) || file_exists($fullpath)) {
                                        $comment = '# ';
                        }

                        fwrite($fp, $comment . 'mkdir -p ' . escapeshellarg($fullpath) . PHP_EOL);
                        fwrite($fp, $comment . 'wget ' . escapeshellarg($url) . ' -O ' . escapeshellarg($filepath) . ' || exit 1' . PHP_EOL);

                        break;
                }
        }

        fwrite($fp, PHP_EOL);

        sleep(1);
}

shell_exec('chmod +x tsrdl.sh');
Then use ./tsrdl.sh for downloading.

Edit: Oh yeah, and it's Linux-only but porting to Windows should be quite easy since wget is available there too. Only the last command should be changed coz Windows has no executable flag in their file system, as far as I know.
Reply With Quote
  #6  
Old 05-27-2010, 01:40 PM
alexthunder alexthunder is offline
Senior Member
 
Join Date: Dec 2006
Posts: 202
alexthunder is on a distinguished road
Default

Re: www.tsr.ch - не могу стянуть с ТСР флэш фильм


You are welcome! I got an RTMP stream with Replay Media Catcher, so I don't know how you've managed to get it with wget

Вольный перевод, для тех, кто в танке :
Quote:
Originally Posted by elch View Post
Вот хз какой-то скрипт, который я написал несколько месяцев назад. Он, кажется, все еще работает отлично:

Code:
$ cat tsr-scan 
#!/usr/bin/php
<?php

error_reporting(E_ALL);

$subscriptions = array (
        '55', // temps present
        '97', // services religieux
        '90'  // nouvo
);

$fp = fopen('tsrdl.sh', 'w');

fwrite($fp, '#!/bin/sh' . PHP_EOL);

$path = '/mnt/usb/Series';

foreach ($subscriptions as $id) {
        $url = "http://search2.tsr.ch/solr/select?q=xobix_program_id:$id;broadcast_date%20desc,%20xobix_broadcast_position%20asc&wt=xml";
        $contents = file_get_contents($url);

        preg_match('/<str name="source_name">(.*)<\/str>/Umis', $contents, $matches);

        if (!$matches[1]) {
                echo $id . ' is invalid!';
                continue;
        }

        $title = $matches[1];

        fwrite($fp, PHP_EOL);
        fwrite($fp, '# ' . $title . PHP_EOL);
        fwrite($fp, '# -----------------------------------' . PHP_EOL);

        preg_match_all('/<str name="subtitle">(.*)<\/str>/Umis', $contents, $matches2);
        preg_match_all('/<arr name="media_file_info">(.*)<\/arr>/Umis', $contents, $matches3);

        foreach ($matches2[1] as $key => $subtitle) {
                $urls = $matches3[1][$key];

                preg_match_all('/<str>(.*)<\/str>/Umis', $urls, $matchesUrls);

                for ($i = count($matchesUrls[1]) - 1; $i >= 0; $i--) {
                        preg_match('/"url" : \'(.*)\'/', $matchesUrls[1][$i], $match);
                        $url = $match[1];

                        if (stripos($url, 'real.xobix.ch') !== false) {
                                continue;
                        }

                        fwrite($fp, PHP_EOL);
                        fwrite($fp, '# ' . $subtitle . PHP_EOL);

                        $fullpath = $path . '/' . $title . '/' . $subtitle;
                        $filepath =     $fullpath . '/'. substr(basename($url), 0, strrpos(basename($url), '?'));

                        $comment = '';
                        if ((stripos($subtitle, 'Version courte') !== false) || file_exists($fullpath)) {
                                        $comment = '# ';
                        }

                        fwrite($fp, $comment . 'mkdir -p ' . escapeshellarg($fullpath) . PHP_EOL);
                        fwrite($fp, $comment . 'wget ' . escapeshellarg($url) . ' -O ' . escapeshellarg($filepath) . ' || exit 1' . PHP_EOL);

                        break;
                }
        }

        fwrite($fp, PHP_EOL);

        sleep(1);
}

shell_exec('chmod +x tsrdl.sh');
Затем используйте ./tsrdl.sh для скачивания.

Исправлено: О да, и это только для Линукс, но портировать в Винду должно быть достаточно просто, т.к. wget там тоже есть. Только последнюю компанду нужно изменить, потому что в Винде нет флага для исполняемых файлов, насколько я знаю.
Reply With Quote
  #7  
Old 05-28-2010, 09:40 AM
elch elch is offline
Member
 
Join Date: Mar 2010
Posts: 78
elch is on a distinguished road
Default

Re: www.tsr.ch - не могу стянуть с ТСР флэш фильм


Yeah, probably they also offer RTMP for some streams. That's why it might have shown something in Replay Media Catcher.
I used Wireshark. There, an HTTP response popped up pointing to some MP4 URLs in different qualities.
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 04:23 PM.


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