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

Can somebody help get filmon rtmp code to play with livestreamer?

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

ihryjfbd 11-18-2016 11:44 AM

Re: Can somebody help get filmon rtmp code to play with livestreamer?


 
Been a while since I used Delphi, do Delphi5 win32 exes still work on win10 x64?

j_cool 11-18-2016 03:44 PM

Re: Can somebody help get filmon rtmp code to play with livestreamer?


 
Good question.


I use delphi 7 to compile this.

Free pascal ( lazarus ) does not have clipbrd unit.


I cannot install delphi 7 on windows 7 so this is what I do:

install delphi 7 as minimal as you can on XP and manually backup ( copy )
command line compiler only. ( bin, lib, and 2 registry files )

registry files you "export" after minimal delphi installation:

[HKEY_LOCAL_MACHINE\SOFTWARE\Borland]

[HKEY_CURRENT_USER\Software\Borland]


This is content of "installation" pack:

Bin
Lib
hkcu.reg
hklm.reg
SETUP.bat

"Installation":

SETUP.bat:

xcopy *.* C:\"Program Files"\Borland\Delphi7 /S /I /Y
regedit /s hkcu.reg
regedit /s hklm.reg


Use:

D7.bat:

"C:\Program Files\Borland\Delphi7\BIN\DCC32.EXE" -cc %1
pause

Example:

C:\MISC\D7>D7 GINIKO_URL.dpr

C:\MISC\D7>"C:\Program Files\Borland\Delphi7\BIN\DCC32.EXE" -cc GINIKO_URL.dpr
Borland Delphi Version 15.0
Copyright (c) 1983,2002 Borland Software Corporation
GINIKO_URL.dpr(32) Warning: Text after final 'END.' - ignored by compiler
GINIKO_URL.dpr(48)
49 lines, 0.03 seconds, 318932 bytes code, 7873 bytes data.

C:\MISC\D7>pause
Press any key to continue . . .


Why not C, this would be the best ?

C code is not so appealing, though being the best and portable everywhere.

j_cool 11-18-2016 06:19 PM

Re: Can somebody help get filmon rtmp code to play with livestreamer?


 
Say that I need 1 day for each line of my proposed 4 line batch file ...

yes if I was superman.

This all has to be done invisible and to loop.

Now I look at 1st line "save web page as txt" and I look at curl...

xidel can do that but advanced use of xidel is beyond me.

Laj gave us:

http://www.filmon.com/api-v2/channel/694?protocol=hls

{"code":200,"message":"OK","data":{"id":694,"title ":"HRTV","alias":"hrtv","description":"HRTV is a 24-hour television based multimedia network dedicated to horseracing which features racing action from many of the sport's greatest racetracks around the world. HRTV also features other forms of equestrian competition, as well as original programming and award-winning documentaries covering a variety of racing and general equestrian topics.","group":"PAY TV - CHANNELS","group_id":37,"group_alias":"local-tv","type":"standard","is_free":false,"is_free_sd_ mode":false,"is_adult":false,"is_interactive":fals e,"is_vod":false,"is_vox":false,"is360":false,"wat ch_free_time":0,"is_local":false,"seekable":false, "user_subscribed":false,"streams":[{"is_free":false,"name":"694.low.stream/playlist.m3u8","quality":"low","url":"http://live-1130.la2.edge.filmon.com/live/694.low.stream/playlist.m3u8?id=035bca1a71b11fce016d28acd3dbea51c bc96ddfe5b9ed3f8fe3286df6a738d313d6ee9ef0cd5913441 8dd131ea7d6f1505c1fa252b971687a03a80768d72df2eb43c 3ad52f2074a9d2e866386b2cbd210b026183061ebc1209f59c 8f54e2b3e24fe3c5610d8ff2ceb083195d6eb35a3f6caf93a5 d3823e634553ad05fe097d6239b7cc1d02facffadc29e53472 de0d0b394a5969c670636","watch-timeout":0},{"is_free":false,"name":"694.high.stre am/playlist.m3u8","quality":"high","url":"http://live-1130.la2.edge.filmon.com/live/694.high.stream/playlist.m3u8?id=035bca1a71b11fce016d28acd3dbea51c bc96ddfe5b9ed3f8fe3286df6a738d313d6ee9ef0cd5913441 8dd131ea7d6f1505c1fa252b971687a03a80768d72df2eb43c 3ad52f2074a9d2e866386b2cbd210b026183061ebc1209f59c 8f54e2b3e24fe3c5610d8ff2c0df2bff6addd1a2e611d4feb2 36ac885ae2166ed75436089691b5025580d1a9e3388a47587c 054d5e7eb443464f249ca","watch-timeout":0}],"server_time":1479517803}}

the most efficient use of this would be to set ID variable in batch file as output from curl or xidel.

I don't know how (to get ID with curl) so I will save this as txt file, read txt file and send ID to clipboard, read from clipboard, snail mail.

j_cool 12-30-2016 11:40 AM

Re: Can somebody help get filmon rtmp code to play with livestreamer?


 
Laj,

are you still alive and well?

Here are HRTV chunks recorded in sequence one after the other.


@title hrtvRDump.bat
:START
@if "%time:~0,1%" == " " (set d=%date:~-4%-%date:~3,2%-%date:~0,2%_0%time:~1,1%-%time:~3,2%-%time:~6,2%) ^
else (set d=%date:~-4%-%date:~3,2%-%date:~0,2%_%time:~0,2%-%time:~3,2%-%time:~6,2%)
@FOR /f %%x IN ('HRTV.exe') DO @set var=%%x
rtmpdump.exe -v -r %var% -o %d%_hrtv.flv
@FOR %%I in (%d%_hrtv.flv) do @if %%~zI LSS 1 del "%%I"
:LOOP
@FOR /f %%a IN ('HRTV.exe') DO @set var2=%%a
if "%var%"=="%var2" goto LOOP
goto START


For this to work you need these files in the same location or on the path:

hrtvrdump.bat
hrtv.exe
curl.exe
rtmpdump.exe


hrtv.au3:

RunWait( 'cmd.exe /c curl -A Mozilla/5.0 -s http://www.filmon.com/api-v2/channel/694?protocol=rtmp | CLIP','', @SW_HIDE )
$sData = ClipGet()
$first = StringInStr( $sData, '"quality":"high","url":"' ) + 23
$sData = StringTrimLeft( $sData, $first )
$last = StringLen( $sData ) - ( StringInStr( $sData, '","watch-timeout":0}]' ) - 1 )
$sData = StringTrimRight( $sData, $last ) & '/694.high.stream'
ConsoleWrite( $sData & @CRLF )


you need to compile .au3 with autoit to get .exe

Aut2Exe.exe /in hrtv.au3

https://www.autoitscript.com/site/autoit/downloads/

autoit-v3.zip

If you want to see the output from hrtv.exe on its own you need to enter on command line: hrtv|more



curl:

http://www.paehl.com/open_source/?CURL_7.51.0

curl_751_0.zip


After you run hrtvrdump.bat for some time you will find chunks looking like this:

2016-12-30_17-24-14_hrtv.flv
2016-12-30_17-26-22_hrtv.flv
2016-12-30_17-28-31_hrtv.flv
2016-12-30_17-30-37_hrtv.flv
2016-12-30_17-32-46_hrtv.flv

you can concatenate them and get continuous stream.


You can play the stream directly, player will be restarting every 2 minutes,
.bat file looping sometimes until the next chunk starts.


