View Single Post
  #3  
Old 06-24-2016, 05:55 PM
mrberni mrberni is offline
Member
 
Join Date: May 2014
Posts: 58
mrberni is on a distinguished road
Default

Re: How do i record this steam? Can I schedule it?


That m3u8 link you found should work (works for me at least), but it could be, that it expires, so you have to experiment how long you can access the m3u8 file, before you have to update it.

To download the stream you have to do the following:
Download the m3u8 file, or open it in your browser (in Firefox write "view-source:" in front of it). Now take the complete URL for your desired resolution (probably 720p which is the k.m3u8). Download ffmpeg and use the following command:

Code:
ffmpeg -i "YOUR M3U8 URL" -c copy "your path\output.ts"
Of course replace "YOUR M3U8 URL" with the m3u8 you copied before and "your path\output.ts" wherever you want it to save the file and which name (but keep the .ts ending).

Important: when you have recorded the desired length don't just close the window. Stop the encoding with pressing "q" first.

example:
Code:
ffmpeg -i "http://content-aeuf2.uplynk.com/channel/0194acb14e714610b2598d206811d951/k.m3u8?tc=1&exp=1466810449802&rn=4520.329983492225&ct=c&oid=4413701bf5a1488db55b767f8ae9d4fa&eid=KGOwatch&ad=watchkgolive&ad.kv=station%2Ckgo&ad.adUnit=midroll&ad.flex=0&ad._v=2&sig=d383f219bc78be6a8c969393eba0da9255ac8b73f3fd400d73953cfda8878791&pbs=8e1ef53f24a74277951ba0dbf8736d80" -c copy "news.ts"

Now how you could schedule it (if you have Windows):
First modify the ffmpeg command with the -t parameter. It will tell ffmpeg how long it will record and then stops it. Here for one hour:

Code:
ffmpeg -i "YOUR M3U8 URL" -c copy -t 01:00:00.000 "your path\output.ts"
Now create a .bat file containing the ffmpeg command. Replace ffmpeg with the full path to the ffmpeg.exe (just to be safe) and now VERY important: replace every % in the m3u8 URL with %%.

Then you open the "Task Scheduler" (click on Start and search for "Task Scheduler"), and plan a new task starting at 6pm and take the .bat file to start. Here a tutorial I found: http://www.digitalcitizen.life/how-c...ic-task-wizard

The only problem is, that you have to move your recording everyday to another folder, or ffmpeg will override it.
Reply With Quote