streamlink-twitch-gui
streamlink-twitch-gui copied to clipboard
Feature Request: IINA Player for Mac OS
I have a suggestion to add new Mac OS Player called IINA https://lhc70000.github.io/iina/
Actually it can open any stream even without streamlink - You can just open channel url
https://www.twitch.tv/*username*
and even twitch vods! https://www.twitch.tv/videos/*vodnumber*
As IINA creator says it is based on MPV, but I can't use it even if MPV profile is checked in GUI settings.
I know that IINA is still in beta but it works well with no crashes at all. It will be nice to use it.
IINA currently doesn't support command line parameters, which makes it unusable together with Streamlink/Livestreamer: lhc70000/iina#58 lhc70000/iina#456
streamlink -v -p /Applications/IINA.app/Contents/MacOS/IINA twitch.tv/CHANNEL best
Actually it can open any stream even without streamlink
They are bundling youtube-dl with it, that's why...
Thx for the reply. IINA is still in development and I suppose they will add command line parameters support, so it is still a good idea to watch for this project
It is indeed possible to use streamlink with iina, using the --player-external-http flag and then choosing "Open URL" in IINA. It should be possible to implement URLs from command line arguments, I am going to look into that, but it will take a while as I have not looked into the source yet.
since iina and mpv can stream from twitch directly, is there a chance we can get an option to use them with out streamlink in the middle?
As of version 0.0.15 iina does support command line arguments, see https://github.com/lhc70000/iina/issues/58
It should now be possible to add support for iina.
Thanks for letting me know, @SxDx
According to lhc70000/iina#1181, the --stdin
parameter is required for reading from stdin.
Streamlink Twitch GUI currently doesn't support player parameters and options for different kind of stream transport methods (called player input in the settings menu). This means that if I'd add a preset for IINA with a static --stdin
parameter, choosing a different player input method other than stdin would cause the player to not understand where to read the stream data from. If I'd not add the parameter, the fifo or http methods wouldn't work. Other players don't have this issue, because passing the file name -
(or NUL
on Windows) is treated as an alias for reading from stdin and Streamlink automatically sets it, depending on the chosen transport method.
QuickTime has a similar issue and requires certain Streamlink parameters to be set: https://github.com/streamlink/streamlink/issues/1338#issuecomment-346076987
Both issues can be fixed by making the transport method dependent on the selected player preset instead of being a global setting. However, this requires a rework of the settings models, the settings menu, the player presets, the streaming service and parameter generation logic.
For now, you can just manually define a custom player path and custom parameters, which should work just fine if you adjust the params to your selected input method. Check the mpv documentation for all available parameters or see the mpv preset data here: https://github.com/streamlink/streamlink-twitch-gui/blob/v1.4.1/src/config/players.json#L73-L157 https://github.com/streamlink/streamlink-twitch-gui/wiki/Player-configuration#custom-player-parameters
@bastimeyer
So it seems that IINA supports stdin input now and streamlink supports player args.
Why is it then that I still get this error?
CLI output:
error: Failed to start player: iina (Process exited prematurely)
[cli][info] Closing currently open stream...
My streamlinkrc
player=iina
player-args=--stdin
@SheinH You should ask this on the streamlink issue tracker. I don't really know why this isn't working. This might be an issue with IINA itself and how Streamlink is piping the data into the freshly spawned player process.
What's weird, is that this is working just fine:
streamlink --stdout URL STREAM | iina --stdin
Oh, and then there's also the argparser issue, where you need to put a space before the player args when using the CLI, but that's related to Streamlink.
streamlink -p iina -a ' --stdin' URL STREAM
It works when you use "HLS (passthough)" in Streaming > Player input
Now streamlink has this args --twitch-low-latency
You can do
streamlink --player=/Applications/IINA.app/Contents/MacOS/IINA --player-args=--stdin --twitch-low-latency https://www.twitch.tv/fftbattleground best
worked for me.
Right now Im writing an Alfred4 workflow to open IINA from url.
The only bad part is that the terminal must be opened because the stdin argument forces this
the last version of IINA wont accept old args anymore.. to work properly now you should try
streamlink --stdout https://www.twitch.tv/fftbattleground best --twitch-low-latency | iina --stdin
In settings I set it up like this:
Video player: /Applications/IINA.app/Contents/MacOS/iina-cli
Parameters: {playerinput}-stdin
Normally --stdin
should be supplied here but if you don't include {playerinput}
somewhere then streamlink will put an additional -
at the end which IINA doesn't like. So luckily we need this -
anyway so I included it in the --player-args
like this and it works.
streamlink --stdout https://www.twitch.tv/fftbattleground best --twitch-low-latency | iina --stdin
This works for me however how do I set this up in the config so I only have to type in streamlink <twitch url> best
I've already tried it in a lot of ways but it always crashes the terminal whenever i put in stdin/stdout for some reason...
Please show exactly how it should be :)
E: I guess the problem is the pipe? how do I do that in config.
Please show exactly how it should be :)
E: I guess the problem is the pipe? how do I do that in config.
Basically do exactly what I wrote in my answer, then it should work. If you're not using the GUI but config file for streamlink it would be
player=/Applications/IINA.app/Contents/MacOS/iina-cli
player-args={playerinput}-stdin
Of course if you have "iina" available in your PATH you can make the first line to read just player=iina
The "pipe" you're referring to is just the standard input pipe and is the default behavior of streamlink so no need to specify that. But the problem is that you have to use the variable {playerinput}
somewhere inside of player-args or it won't work correctly and IINA will crash.
This 100% works, thank you very much.
it does work, but not as well as streamlink+MPV in linux. iina is several seconds behind on the stream, and seeking through the buffer is somewhat slower than on MPV+linux. --twitch-low-latency doesn't seem to have any effect.
is several seconds behind on the stream
https://streamlink.github.io/cli/plugins/twitch.html#low-latency-streaming
Since players do have their own input buffer, depending on how much data the player wants to keep in its buffer before it starts playing the stream, this can cause an unnecessary delay while trying to watch low latency streams. Player buffer sizes should therefore be tweaked via the --player-args CLI argument or via the player's configuration options.
https://github.com/streamlink/streamlink-twitch-gui/wiki/Player-configuration#custom-player-parameters