@title hrtvFF.bat
:START
@FOR /f %%x IN ('HRTV.exe') DO @set var=%%x
rtmpdump.exe -v -r %var% |ffplay.exe -autoexit -
:LOOP
@FOR /f %%a IN ('HRTV.exe') DO @set var2=%%a
if "%var%"=="%var2" goto LOOP
goto START


This can be improved upon if we knew how to get rtmpdump or ffmpeg
keep appending chunks instead of overwriting them, other members welcome with feedback.

lajvguy 01-02-2017 09:29 PM

Re: Can somebody help get filmon rtmp code to play with livestreamer?


 
Quote:

Originally Posted by j_cool (Post 89098)
Laj,

are you still alive and well?

Here are HRTV chunks recorded in sequence one after the other.


@title hrtvRDump.bat
:START
@if "%time:~0,1%" == " " (set d=%date:~-4%-%date:~3,2%-%date:~0,2%_0%time:~1,1%-%time:~3,2%-%time:~6,2%) ^
else (set d=%date:~-4%-%date:~3,2%-%date:~0,2%_%time:~0,2%-%time:~3,2%-%time:~6,2%)
@FOR /f %%x IN ('HRTV.exe') DO @set var=%%x
rtmpdump.exe -v -r %var% -o %d%_hrtv.flv
@FOR %%I in (%d%_hrtv.flv) do @if %%~zI LSS 1 del "%%I"
:LOOP
@FOR /f %%a IN ('HRTV.exe') DO @set var2=%%a
if "%var%"=="%var2" goto LOOP
goto START


For this to work you need these files in the same location or on the path:

hrtvrdump.bat
hrtv.exe
curl.exe
rtmpdump.exe


hrtv.au3:

RunWait( 'cmd.exe /c curl -A Mozilla/5.0 -s http://www.filmon.com/api-v2/channel/694?protocol=rtmp | CLIP','', @SW_HIDE )
$sData = ClipGet()
$first = StringInStr( $sData, '"quality":"high","url":"' ) + 23
$sData = StringTrimLeft( $sData, $first )
$last = StringLen( $sData ) - ( StringInStr( $sData, '","watch-timeout":0}]' ) - 1 )
$sData = StringTrimRight( $sData, $last ) & '/694.high.stream'
ConsoleWrite( $sData & @CRLF )


you need to compile .au3 with autoit to get .exe

Aut2Exe.exe /in hrtv.au3

https://www.autoitscript.com/site/autoit/downloads/

autoit-v3.zip

If you want to see the output from hrtv.exe on its own you need to enter on command line: hrtv|more



curl:

http://www.paehl.com/open_source/?CURL_7.51.0

curl_751_0.zip


After you run hrtvrdump.bat for some time you will find chunks looking like this:

2016-12-30_17-24-14_hrtv.flv
2016-12-30_17-26-22_hrtv.flv
2016-12-30_17-28-31_hrtv.flv
2016-12-30_17-30-37_hrtv.flv
2016-12-30_17-32-46_hrtv.flv

you can concatenate them and get continuous stream.


You can play the stream directly, player will be restarting every 2 minutes,
.bat file looping sometimes until the next chunk starts.


@title hrtvFF.bat
:START
@FOR /f %%x IN ('HRTV.exe') DO @set var=%%x
rtmpdump.exe -v -r %var% |ffplay.exe -autoexit -
:LOOP
@FOR /f %%a IN ('HRTV.exe') DO @set var2=%%a
if "%var%"=="%var2" goto LOOP
goto START


This can be improved upon if we knew how to get rtmpdump or ffmpeg
keep appending chunks instead of overwriting them, other members welcome with feedback.

Hey j cool,

Does it really work? Looks complicated. Thanks for the help!

j_cool 01-03-2017 02:12 AM

Re: Can somebody help get filmon rtmp code to play with livestreamer?


 
This is ongoing work. You get chunks as I said.

If this worked for private shows on webcam sites it would be the biggest hit on this forum.

You have noticed well that it is not something sophisticated.

Idea of this is to see how it works and improve.

Improvement is not packing it all up in one EXE with autoit at this stage but get the stream play continuously with the player first.

Without the URL you posted I could not had started anything with HRTV and here are chunks for the start.

My Quote:

This can be improved upon if we knew how to get rtmpdump or ffmpeg
keep appending chunks instead of overwriting them, other members welcome with feedback.

ihryjfbd 01-04-2017 12:10 AM

Re: Can somebody help get filmon rtmp code to play with livestreamer?


 
You might be able do it with a delayed loop or something

Create clip list file
Code:

(for %%i in (*.flv) do @echo file '%%i') > mylist.txt
Join all clips together once the stream has ended
Code:

ffmpeg -f concat -i mylist.txt -c copy output.flv
The thing is though even when you join files there's an offset between the two files because the second clip contains around 1-2 seconds from previous clip as it's starting point so you need to trim them otherwise you'll get jumps.

j_cool 01-04-2017 03:41 AM

Re: Can somebody help get filmon rtmp code to play with livestreamer?


 
We will have to live with that jump between chunks.

You must be real hacker to get this playing straight.

If I can get the stream recorded as one continuous file it can be opened with player and played "as it goes".

( maybe piped without writting to disk )

Concatenating chunks "as it goes" makes that impossible.

There are more people working on ffmpeg than on rtmpdump, and if ffmpeg does not offer --append switch
it must be something hard to implement.

I do something similar to what you propose.



Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Folder\shell\dir /b /on /a-d > DIR.txt\command]
@="cmd.exe /c dir /b /on /a-d > DIR.txt"


Right click on any directory in "windows explorer" LEFT pane and get this option:

dir /b /on /a-d > DIR.txt

this gives me DIR.txt:

( go manually through DIR.txt and weed out what I need to concatenate )

2017-01-04_09-49-23_HRTV.flv
2017-01-04_09-49-55_HRTV.flv
2017-01-04_09-52-02_HRTV.flv
2017-01-04_09-54-10_HRTV.flv
2017-01-04_09-56-18_HRTV.flv
2017-01-04_09-58-27_HRTV.flv
2017-01-04_10-00-33_HRTV.flv
2017-01-04_10-02-42_HRTV.flv
2017-01-04_10-04-50_HRTV.flv


Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\txtfile\Shell\concat.txt\command]
@="C:\\ap\\concat.exe %1"


Right click on DIR.txt
"drop down" menu shows this option:

concat.txt

This gives me concat.txt:

file '2017-01-04_09-49-23_HRTV.flv'
file '2017-01-04_09-49-55_HRTV.flv'
file '2017-01-04_09-52-02_HRTV.flv'
file '2017-01-04_09-54-10_HRTV.flv'
file '2017-01-04_09-56-18_HRTV.flv'
file '2017-01-04_09-58-27_HRTV.flv'
file '2017-01-04_10-00-33_HRTV.flv'
file '2017-01-04_10-02-42_HRTV.flv'
file '2017-01-04_10-04-50_HRTV.flv'


program concat;
{$APPTYPE CONSOLE}
uses sysutils;
var s,s2: string;
f,f2: text;

function filename(s:string): string; // CmdLine; //"C:\AP\mka.exe" "C:\New Text Document.mkv"
var str,str1: string; i: integer;
begin
str:='';
for i:= length( s ) downto 1 do
begin
if s[ i ] = '\' then break;
if s[ i ] <> '"' then str:= str + s[ i ]; // txt.ecnerefeR egaugnaL ihpleD
end;
str1 :='';
for i:= length( str ) downto 1 do str1:= str1 + str[ i ]; // Delphi Language Reference.txt
filename:= str1;
end;

