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
Register FAQ Members List Calendar Mark Forums Read

Reply Post New Thread
 
Thread Tools Display Modes
  #11  
Old 05-30-2015, 03:10 AM
biezom biezom is offline
Senior Member
 
Join Date: Sep 2014
Posts: 1,025
biezom is on a distinguished road
Default

Re: playtv.fr


Quote:
Originally Posted by mk123 View Post
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

Last edited by biezom : 05-30-2015 at 06:01 AM. Reason: add -ss 10 option for ffmpeg
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 02:17 AM.


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