Repository: streamlink/streamlink-twitch-gui

Issue #445: OS X Sierra 10.12.4 - VLC + HTTP stream does not open
Created: 2017-04-24T04:00:02Z
Checklist

 This is a bug report.
 Streamlink is working correctly on my system without using the Twitch GUI.
 I tried solving my issue by reading the project's wiki first.
 I used the search function to find already opened/closed issues or pull requests.

Description
I am currently on Mac OS X Sierra 10.12.4, and streamlink is working on command line, but the GUI version seems to be giving me an error code 1 with the following log attached here. I am really confused as to what the problem is. I have tried giving the GUI explicit path to my streamlink (/usr/local/bin/streamlink) in the GUI and it still isn't working.
Does anyone have any suggestions?
Environment details

VLC 2.2.4
streamlink 0.5.0
Streamlink Twitch GUI Version 1.2.1 (1.2.1)
OSX Sierra 10.12.4

Failed Streamlink GUI Log:
Found matching plugin twitch for URL twitch.tv/petesgameroom
Attempting to authenticate using OAuth token
Successfully logged in as MyUserName
Available streams: audio, mobile (worst), low, medium, high, source (best)
Starting player: /Applications/VLC.app/Contents/MacOS/VLC
Traceback (most recent call last):
File "/usr/local/bin/streamlink", line 9, in <module>
load_entry_point('streamlink==0.5.0', 'console_scripts', 'streamlink')()
File "/Library/Python/2.7/site-packages/streamlink-0.5.0-py2.7.egg/streamlink_cli/main.py", line 999, in main
handle_url()
File "/Library/Python/2.7/site-packages/streamlink-0.5.0-py2.7.egg/streamlink_cli/main.py", line 499, in handle_url
handle_stream(plugin, streams, stream_name)
File "/Library/Python/2.7/site-packages/streamlink-0.5.0-py2.7.egg/streamlink_cli/main.py", line 377, in handle_stream
return output_stream_http(plugin, streams)
File "/Library/Python/2.7/site-packages/streamlink-0.5.0-py2.7.egg/streamlink_cli/main.py", line 192, in output_stream_http
server.close()
File "/Library/Python/2.7/site-packages/streamlink-0.5.0-py2.7.egg/streamlink_cli/utils/http_server.py", line 116, in close
self.socket.shutdown(2)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 228, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 57] Socket is not connected

Successful CLI log:
Amans-MBP:~ amanbhimani$ streamlink twitch.tv/PetesGameRoom high
[cli][info] Found matching plugin twitch for URL twitch.tv/PetesGameRoom
[cli][info] Available streams: audio, mobile (worst), low, medium, high, source (best)
[cli][info] Opening stream: high (hls)
[cli][info] Starting player: /Applications/VLC.app/Contents/MacOS/VLC
[cli][info] Player closed
[cli][info] Stream ended
[cli][info] Closing currently open stream...

Duplicate issue #464: VLC Immediate Crash on macOS
Created: 2017-05-30T18:19:18Z
Checklist

 This is a bug report.
 Streamlink is working correctly on my system without using the Twitch GUI.
 I tried solving my issue by reading the project's wiki first.
 I used the search function to find already opened/closed issues or pull requests.

Description
VLC on macOS crashes immediately after successfully launching a stream through the GUI.
My fix on pre-1.3.x versions of the GUI was to use --verbose=0 as a parameter to VLC.  I know that this does nothing for VLC, but it allowed the stream to play.  This fix doesn't work on current versions of the GUI because of the bug I believe you are aware of from #463.
What does appear to work is using rtmp as the passthrough option.  I tried both http and hls and both crashed VLC in a similar manner.  The error I received from VLC when using http or hls is shown in figure 1.  Figure 2 shows what happens when I attempt to pass -v to VLC.  I have also included the GUI logs which correspond to the 2 test cases.
Expected / Actual behavior
VLC will not crash when playing a stream with either http and hls passthrough.
Reproduction steps

Install streamlink v0.6.0 via pip, streamlink-twitch-gui v1.3.1 from GitHub releases, and VLC v2.2.5.1 from the official site.
Start a random stream.
VLC opens with error log message and then immediately closes.

Environment details (operating system, etc.)
macOS 10.11.6
streamlink 0.6.0 (installed via pip)
streamlink-twitch-gui 1.3.1
VLC 2.2.5.1
Comments, logs, screenshots, etc.
Figure 1. VLC Error Log

Figure 2. GUI Error Message

Log 1. GUI log for normal operation
GUI Log (Normal Operation).txt
Log 2. GUI log for VLC verbose
GUI Log (VLC Verbose Operation).txt

Closing comment (2017-05-30T18:58:52Z): Thanks for the detailed report!
The VLC issue on MacOS in combination with the http passthrough method has been reported in #445 (let's discuss this here, though), but I don't know what is causing it. As you can see in your first screenshot, VLC interprets the local http URL as a relative path for some reason. Since the Twitch GUI has nothing to do with spawning the player process, this issue is most likely caused by either Streamlink or VLC itself.
Regarding your second screenshot, I must say that it confuses me. Why is streamlink complaining about invalid parameters, if all that has been changed was the content of the --player-args param? This doesn't make sense to me.
Could you please run streamlink with the same parameters listed in the log from your shell (don't forget to properly escape the param values) and post the results?