begin
assign( f,filename(cmdline) );
reset( f );
rewrite( f2,'concat.txt' );
while not eof( f ) do
begin
readln( f,s );
s2:= 'file ' + chr(39) + s + chr(39);
if length( s ) > 0 then writeln( f2,s2 );
end;
close( f );
close( f2 );
end.


Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\txtfile\Shell\FMPEG concat.txt\command]
@="C:\\AP\\FF\\ffmpeg.exe -f concat -i %1 -c copy concat.flv"


Right click on concat.txt
"drop down" menu shows this option:

FMPEG concat.txt

And here is my:

concat.flv


Ignore yellow lines in CMD window, takes some time to run.

j_cool 01-04-2017 04:36 AM

Re: Can somebody help get filmon rtmp code to play with livestreamer?


 
Ihry,

I was thinking about the gap between chunks.

I was not sure about how much we are missing there and you made it clear that it is nothing missing there but extra 1 sec or 2.

That can be trimmed before concatenation.

Somebody may answer how to know the number of extra seconds ( when is 1, when are 2 ) or how to find it out.

Jumps would irritate if that were few seconds chunks.

In 2 minutes chunks I personally don't mind the jump.

Some beta or irregular release of rtmpdump or ffmpeg that would write those 2 minutes chunks to ONE FILE without overwriting would work fine for me.

ihryjfbd 01-04-2017 06:53 PM

Re: Can somebody help get filmon rtmp code to play with livestreamer?


 
The chunk overlap time seems to be the time taken to connect to the next stream clip in the sequence, you could probably dump a timed value into a txt file by setting timer to start on rtmp starting and then ending when the clip being is written to the hdd.


set time_start=%time%
set time_end=%time%
set time_taken=%time_end%-%time_start%
echo time_taken

confused.com 01-07-2017 04:47 AM

Re: Can somebody help get filmon rtmp code to play with livestreamer?


 
Livestreamer


File output options:
-o FILENAME, --output FILENAME
Write stream data to FILENAME instead of playing it.

You will be prompted if the file already exists.

-f, --force
When using -o, always write to file even if it already exists.

-O, --stdout
Write stream data to stdout instead of playing it.

j_cool 01-13-2017 12:43 PM

Re: Can somebody help get filmon rtmp code to play with livestreamer?


 
Laj,

here is HRTV recorded as one continuous file.
You can play it with a player "as it goes", but player may stumble or fall now and then.
Recorded file will be of acceptable standard.


@title hrtvVLCrtmp.bat
@if "%time:~0,1%" == " " (set d=%date:~-4%%date:~3,2%%date:~0,2%0%time:~1,1%%time:~3,2%%ti me:~6,2%) ^
else (set d=%date:~-4%%date:~3,2%%date:~0,2%%time:~0,2%%time:~3,2%%tim e:~6,2%)
:start
@for /f %%x in ('hrtv.exe') do @set var=%%x
vlc.exe %var% --sout=file{append}/ts:hrtv_%d%.mpg
:loop
@for /f %%y in ('hrtv.exe') do @set var2=%%y
if "%var%"=="%var2" goto loop
goto start



For this to work you need these files in the same location and vlc on the path,
and to make an effort and compile hrtv.au3 with autoit to get hrtv.exe.


hrtvVLCrtmp.bat
hrtv.exe
curl.exe


Recorded file will look something like this:

hrtv_201701131915.mpg


;hrtv.au3
RunWait( 'cmd.exe /c curl -A Mozilla/5.0 -s http://www.filmon.com/api-v2/channel/694?protocol=rtmp | CLIP','', @SW_HIDE )
$sData = ClipGet()
$first = StringInStr( $sData, '"quality":"high","url":"' ) + 23
$sData = StringTrimLeft( $sData, $first )
$last = StringLen( $sData ) - ( StringInStr( $sData, '","watch-timeout":0}]' ) - 1 )
$sData = StringTrimRight( $sData, $last ) & '/694.high.stream'
ConsoleWrite( $sData & @CRLF )


autoit:

https://www.autoitscript.com/site/autoit/downloads/

autoit-v3.zip

Aut2Exe.exe /in hrtv.au3



curl:

http://www.paehl.com/open_source/?CURL_7.51.0

curl_751_0.zip


https://wiki.videolan.org/Documentat...Save_a_Stream/

lajvguy 01-14-2017 11:13 AM

Re: Can somebody help get filmon rtmp code to play with livestreamer?


 
j cool,

Thanks for working on this filmon code for me! I have never used autoit or curl before. What should I do first? Thanks again buddy!

j_cool 01-14-2017 03:31 PM

Re: Can somebody help get filmon rtmp code to play with livestreamer?


 
It appears to be that you are the only one on the internet watching HRTV and me and Ihry
only ones interested about how it all works.

I find it amazing.


Confused says:

Livestreamer !


The only problem with livestreamer is that it's error messages are not so descriptive, it says only 403, forbidden.

FFplay is a little more explainatory saying: cookie missing, though it is questionable because I can play first chunk, and then break.

So with HLS.

RTMP can be done with livestreamer but it would require longer code to get parameters right.


It would be great to get this working in HLS as well, I started to look to spoof cookie on command line for the start,
but is it cookie or not, it would be great to hear from other members.

j_cool 01-14-2017 03:40 PM

Re: Can somebody help get filmon rtmp code to play with livestreamer?


 
Back to VLC:

First thing to do is to make sure your VLC works everywhere in windows.

on command line type: path, press enter key.

You should see something like this:

C:\>path
PATH=C:\Windows\system32;C:\Windows;C:\Windows\Sys tem32\Wbem;C:\Windows\System32\WindowsPowerShell\v 1.0\;C:\P\GnuWin32\b
in;C:\AP;C:\AP\7Z;C:\AP\FF;C:\AP\RDUMP;C:\P\M;C:\P \VLC;C:\P\LIVESTR;C:\Program Files (x86)\Java\jre1.8.0_111\bin

If you don't see location of your vlc.exe here you will have to replace vlc.exe in batch file
with full path to wherever your vlc.exe is:

"C:\Program Files ...\vlc.exe"



To make this organized create directory C:\HRTV and copy to it all files required:

C:\HRTV>dir /b /on
curl.exe
HRTV.au3
HRTV.exe - this one you will get after you compile hrtv.au3 with autoit.
hrtvVLCrtmp.bat



Create txt file and name it: hrtvVLCrtmp.bat, copy code from below and paste it in.

:start
for /f %%x in ('hrtv.exe') do set var=%%x
vlc.exe %var% --sout=file{append}/ts:hrtv.mpg
:loop
for /f %%y in ('hrtv.exe') do set var2=%%y
if "%var%"=="%var2" goto loop
goto start


This is the simplest code possible it can be. Batch file will create hrtv.mpg file.
This batch file will start working only when you start it and stop only when you kill it.
If you let it run it will never stop, appending chunks untill your disk is full and PC stops working.
If you come in situation that you cannot stop it for some reason beyond me,
switch the power button on your PC off.
Restart the PC, and batch file will not run again unless you start it again.
After you finish with recording rename hrtv.mpg to something else or delete it.
If you leave it, next time you run batch file it will continue appending to saved hrtv.mpg.

To play the stream while it is being recorded, to get uninterupted play start playing when there is
some of this stream already saved on the disk, ideally after second chunk had started recording.



Download curl_752_1.zip from this link and unzip it, there will be only one file inside zip, curl.exe.

http://www.paehl.com/open_source/?CURL_7.52.1

CURL 7.52.1

Download WITHOUT SSL




