Quote:
Originally Posted by sonnvl
Is there any tool that auto extract m3u8 from a site and auto start recording that stream.
(Similar Jaksta recorder)
Eg. All below links contain m3u8 with variant token and I want to auto extract m3u8 list and auto start recording (using livestreamer of ffmpeg....)
http://tv.101vn.com/ok/vtc/youtv_2.php
http://viewtv.vn/live
Because I want to make task schedule to record at given time while I'm not online.
Thanks !
|
with php code it's possible
Code:
<?php
$return=file_get_contents("http://tv.101vn.com/ok/vtc/youtv_2.php"); preg_match('/src=\'(.*?)\'/', $return, $matche);
$return2=file_get_contents("$matche[1]"); preg_match('/responseText = "(.*?)"/', $return2, $m3u8); $hls=str_replace("http","hlsvariant://http",$m3u8[1]);
$date = date("H:i_d-m-Y"); $outputfile= $date . "-hanoi-cab2.ts";
echo "Starting livestreamer...\n\n";
echo shell_exec("livestreamer \"$hls\" best -o \"$outputfile\" &");
echo "Done.\n";
?>
Code:
<?php
$return=file_get_contents("http://viewtv.vn/live"); preg_match('/iosUrl =\'(.*?)\'/', $return, $m3u8);
$hls=str_replace("http","hlsvariant://http",$m3u8[1]); $date = date("H:i_d-m-Y"); $outputfile= $date . "-vt8.ts";
echo "Starting livestreamer...\n\n";
echo shell_exec("livestreamer \"$hls\" best -o \"$outputfile\" &");
echo "Done.\n";
?>