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

playtv.fr

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

biezom 05-30-2015 02:10 AM

Re: playtv.fr


 
Quote:

Originally Posted by mk123 (Post 77053)
can somebody help me with this script please , im new to this but i learn verry fast.
where i should save this script and how i can make it work or how can i use it

thanks again.

php script

on linux create beblack-caribbean.php

Code:

<?php
$url="http://playtv.fr/television/beblack-caribbean/";

$link=str_replace("television/","player/play/",$url)."?bitrate=0&format=hls&language=fr";

$m3u8=json_decode(file_get_contents($link))->url;

echo "Starting ffmpeg...\n\n";
        echo shell_exec("ffmpeg -ss 10  -i  '$m3u8' -c copy beblack-caribbean.ts &");
        echo "Done.\n";
?>


on windows (probably an easier way is possible)

create beblack-caribbean.bat

Code:

@ echo on
call php beblack-caribbean.php
call set /p m3u8b= <m3u8.txt
call ffmpeg -ss 10 -i "%m3u8b%" -c copy beblack-caribbean.ts
pause
:end

and create beblack-caribbean.php

Code:

<?php
$url="http://playtv.fr/television/beblack-caribbean/";

$link=str_replace("television/","player/play/",$url)."?bitrate=0&format=hls&language=fr";

$m3u8=json_decode(file_get_contents($link))->url;

$Fnm = "m3u8.txt"; $inF = fopen($Fnm,"w"); fputs($inF,"$m3u8");
fclose($inF);
?>

of course you must have php an ffmpeg

if you want with some change it's possible to add date and time for the output file
example 2015-05-30_10-33-52beblack-caribbean.ts


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