create txt file, name it htrv.au3, copy code from below and paste it in.

RunWait( 'cmd.exe /c curl -A Mozilla/5.0 -s http://www.filmon.com/api-v2/channel/694?protocol=rtmp | CLIP','', @SW_HIDE )
$sData = ClipGet()
$first = StringInStr( $sData, '"quality":"high","url":"' ) + 23
$sData = StringTrimLeft( $sData, $first )
$last = StringLen( $sData ) - ( StringInStr( $sData, '","watch-timeout":0}]' ) - 1 )
$sData = StringTrimRight( $sData, $last ) & '/694.high.stream'
ConsoleWrite( $sData & @CRLF )



Download autoit from here:

https://www.autoitscript.com/site/autoit/downloads/

Download zip:

autoit-v3.zip

unzip it wherever you like and you will get directory: install:

C:\install>dir /b /on
Aut2Exe
AutoItX
Examples
Extras
Icons
Include
SciTe
Au3Check.dat
Au3Check.exe
Au3Info.exe
Au3Info_x64.exe
AutoIt v3 Website.url
AutoIt.chm
AutoIt3.exe
AutoIt3_x64.exe
AutoIt3Help.exe


change to directory Aut2Exe and copy to it hrtv.au3, content should look like this:

C:\install\Aut2Exe>dir /o/b
Icons
Aut2exe.exe
Aut2exe_x64.exe
HRTV.au3
upx.exe

on command line type this and press enter:

C:\install\Aut2Exe>Aut2exe.exe /in hrtv.au3


This will create hrtv.exe


Now, when you have it all together inside HRTV directory double click on hrtvVLCrtmp.bat and
cmd window and minimal vlc will pop up ( no stream to see ) and stream will be recording to hrtv.mpg.

After every chunk vlc will close and pop-up again every 2 minutes, and in between while waiting for next chunk to start.

This all can be made invisible and better and would require longer code.

So long for now, this post is Marathon, you can always ask for more details.

confused.com 01-15-2017 03:00 AM

Re: Can somebody help get filmon rtmp code to play with livestreamer?


 
You are a...

VIRUS !

j_cool 01-16-2017 09:03 AM

Re: Can somebody help get filmon rtmp code to play with livestreamer?


 
If you don't see the stream, don't panic.

HRTV is not on the air for 24 hours as they claim they are.

It can be seen if the stream is on the air or not.


title hrtvFFplayHLS.bat
:start
for /f %%x in ('hrtvhls.exe') do set var=%%x
ffplay.exe %var%
:loop
for /f %%a in ('hrtvhls.exe') do set var2=%%a
if "%var%"=="%var2" goto loop
goto start


;HRTVhls.au3
RunWait( 'cmd.exe /c curl -A Mozilla/5.0 -s http://www.filmon.com/api-v2/channel/694?protocol=hls | CLIP','', @SW_HIDE )
$sData = ClipGet()
$first = StringInStr( $sData, '"quality":"high","url":"' ) + 23
$sData = StringTrimLeft( $sData, $first )
$last = StringLen( $sData ) - ( StringInStr( $sData, '","watch-timeout":0}]' ) - 1 )
$sData = StringTrimRight( $sData, $last )
ConsoleWrite( $sData & @CRLF )



If the stream in not on the air HLS protocol will kindly display "no stream available".


If the stream is on the air, FFplay with play the first chunk and than close and cmd winow will display this:

Invalid cookie found, no value, path or domain specified
HTTP error 403 Forbidden



C:\MISC\NEWS\OLD>title hrtvFFplayHLS.bat

C:\MISC\NEWS\OLD>for /F %x in ('hrtvhls.exe') do set var=%x

C:\MISC\NEWS\OLD>set var=http://edge-1130-us-la.filmon.com/live/694.high.stream/playlist.m3u8?id=035bca1a71b11fce016d28a
cd3dbea51cbc96ddfe5b9ed3f8fe3286df6a738d375aa36816 6afe1c544fac31ebd9183124b6180e7293350017211533d3d9 5c1917da58560961e8ce
5fe018251de42102ef4e275dcb90600a49519c597eb2e0ff4f fc7d19f308722ebefab04390e61dba20d1a8dda36683cdff46 718d96f39537d3ebffb8
5c0d6c2725b1dd7d3d8ff05e6098f990831bd324c

C:\MISC\NEWS\OLD>ffplay.exe http://edge-1130-us-la.filmon.com/li...1a71b11fce016d
28acd3dbea51cbc96ddfe5b9ed3f8fe3286df6a738d375aa36 8166afe1c544fac31ebd9183124b6180e7293350017211533d 3d95c1917da58560961e
8ce5fe018251de42102ef4e275dcb90600a49519c597eb2e0f f4ffc7d19f308722ebefab04390e61dba20d1a8dda36683cdf f46718d96f39537d3ebf
fb85c0d6c2725b1dd7d3d8ff05e6098f990831bd324c
ffplay version 3.2.2 Copyright (c) 2003-2016 the FFmpeg developers
built with gcc 5.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable
-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-li
bbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enabl
e-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-li
bopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --en
able-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable
-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zl
ib
libavutil 55. 34.100 / 55. 34.100
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.100 / 57. 56.100
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
[http @ 04933140] Invalid cookie found, no value, path or domain specified
Input #0, hls,applehttp, from 'http://edge-1130-us-la.filmon.com/live/694.high.stream/playlist.m3u8?id=035bca1a71b11fce0
16d28acd3dbea51cbc96ddfe5b9ed3f8fe3286df6a738d375a a368166afe1c544fac31ebd9183124b6180e72933500172115 33d3d95c1917da585609
61e8ce5fe018251de42102ef4e275dcb90600a49519c597eb2 e0ff4ffc7d19f308722ebefab04390e61dba20d1a8dda36683 cdff46718d96f39537d3
ebffb85c0d6c2725b1dd7d3d8ff05e6098f990831bd324c':
Duration: N/A, start: 66479.104856, bitrate: N/A
Program 0
Metadata:
variant_bitrate : 0
Stream #0:0: Video: h264 (Baseline) ([27][0][0][0] / 0x001B), yuv420p, 720x480 [SAR 40:33 DAR 20:11], Closed Caption
s, 29.97 tbr, 90k tbn, 59.94 tbc
Metadata:
variant_bitrate : 0
Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp
Metadata:
variant_bitrate : 0
Stream #0:2: Data: timed_id3 (ID3 / 0x20334449)
Metadata:
variant_bitrate : 0
[http @ 04933140] Invalid cookie found, no value, path or domain specified
[http @ 04933140] Invalid cookie found, no value, path or domain specified
[http @ 04933140] Invalid cookie found, no value, path or domain specified
[http @ 04933140] Invalid cookie found, no value, path or domain specified
[http @ 04933140] Invalid cookie found, no value, path or domain specified
[http @ 04933140] Invalid cookie found, no value, path or domain specified
[http @ 04933140] Invalid cookie found, no value, path or domain specified
[http @ 04933140] Invalid cookie found, no value, path or domain specified
[http @ 06820880] HTTP error 403 Forbidden= 78KB sq= 0B f=0/0
[hls,applehttp @ 0492e700] Failed to reload playlist 0
[http @ 04933140] Invalid cookie found, no value, path or domain specified
[http @ 06820880] HTTP error 403 Forbidden= 49KB sq= 0B f=0/0
[hls,applehttp @ 0492e700] Failed to reload playlist 0
[http @ 04933140] Invalid cookie found, no value, path or domain specified
[http @ 06820880] HTTP error 403 Forbidden= 11KB sq= 0B f=0/0
[hls,applehttp @ 0492e700] Failed to reload playlist 0
[http @ 04933140] Invalid cookie found, no value, path or domain specified
[http @ 06820880] HTTP error 403 Forbidden= 0KB sq= 0B f=0/0
[hls,applehttp @ 0492e700] Failed to reload playlist 0
[http @ 04933140] Invalid cookie found, no value, path or domain specified
[http @ 06820880] HTTP error 403 Forbidden= 0KB sq= 0B f=0/0
[hls,applehttp @ 0492e700] Failed to reload playlist 0 0B f=0/0
[http @ 04933140] Invalid cookie found, no value, path or domain specified
[http @ 06820880] HTTP error 403 Forbidden= 0KB sq= 0B f=0/0
[hls,applehttp @ 0492e700] Failed to reload playlist 0
[http @ 04933140] Invalid cookie found, no value, path or domain specified
[http @ 06820880] HTTP error 403 Forbidden= 0KB sq= 0B f=0/0
[hls,applehttp @ 0492e700] Failed to reload playlist 0
[http @ 04933140] Invalid cookie found, no value, path or domain specified
[http @ 06820880] HTTP error 403 Forbidden= 0KB sq= 0B f=0/0

