limiteddi
07-29-2017, 03:41 PM
http://www.giniko.com/watch.php?id=216
Any ideas how to watch this in VLC? Streamlink failed, it seems to use WMS.
j_cool
07-29-2017, 05:39 PM
you need useragent and wmsAuthSign found in html source.
I didn't manage to get useragent working with vlc, without useragent won't work, so I use ffplay.exe
If you work out useragent with vlc, post here how you did it. --http-user-agent= didn't work for me.
Here is link to something similar with more details how to compile this autoit script:
http://stream-recorder.com/forum/showpost.php?p=93032&postcount=4
runwait('cmd.exe /c curl.exe http://www.giniko.com/watch.php?id=216 | CLIP','',@SW_HIDE,'')
$sData = ClipGet()
$sData = StringTrimLeft($sData,StringInStr($sData,'?wmsAuth Sign='))
$sData = StringTrimRight($sData,(StringLen($sData)+1)-StringInStr($sData,'"'))
$url = '-user_agent Mozilla/5.0 -i http://nimlive1.giniko.com/bbcworldnews/bbcworld/playlist.m3u8?' & $sData
Run('cmd.exe /c ffplay.exe ' & $url,'',@SW_HIDE)
j_cool
07-30-2017, 12:14 PM
https://s3.postimg.org/cv6ymyw73/Screen_Shot.jpg (https://postimg.org/image/cv6ymyw73/)
I can set useragent in gui only.
configuration file vlcrc, command line, no success.
sysanin, are you reading?
j_cool
07-30-2017, 06:27 PM
Streamlink actually works here if you get m3u8 url.
Big issue uncovered from this thread.
How shall we set user agent for our VLC on command line or in vlcrc to look like browser to servers ?
C:\MISC\STREAMLINK>streamlink hlsvariant://http://nimlive1.giniko.com/bbcworldnews/bbcworld/playlist.m3u8?wmsAuthSign=c2VydmVyX3RpbWU9Ny8zMC8y MDE3IDU6NDg6MDEgUE0maGFzaF92YWx1ZT1aTVlWamFMVi83Un BwME9KUlZoYjl3PT0mdmFsaWRtaW51dGVzPTE0NDA= best
[cli][info] Found matching plugin stream for URL hlsvariant://http://nimlive1.giniko.com/bbcworldnews/bbcworld/playlist.m3u8?wmsAuthSign=c2VydmVyX3RpbWU9Ny8zMC8y MDE3IDU6NDg6MDEgUE0maGFzaF92YWx1ZT1aTVlWamFMVi83Un BwME9KUlZoYjl3PT0mdmFsaWRtaW51dGVzPTE0NDA=
[cli][info] Available streams: 480p (worst, best)
[cli][info] Opening stream: 480p (hls)
[cli][info] Starting player: C:\P\VLC\vlc.exe
limiteddi
07-31-2017, 09:18 AM
Getting 403 for some reason in streamlink and vlc
streamlink
streamlink -l debug --http-header "User-Agent=Mozilla/5.0" hlsvariant://http://nimlive1.giniko.com/bbcworldnews/bbcworld/playlist.m3u8?wmsAuthSign=c2VydmVyX3RpbWU9Ny8zMS8y MDE3IDM6MDc6MDggUE0maGFzaF92YWx1ZT1Hd1RKMmVPZzVFQ0 FWM2Y4bDRZdlhnPT0mdmFsaWRtaW51dGVzPTE0NDA= best --player-external-http --player-external-http-port 22334
[cli][info] streamlink is running as root! Be careful!
[cli][info] Found matching plugin stream for URL hlsvariant://http://nimlive1.giniko.com/bbcworldnews/bbcworld/playlist.m3u8?wmsAuthSign=c2VydmVyX3RpbWU9Ny8zMS8y MDE3IDM6MDc6MDggUE0maGFzaF92YWx1ZT1Hd1RKMmVPZzVFQ0 FWM2Y4bDRZdlhnPT0mdmFsaWRtaW51dGVzPTE0NDA=
error: Unable to open URL: http://nimlive1.giniko.com/bbcworldnews/bbcworld/playlist.m3u8?wmsAuthSign=c2VydmVyX3RpbWU9Ny8zMS8y MDE3IDM6MDc6MDggUE0maGFzaF92YWx1ZT1Hd1RKMmVPZzVFQ0 FWM2Y4bDRZdlhnPT0mdmFsaWRtaW51dGVzPTE0NDA= (403 Client Error: Forbidden for url: http://nimlive1.giniko.com/bbcworldnews/bbcworld/playlist.m3u8?wmsAuthSign=c2VydmVyX3RpbWU9Ny8zMS8y MDE3IDM6MDc6MDggUE0maGFzaF92YWx1ZT1Hd1RKMmVPZzVFQ0 FWM2Y4bDRZdlhnPT0mdmFsaWRtaW51dGVzPTE0NDA=)
vlc
vlc --http-user-agent="Mozilla/5.0" "tp://nimlive1.giniko.com/bbcworldnews/bbcworld/playlist.m3u8?wmsAuthSign=c2VydmVyX3RpbWU9Ny8zMS8y MDE3IDM6MTM6NTIgUE0maGFzaF92YWx1ZT1TTW4veDNjMFpwMF ZIelJSNlFEdE9BPT0mdmFsaWRtaW51dGVzPTE0NDA=" --sout "#std{access=http,mux=ts,dst=:2222}"
VLC media player 2.2.4 Weatherwax (revision 2.2.3-37-g888b7e89)
[00007f8a144c9e88] http access error: error: HTTP/1.1 403 Forbidden
[00007f8a144c9e88] http access error: error: HTTP/1.1 403 Forbidden
[00007f8a144c9e88] access_mms access error: error: HTTP/1.1 403 Forbidden
[00007f8a100009b8] core input error: open of `http://nimlive1.giniko.com/bbcworldnews/bbcworld/playlist.m3u8?wmsAuthSign=c2VydmVyX3RpbWU9Ny8zMS8y MDE3IDM6MTM6NTIgUE0maGFzaF92YWx1ZT1TTW4veDNjMFpwMF ZIelJSNlFEdE9BPT0mdmFsaWRtaW51dGVzPTE0NDA=' failed
[00007f8a100009b8] core input error: Your input can't be opened
[00007f8a100009b8] core input error: VLC is unable to open the MRL 'http://nimlive1.giniko.com/bbcworldnews/bbcworld/playlist.m3u8?wmsAuthSign=c2VydmVyX3RpbWU9Ny8zMS8y MDE3IDM6MTM6NTIgUE0maGFzaF92YWx1ZT1TTW4veDNjMFpwMF ZIelJSNlFEdE9BPT0mdmFsaWRtaW51dGVzPTE0NDA='
j_cool
07-31-2017, 11:23 AM
Streamlink runs VLC with it's own "user agent".
I wan to make it more simple than that.
I want to run VLC only with my fake user agent.
eddi,
you see here from post #4 that my batch file works and your does not work.
I can think about 2 things.
You messed up with too many parameters, or wmsAuthSign has expired. It lasts for a few hours only.
You can play Giniko with VLC and Streamlink if you modify my script a little bit, but that is not the point.
I want to play Giniko with VLC without Streamlink, and setting user agent for VLC is a problem.
You can see in post #3 that it works, so what is wrong with that?
That setting is for one shot only, I cannot get it saved.
Solution is setting user agent in vlcrc or find right switch for command line string, and I am working now on that.
bbcworld.exe passes m3u8 url from html source to Streamlink who plays Giniko with it's own "user agent" and runs VLC.
bbcworld.au3
runwait('cmd.exe /c curl.exe http://www.giniko.com/watch.php?id=216 | CLIP','',@SW_HIDE,'')
$sData = ClipGet()
$sData = StringTrimLeft($sData,StringInStr($sData,'?wmsAuth Sign='))
$sData = StringTrimRight($sData,(StringLen($sData)+1)-StringInStr($sData,'"'))
$url = 'hlsvariant://http://nimlive1.giniko.com/bbcworldnews/bbcworld/playlist.m3u8?' & $sData & ' best'
Run('cmd.exe /c streamlink.exe ' & $url,'',@SW_HIDE)
https://s2.postimg.org/q8rgnwddx/Screen_Shot.jpg (https://postimg.org/image/q8rgnwddx/)
Yelloworanges
07-31-2017, 12:27 PM
You can play Giniko with VLC and Streamlink if you modify my script a little bit, but that is not the point.
I want to play Giniko with VLC without Streamlink, and setting user agent for VLC is a problem.
Based on the network traffic, vlc (without streamlink) is successfully reading the ginko url - even though vlc itself reports error. Also, vlc is using standard mozilla user agent.
It does not appear that it is a user agent problem with vlc. Rather, vlc is having trouble parsing this sort of live hls playlist. This sort of problem is the primary reason livestreamer/streamlink was written in the first place.
What is the disadvantage of using the streamlink/vlc combination?
j_cool
07-31-2017, 12:35 PM
1. speed
2. simplicity
3. independence
4. excercising my brain ( how well, is another story).
By the way, you always give good feedback.
Cheers,
Johnny.
j_cool
07-31-2017, 12:43 PM
Streamlink is invaluable when I cannot figure something out, for example fox news on vaughnlive (rtmp).
Or other things "dynamic".
j_cool
08-01-2017, 03:38 AM
Y_orange,
you will be surprised with my findings.
VLC may be using mozilla agent, but it appears to be "mysterious" to servers.
Here are examples, first gospel music:
winamp
https://s1.postimg.org/clxc3jtbv/Screen_Shot.jpg (https://postimg.org/image/clxc3jtbv/)
VLC
https://s4.postimg.org/ilcaumyt5/Screen_Shot2.jpg (https://postimg.org/image/ilcaumyt5/)
Streamlink's work looks to me to be something like rtmpdump's work.
Rtmpdump saves stream to disk or pipes it to player.
Streamlink pipes output to VLC.
When you play the stream directly with VLC you see stream's url in VLC's title bar and no user agent whatsoever in urlsnooper.
AlJazeera: VLC, direct connection
https://s2.postimg.org/lxm8jn90l/Screen_Shot3.jpg (https://postimg.org/image/lxm8jn90l/)
When streamlink plays the stream you see fd://0 - VLC media player in title bar and User-Agent: python-requests/2.18.2 in urlsnooper.
Giniko, streamlink, VLC
https://s4.postimg.org/d51p8gwrt/Screen_Shot4.jpg (https://postimg.org/image/d51p8gwrt/)
Challenge still remains. Urlsnooper has to show VLC as Mozilla everywhere.
When I get m3u8 from Giniko urlsnooper shows curl. Giniko likes curl, just doesn't like nothing that VLC shows.
surya987
08-01-2017, 07:27 AM
i dont understand what you guys are trying to do.. but you can set useragent in VLc..
this is for GuI
:http-user-agent="Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36"
in cmd line try
--http-user-agent="Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36"
try this in more options in vlc
And this SS is packet captured from VLC....
http://i.imgur.com/SXigOY1.jpg
j_cool
08-01-2017, 08:31 AM
This is my command line argument:
vlc.exe --http-user-agent="Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36" http://nimlive1.giniko.com/bbcworldnews/bbcworld/playlist.m3u8?wmsAuthSign=c2VydmVyX3RpbWU9OC8xLzIw MTcgMjowMTozMSBQTSZoYXNoX3ZhbHVlPTFUcytZR3ZIVG9RWG 15K0srMlNYMUE9PSZ2YWxpZG1pbnV0ZXM9MTQ0MA==
and error message:
Your input can't be opened:
VLC is unable to open the MRL 'http://nimlive1.giniko.com/bbcworldnews/bbcworld/playlist.m3u8?wmsAuthSign=c2VydmVyX3RpbWU9OC8xLzIw MTcgMjowMTozMSBQTSZoYXNoX3ZhbHVlPTFUcytZR3ZIVG9RWG 15K0srMlNYMUE9PSZ2YWxpZG1pbnV0ZXM9MTQ0MA=='. Check the log for details.
Strangely, I cannot find log file anywhere.
c:\dir *.log /s
shows all log files on PC, none from VLC.
media menu, open network stream, more options defaults to:
:network-caching=1000
When I change that to:
:http-user-agent=Mozilla/5.0
I can play Giniko, but that setting appears to be temporary, lasting for one run only.
Next time I open VLC I find :network-caching=1000 again.
If I knew how to make setting :http-user-agent=Mozilla/5.0 as permanent, it would solve my problem.
I tried vlcrc, I save setting, but when I run VLC I don't see any effect.
# User Agent (string)
http-user-agent=Mozilla/5.0
That image that you posted shows exactly what I would like to see in urlsnooper, can you get it like that constantly or is it for one run only ?
What VLC version are you running?
Mine is: vlc-2.2.7-20170728-0528-win64
surya987
08-01-2017, 08:57 AM
sorry you cant set it globally....its for single use only...
using 2.2.4 VLC
j_cool
08-01-2017, 04:23 PM
Here is solution:
https://trac.videolan.org/vlc/ticket/6244
Working command line argument:
set url=http://nimlive1.giniko.com/bbcworldnews/bbcworld/playlist.m3u8?wmsAuthSign=c2VydmVyX3RpbWU9OC8xLzIw MTcgOToyNToxMyBQTSZoYXNoX3ZhbHVlPTJUSjUzenlPNkRyRW tJMFovU1F4TVE9PSZ2YWxpZG1pbnV0ZXM9MTQ0MA==
vlc.exe %url% :http-user-agent=Mozilla/5.0
urlsnooper does not show any user agent, Giniko stream plays, user agent passed "as a per input option".
Logging can be set in this way, reading log file didn't help.
--extraintf=http:logger --verbose=2 --file-logging --logfile=c:\vlc-log.txt
Whenever possible use ffplay.exe. VLC is CPU resources hog.
Yelloworanges
08-01-2017, 05:54 PM
So, it does work directly with vlc? I must have missed something.
j_cool
08-01-2017, 06:00 PM
If you understand all about VLC log file error messages..
it gives a lot of information, but not a clue that server wants user agent. Shows 403 in a sea of errors.
vBulletin® , Copyright ©2000-2025, Jelsoft Enterprises Ltd.