Terminate batch job (Y/N)? 2 aq= 0KB vq= 0KB sq= 0B f=0/0

j_cool 01-30-2017 07:19 AM

Re: Can somebody help get filmon rtmp code to play with livestreamer?


 
Livestreamer is replaced with Streamlink.

Links to new filmon plug-in:


https://github.com/streamlink/streamlink/issues/507

https://github.com/beardypig/streaml...gins/filmon.py



set url=http://www.filmon.com/channel/bbc-news
streamlink --http-header "User-Agent=Mozilla/5.0" --player "ffplay.exe -vf scale=854:480" %url% worst

j_cool 01-31-2017 04:42 AM

Re: Can somebody help get filmon rtmp code to play with livestreamer?


 
Laj,

you can try solution for HRTV from here:

https://github.com/streamlink/streamlink/issues/510

May work for you.


Cheers,

Johnny.

j_cool 01-31-2017 06:39 AM

Re: Can somebody help get filmon rtmp code to play with livestreamer?


 
Proven to work with solution #508

https://github.com/streamlink/streamlink/issues/510

lajvguy 01-31-2017 02:38 PM

Re: Can somebody help get filmon rtmp code to play with livestreamer?


 
j cool,

Thanks for the help buddy. It's working for me only with low and keep getting the "Failed to reload playlist" warning. Is it the same for you?

Code:

C:\Users\Lenovo\Desktop>streamlink "http://www.filmon.com/channel/hrtv" low
[cli][info] Found matching plugin filmon for URL http://www.filmon.com/channel/h
rtv
[cli][info] Available streams: low (worst), high (best)
[cli][info] Opening stream: low (hls-filmon)
[cli][info] Starting player: "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe"
[stream.hls][warning] Failed to reload playlist: Unable to open URL: http://edge
-1130-us-la.filmon.com/live/694.low.stream/playlist.m3u8?id=035bca1a71b11fce016d
28acd3dbea51cbc96ddfe5b9ed3f8fe3286df6a738d39ace3c6d1f7936a5b2f4f448f56db13bddbb
3b70e329714539074a8d507dda33cae4d1c4aa54319dec18915105928e4c421f9ff6e038db6613b5
a4a3495f7668723152984cfb8fd6069901dad2844544ea87aa684d7d3b3559f562777be0d6a8d66d
1db564f967c1115ca2be53da10c19746bedeb5b364a3 (403 Client Error: Forbidden for ur
l: http://edge-1130-us-la.filmon.com/live/694.low.stream/playlist.m3u8?id=035bca
1a71b11fce016d28acd3dbea51cbc96ddfe5b9ed3f8fe3286df6a738d39ace3c6d1f7936a5b2f4f4
48f56db13bddbb3b70e329714539074a8d507dda33cae4d1c4aa54319dec18915105928e4c421f9f
f6e038db6613b5a4a3495f7668723152984cfb8fd6069901dad2844544ea87aa684d7d3b3559f562
777be0d6a8d66d1db564f967c1115ca2be53da10c19746bedeb5b364a3)
[stream.hls][warning] Failed to reload playlist: Unable to open URL: http://edge
-1130-us-la.filmon.com/live/694.low.stream/playlist.m3u8?id=035bca1a71b11fce016d
28acd3dbea51cbc96ddfe5b9ed3f8fe3286df6a738d39ace3c6d1f7936a5b2f4f448f56db13bddbb
3b70e329714539074a8d507dda33cae4d1c4aa54319dec18915105928e4c421f9ff6e038db6613b5
a4a3495f7668723152984cfb8fd6069901dad2844544ea87aa684d7d3b3559f562777be0d6a8d66d
1db564f967c1115ca2be53da10c19746bedeb5b364a3 (403 Client Error: Forbidden for ur
l: http://edge-1130-us-la.filmon.com/live/694.low.stream/playlist.m3u8?id=035bca
1a71b11fce016d28acd3dbea51cbc96ddfe5b9ed3f8fe3286df6a738d39ace3c6d1f7936a5b2f4f4
48f56db13bddbb3b70e329714539074a8d507dda33cae4d1c4aa54319dec18915105928e4c421f9f
f6e038db6613b5a4a3495f7668723152984cfb8fd6069901dad2844544ea87aa684d7d3b3559f562
777be0d6a8d66d1db564f967c1115ca2be53da10c19746bedeb5b364a3)
[stream.hls][warning] Failed to reload playlist: Unable to open URL: http://edge
-1130-us-la.filmon.com/live/694.low.stream/playlist.m3u8?id=035bca1a71b11fce016d
28acd3dbea51cbc96ddfe5b9ed3f8fe3286df6a738d39ace3c6d1f7936a5572a9647312c1ea78519
c2001f601039af3417a5317aa62e84a13dee39df539bb782ff3ce8575220854435f071d86ba6652c
f3c2aef8c23159d9affaa105e95fb9b5c27d915a353e3fba5afbe57c410bedac5f1bf4b7a1bf4216
8a9e4ea23601f4f8e4ff97fa4c5740e2ca0c9c1fc2a4 (403 Client Error: Forbidden for ur
l: http://edge-1130-us-la.filmon.com/live/694.low.stream/playlist.m3u8?id=035bca
1a71b11fce016d28acd3dbea51cbc96ddfe5b9ed3f8fe3286df6a738d39ace3c6d1f7936a5572a96
47312c1ea78519c2001f601039af3417a5317aa62e84a13dee39df539bb782ff3ce8575220854435
f071d86ba6652cf3c2aef8c23159d9affaa105e95fb9b5c27d915a353e3fba5afbe57c410bedac5f
1bf4b7a1bf42168a9e4ea23601f4f8e4ff97fa4c5740e2ca0c9c1fc2a4)
[stream.hls][warning] Failed to reload playlist: Unable to open URL: http://edge
-1130-us-la.filmon.com/live/694.low.stream/playlist.m3u8?id=035bca1a71b11fce016d
28acd3dbea51cbc96ddfe5b9ed3f8fe3286df6a738d39ace3c6d1f7936a5572a9647312c1ea78519
c2001f601039af3417a5317aa62e84a13dee39df539bb782ff3ce8575220854435f071d86ba6652c
f3c2aef8c23159d9affaa105e95fb9b5c27d915a353e3fba5afbe57c410bedac5f1bf4b7a1bf4216
8a9e4ea23601f4f8e4ff97fa4c5740e2ca0c9c1fc2a4 (403 Client Error: Forbidden for ur
l: http://edge-1130-us-la.filmon.com/live/694.low.stream/playlist.m3u8?id=035bca
1a71b11fce016d28acd3dbea51cbc96ddfe5b9ed3f8fe3286df6a738d39ace3c6d1f7936a5572a96
47312c1ea78519c2001f601039af3417a5317aa62e84a13dee39df539bb782ff3ce8575220854435
f071d86ba6652cf3c2aef8c23159d9affaa105e95fb9b5c27d915a353e3fba5afbe57c410bedac5f
1bf4b7a1bf42168a9e4ea23601f4f8e4ff97fa4c5740e2ca0c9c1fc2a4)
[stream.hls][warning] Failed to reload playlist: Unable to open URL: http://edge
-1130-us-la.filmon.com/live/694.low.stream/playlist.m3u8?id=035bca1a71b11fce016d
28acd3dbea51cbc96ddfe5b9ed3f8fe3286df6a738d39ace3c6d1f7936a5572a9647312c1ea78519
c2001f601039af3417a5317aa62e84a13dee39df539bb782ff3ce8575220854435f071d86ba6652c
f3c2aef8c23159d9affaa105e95fb9b5c27d915a353e3fba5afbe57c410bedac5f1bf4b7a1bf4216
8a9e4ea23601f4f8e4ff97fa4c5740e2ca0c9c1fc2a4 (403 Client Error: Forbidden for ur
l: http://edge-1130-us-la.filmon.com/live/694.low.stream/playlist.m3u8?id=035bca
1a71b11fce016d28acd3dbea51cbc96ddfe5b9ed3f8fe3286df6a738d39ace3c6d1f7936a5572a96
47312c1ea78519c2001f601039af3417a5317aa62e84a13dee39df539bb782ff3ce8575220854435
f071d86ba6652cf3c2aef8c23159d9affaa105e95fb9b5c27d915a353e3fba5afbe57c410bedac5f
1bf4b7a1bf42168a9e4ea23601f4f8e4ff97fa4c5740e2ca0c9c1fc2a4)
[stream.hls][warning] Failed to reload playlist: Unable to open URL: http://edge
-1130-us-la.filmon.com/live/694.low.stream/playlist.m3u8?id=035bca1a71b11fce016d
28acd3dbea51cbc96ddfe5b9ed3f8fe3286df6a738d39ace3c6d1f7936a58f21fe15d7d8ebf3d12f
43599a5ed37057e018ba88661317cf177c30e66b3317a73cc2d747784681bb9fc72ead1f6d8c4056
a3d29ba337e353591e884d295bbd4dc31f53b2403d8bcbb7cea674de44a04f21a830b722e273aa8a
2af217567c837fb8c8407757c97eea5bd3933acad73a (403 Client Error: Forbidden for ur
l: http://edge-1130-us-la.filmon.com/live/694.low.stream/playlist.m3u8?id=035bca
1a71b11fce016d28acd3dbea51cbc96ddfe5b9ed3f8fe3286df6a738d39ace3c6d1f7936a58f21fe
15d7d8ebf3d12f43599a5ed37057e018ba88661317cf177c30e66b3317a73cc2d747784681bb9fc7
2ead1f6d8c4056a3d29ba337e353591e884d295bbd4dc31f53b2403d8bcbb7cea674de44a04f21a8
30b722e273aa8a2af217567c837fb8c8407757c97eea5bd3933acad73a)
[stream.hls][warning] Failed to reload playlist: Unable to open URL: http://edge
-1130-us-la.filmon.com/live/694.low.stream/playlist.m3u8?id=035bca1a71b11fce016d
28acd3dbea51cbc96ddfe5b9ed3f8fe3286df6a738d39ace3c6d1f7936a58f21fe15d7d8ebf3d12f
43599a5ed37057e018ba88661317cf177c30e66b3317a73cc2d747784681bb9fc72ead1f6d8c4056
a3d29ba337e353591e884d295bbd4dc31f53b2403d8bcbb7cea674de44a04f21a830b722e273aa8a
2af217567c837fb8c8407757c97eea5bd3933acad73a (403 Client Error: Forbidden for ur
l: http://edge-1130-us-la.filmon.com/live/694.low.stream/playlist.m3u8?id=035bca
1a71b11fce016d28acd3dbea51cbc96ddfe5b9ed3f8fe3286df6a738d39ace3c6d1f7936a58f21fe
15d7d8ebf3d12f43599a5ed37057e018ba88661317cf177c30e66b3317a73cc2d747784681bb9fc7
2ead1f6d8c4056a3d29ba337e353591e884d295bbd4dc31f53b2403d8bcbb7cea674de44a04f21a8
30b722e273aa8a2af217567c837fb8c8407757c97eea5bd3933acad73a)
[stream.hls][warning] Failed to reload playlist: Unable to open URL: http://edge
-1130-us-la.filmon.com/live/694.low.stream/playlist.m3u8?id=035bca1a71b11fce016d
28acd3dbea51cbc96ddfe5b9ed3f8fe3286df6a738d39ace3c6d1f7936a58f21fe15d7d8ebf3d12f
43599a5ed37057e018ba88661317cf177c30e66b3317a73cc2d747784681bb9fc72ead1f6d8c4056
a3d29ba337e353591e884d295bbd4dc31f53b2403d8bcbb7cea674de44a04f21a830b722e273aa8a
2af217567c837fb8c8407757c97eea5bd3933acad73a (403 Client Error: Forbidden for ur
l: http://edge-1130-us-la.filmon.com/live/694.low.stream/playlist.m3u8?id=035bca
1a71b11fce016d28acd3dbea51cbc96ddfe5b9ed3f8fe3286df6a738d39ace3c6d1f7936a58f21fe
15d7d8ebf3d12f43599a5ed37057e018ba88661317cf177c30e66b3317a73cc2d747784681bb9fc7
2ead1f6d8c4056a3d29ba337e353591e884d295bbd4dc31f53b2403d8bcbb7cea674de44a04f21a8
30b722e273aa8a2af217567c837fb8c8407757c97eea5bd3933acad73a)
[stream.hls][warning] Failed to reload playlist: Unable to open URL: http://edge
-1130-us-la.filmon.com/live/694.low.stream/playlist.m3u8?id=035bca1a71b11fce016d
28acd3dbea51cbc96ddfe5b9ed3f8fe3286df6a738d39ace3c6d1f7936a510d62044f95ffa26075b
2fe42c1dd0f535dc68271ac737ce94c2c3c14b6b6a4317380e1cf7a4eb4e637895826a0f731567e9
3fb06f30cac9e571ff8aa130652b11902fb74cb7a2207749fd0cebf62fb93e238a87f97aa17ea0fe
208672ae326c743969f37b1056100f9d0f945c15b45a (403 Client Error: Forbidden for ur
l: http://edge-1130-us-la.filmon.com/live/694.low.stream/playlist.m3u8?id=035bca
1a71b11fce016d28acd3dbea51cbc96ddfe5b9ed3f8fe3286df6a738d39ace3c6d1f7936a510d620
44f95ffa26075b2fe42c1dd0f535dc68271ac737ce94c2c3c14b6b6a4317380e1cf7a4eb4e637895
826a0f731567e93fb06f30cac9e571ff8aa130652b11902fb74cb7a2207749fd0cebf62fb93e238a
87f97aa17ea0fe208672ae326c743969f37b1056100f9d0f945c15b45a)


j_cool 01-31-2017 05:06 PM

Re: Can somebody help get filmon rtmp code to play with livestreamer?


 
Yes, it works for me on low stream only. I ignore display in CMD window
and the stream is continuous and lasts long.

I resize ffplay window and it looks good to me.

I use streamlink to watch BBC low because streamlink starts the stream instantly
while my shity script takes 3 seconds or so to show the stream.

Streamlink gives you HRTV low in a player continuously, remarkable achievement.

High stream is luxury and if I cannot get it I am sort of a shy to ask beardypig to get it for me.

There is more technical talk on streamlink and livestreamer threads on github,
while on this forum it is more broad and wide.

You may sound just stupid here and you are just fine here, this forum is superb
for both knowledge and non-knowledge.

lajvguy 02-03-2017 09:49 PM

Re: Can somebody help get filmon rtmp code to play with livestreamer?


 
j cool,

Does this mean that the filmon HRTV high stream should work now?

https://github.com/streamlink/streamlink/pull/508

https://github.com/streamlink/streamlink/pull/522

Can you figure it out? Thanks.

j_cool 02-04-2017 04:39 AM

Re: Can somebody help get filmon rtmp code to play with livestreamer?


 
You can keep your eye on streamlink-latest.exe ( nightly ) here:

https://streamlink.github.io/install...ndows-binaries

https://streamlink-builds.s3.amazona...ink-latest.exe



I don't see any difference for now.

High stream actually works with what you already have, you just have to wait for breaks to end between chunks.

I am better off watching low with resized ffplay so breaks come less often,
my graphic card is Matrox C680 and monitor Eizo FlexScan S1923, so resized low looks like high.

Vaganza 02-06-2017 11:19 AM

Re: Can somebody help get filmon rtmp code to play with livestreamer?


 
Quote:

Originally Posted by j_cool (Post 89601)
"....High stream is luxury and if I cannot get it I am sort of a shy to ask beardypig to get it for me. ....."

Have you tried -ldebug ?
Code:

[streamlink.exe -ldebug https://www.filmon.com/channel/bbc-news best]
It's an incredibly elegant solution !

j_cool 02-06-2017 11:49 AM

Re: Can somebody help get filmon rtmp code to play with livestreamer?


 
Not yet.

At that time ffplay.exe worked somehow with some errors, post #57

[http @ 04933140] Invalid cookie found, no value, path or domain specified
[http @ 06820880] HTTP error 403 Forbidden= 49KB sq= 0B f=0/0

Later I discovered streamlink and beardypig wrote new filmon.py.

I missed -ldebug in livestreamer readme file back then.

I am curious what caused 403.

I did run livestreamer now for test:


C:\MISC\NEWS\HRTV>livestreamer.exe -ldebug https://www.filmon.com/channel/bbc-news best
[cli][info] Found matching plugin filmon for URL https://www.filmon.com/channel/bbc-news
error: No streams found on this URL: https://www.filmon.com/channel/bbc-news

C:\MISC\NEWS\HRTV>pause
Press any key to continue . . .

Running streamlink with -ldebug there is no error now.


C:\MISC\NEWS\HRTV>streamlink.exe -ldebug https://www.filmon.com/channel/bbc-news best
[cli][info] Found matching plugin filmon for URL https://www.filmon.com/channel/bbc-news
[cli][info] Available streams: low (worst), high (best)
[cli][info] Opening stream: high (hls-filmon)
[stream.hls][debug] Reloading playlist
[stream.hls-filmon][debug] Reloading FilmOn channel playlist: bbc-news
[stream.hls][debug] Adding segment 493927 to queue
[cli][debug] Pre-buffering 8192 bytes
[stream.hls][debug] Adding segment 493928 to queue
[stream.hls][debug] Adding segment 493929 to queue
[stream.hls][debug] Download of segment 493927 complete
[cli][info] Starting player: C:\P\VLC\vlc.exe
[cli][debug] Writing stream to output
[stream.hls][debug] Download of segment 493928 complete
[stream.hls][debug] Download of segment 493929 complete

lajvguy 02-06-2017 12:59 PM

Re: Can somebody help get filmon rtmp code to play with livestreamer?


 
@Vaganza,

Excellent incredibly elegant solution! Thanks buddy!

Vaganza 02-06-2017 02:04 PM

Re: Can somebody help get filmon rtmp code to play with livestreamer?


 
Apparently a lucky strike.
Even beardypig wondered if it would work.
I thought this was what he meant by proposing using it.
I haven't used it for like watching films yet. So let's see.

j_cool 02-06-2017 02:12 PM

Re: Can somebody help get filmon rtmp code to play with livestreamer?


 
Well,

Beardypig did actually work out something out of -ldebug HRTV.

lajvguy 02-06-2017 02:18 PM

Re: Can somebody help get filmon rtmp code to play with livestreamer?


 
Beardypig is a very sharp guy. Using HRTV high with the nightly.

ihryjfbd 02-09-2017 11:16 AM

Re: Can somebody help get filmon rtmp code to play with livestreamer?


 
Quote:

Originally Posted by lajvguy (Post 89669)
Beardypig is a very sharp guy. Using HRTV high with the nightly.

Where can we get nightly builds?

j_cool 02-09-2017 01:32 PM

Re: Can somebody help get filmon rtmp code to play with livestreamer?


 
https://streamlink.github.io/#

GitHub: https://github.com/streamlink/streamlink

Installers for Windows/Mac/Linux:

Windows ( link )

https://streamlink.github.io/install...ndows-binaries

You can download the latest nightly Windows installer here. ( this link )

https://streamlink-builds.s3.amazona...ink-latest.exe

Yesterday's was: 0.3.1.807

Today's is: 0.3.1.814

Vaganza 02-09-2017 05:33 PM

Re: Can somebody help get filmon rtmp code to play with livestreamer?


 
Quote:

Originally Posted by ihryjfbd (Post 89702)
Where can we get nightly builds?

Should this also concern the use of -ldebug your not dependent on the Nightly Builds,
the only thing for any reinstall is to uninstall first according to beardypig:
“...if you want the latest filmon fixes” (0.3.1), but obviously also for any coming (future) fixes.
Don't remember if that ever was the case with Livestreamer.

As j_cool has linked to Github I'm assuming it's okay:
"...updated plugin to match changes..."

By the way, my question about if this ever was available in Livestreamer
and his suggestion “--loglevel” isn't working for me so this must be totally new.
That's why I think it should be included in some documentation.

However, he/ (they) has made it possible to just download
the Nightly Builds, extract it and then replace or put in any new fixes.
My directory: C:\Program Files (x86)\Streamlink\pkgs\streamlink\plugins.

ihryjfbd 02-09-2017 05:48 PM

Re: Can somebody help get filmon rtmp code to play with livestreamer?


 
Quote:

Originally Posted by j_cool (Post 89703)
https://streamlink.github.io/#

GitHub: https://github.com/streamlink/streamlink

Installers for Windows/Mac/Linux:

Windows ( link )

https://streamlink.github.io/install...ndows-binaries

You can download the latest nightly Windows installer here. ( this link )

https://streamlink-builds.s3.amazona...ink-latest.exe

Yesterday's was: 0.3.1.807

Today's is: 0.3.1.814

Thanks :cool:

I don't suppose there is anyway to make it support player pausing for tea breaks? like a temporary created cache record file if it detects the player has been paused, i'm using MPC-BE x64 and it loses the stream if paused it'll play for like 3-5mins after the paused time then go off, maybe via ffplay.

j_cool 02-09-2017 06:14 PM

Re: Can somebody help get filmon rtmp code to play with livestreamer?


 
This one works fine:

set url=http://www.filmon.com/channel/bbc-news
start /min streamlink --http-header "User-Agent=Mozilla/5.0" --player "ffplay.exe -vf scale=854:480" %url% worst


This one not so fine:

set url=http://www.filmon.com/channel/bbc-news
start /min streamlink --http-header "User-Agent=Mozilla/5.0" --player "ffplay.exe" %url% best


You can dump the stream on disk, wait for some stream to get saved on disk, and play the stream from disk with any player.
Mplayer, FFplay ...

This way there are no tea breaks, but one second more or less between chunks.

Python guys know how to sort it out or somebody like rtmpdump team.
Look at Vaughnlive.py, one example of excellence of stramlink/livestreamer team.

j_cool 02-11-2017 08:20 AM

Re: Can somebody help get filmon rtmp code to play with livestreamer?


 
Ihry,

This reading may answer your last post:

streamlink -h

--player-no-close
By default Streamlink will close the player when the stream ends.
This is to avoid "dead" GUI players lingering after a stream ends.

It does however have the side-effect of sometimes closing a player
before it has played back all of its cached data.

This option will instead let the player decide when to exit.


--player-continuous-http
Make the player read the stream through HTTP, but unlike
--player-http it will continuously try to open the stream if the
player requests it.

ihryjfbd 02-12-2017 08:15 PM

Re: Can somebody help get filmon rtmp code to play with livestreamer?


 
hmmm getting file not found in MPC-BE x64.

Code:

streamlink -ldebug http://www.filmon.com/channel/cbs-action best --player-continuous-http
[cli][info] Found matching plugin filmon for URL http://www.filmon.com/channel/cbs-action
[cli][info] Available streams: low (worst), high (best)
[cli][info] Starting player: "C:\Program Files\MPC-BE x64\mpc-be64.exe"
[cli][info] Got HTTP request from MPC-BE
[cli][info] Opening stream: high (hls-filmon)
[stream.hls][debug] Reloading playlist
[stream.hls-filmon][debug] Reloading FilmOn channel playlist: cbs-action
[stream.hls][debug] Adding segment 704317 to queue
[cli][debug] Pre-buffering 8192 bytes
[stream.hls][debug] Adding segment 704318 to queue
[stream.hls][debug] Adding segment 704319 to queue
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Adding segment 704320 to queue
[stream.hls][debug] Download of segment 704317 complete
[cli][debug] Writing stream to player
[cli][info] HTTP connection closed
[stream.hls][debug] Closing worker thread
[stream.hls][debug] Closing writer thread
[cli][info] Stream ended
[cli][info] Got HTTP request from MPC-BE
[cli][info] Opening stream: high (hls-filmon)
[stream.hls][debug] Reloading playlist
[stream.hls-filmon][debug] Reloading FilmOn channel playlist: cbs-action
[stream.hls][debug] Adding segment 704320 to queue
[cli][debug] Pre-buffering 8192 bytes
[stream.hls][debug] Adding segment 704321 to queue
[stream.hls][debug] Adding segment 704322 to queue


j_cool 02-13-2017 02:30 AM

Re: Can somebody help get filmon rtmp code to play with livestreamer?


 
I have not tried mpc-be yet.

Here are streamlink players, and what they do and don't do.
Scroll the page to see Known issues and workarounds, MPC-HC reports “File not found”.

https://streamlink.github.io/players.html

Note the absence of ffplay, to people this is no player at all, and can do it all.

This works perfectly fine:

start /min streamlink --player "ffplay.exe" http://www.filmon.com/channel/cbs-action best

ihryjfbd 02-13-2017 03:55 AM

Re: Can somebody help get filmon rtmp code to play with livestreamer?


 
Quote:

Originally Posted by j_cool (Post 89731)
I have not tried mpc-be yet.

Here are streamlink players, and what they do and don't do.
Scroll the page to see Known issues and workarounds, MPC-HC reports “File not found”.

https://streamlink.github.io/players.html

Note the absence of ffplay, to people this is no player at all, and can do it all.

This works perfectly fine:

start /min streamlink --player "ffplay.exe" http://www.filmon.com/channel/cbs-action best

Ok thanks I'll try with VLC, ffplay and MPC-HC.
I was running v1.4.6 (build 1478) beta of MPC-BE.

ihryjfbd 02-14-2017 02:00 PM

Re: Can somebody help get filmon rtmp code to play with livestreamer?


 
Ok MPC-HC is playing back fine :)

Recording though is intermittent though it looses the stream 1-2mins in and sometimes repeats the same section in the recording, I guess it has do with it timing out and reloading the playlist instead of just adding / playing the next segment.

Also without adding the following I kept getting 403 client forbidden errors.

Code:

--http-header "Referer=http://www.filmon.com/tv/modules/FilmOnTV/files/flashapp/filmon/FilmonPlayer.swf" --http-header "Accept-Encoding=gzip, deflate" --http-header "User-Agent=Mozilla/5.0 (Windows NT 6.1; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0"
Code:

Streamlink is now Recording... channel-4
[cli][info] Found matching plugin filmon for URL https://www.filmon.com/tv/channel-4
[cli][info] Available streams: low (worst), high (best)
[cli][info] Opening stream: high (hls-filmon)
[stream.hls][debug] Reloading playlist
[stream.hls-filmon][debug] Reloading FilmOn channel playlist: channel-4
[stream.hls][debug] Adding segment 980191 to queue
[cli][debug] Pre-buffering 8192 bytes
[stream.hls][debug] Adding segment 980192 to queue
[stream.hls][debug] Adding segment 980193 to queue
[cli][debug] Checking file output
[stream.hls][debug] Download of segment 980191 complete
[cli][debug] Writing stream to output
[download][..7_20-42-03_channel-4.ts] Written 1.9 MB (2s @ 801.9 KB/s)[stream.hls][debug] Download of segment 980192 complete
                                                                              [stream.hls][debug] Download of segment 980193 complete
[download][..7_20-42-03_channel-4.ts] Written 3.4 MB (4s @ 794.2 KB/s)                                                                              [
stream.hls][debug] Reloading playlist
[stream.hls][debug] Adding segment 980194 to queue
[stream.hls][debug] Download of segment 980194 complete
[download][..7_20-42-03_channel-4.ts] Written 4.8 MB (12s @ 397.6 KB/s)                                                                              [
stream.hls][debug] Reloading playlist
[stream.hls][debug] Adding segment 980195 to queue
[stream.hls][debug] Download of segment 980195 complete
[download][..7_20-42-03_channel-4.ts] Written 6.8 MB (21s @ 323.4 KB/s)                                                                              [
stream.hls][debug] Reloading playlist
[stream.hls][debug] Adding segment 980196 to queue
[stream.hls][debug] Download of segment 980196 complete
[download][..7_20-42-03_channel-4.ts] Written 7.5 MB (33s @ 230.0 KB/s)                                                                              [
stream.hls][debug] Reloading playlist
[stream.hls-filmon][debug] Reloading FilmOn channel playlist: channel-4
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Reloading playlist
[stream.hls-filmon][debug] Reloading FilmOn channel playlist: channel-4
[cli][error] Error when reading from stream: Read timeout
[stream.hls][debug] Closing worker thread
[stream.hls][debug] Closing writer thread
[stream.hls][debug] Closing writer thread
[cli][info] Stream ended



All times are GMT -6. The time now is 04:15 AM.