Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: IINA Player for Mac OS #480

Open
NickSharf opened this issue Jun 14, 2017 · 17 comments
Open

Feature Request: IINA Player for Mac OS #480

NickSharf opened this issue Jun 14, 2017 · 17 comments

Comments

@NickSharf
Copy link

I have a suggestion to add new Mac OS Player called IINA https://lhc70000.github.io/iina/
main
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.

@bastimeyer
Copy link
Member

IINA currently doesn't support command line parameters, which makes it unusable together with Streamlink/Livestreamer:
iina/iina#58
iina/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...

@NickSharf
Copy link
Author

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

@justgerd
Copy link

justgerd commented Sep 7, 2017

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.

@shawnbutts
Copy link

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?

@SxDx
Copy link

SxDx commented Jan 14, 2018

As of version 0.0.15 iina does support command line arguments, see iina/iina#58

It should now be possible to add support for iina.

@bastimeyer
Copy link
Member

Thanks for letting me know, @SxDx

According to iina/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:
streamlink/streamlink#1338 (comment)

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

@SheinH
Copy link

SheinH commented Feb 7, 2019

@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?

image

CLI output:

error: Failed to start player: iina (Process exited prematurely)
[cli][info] Closing currently open stream...

My streamlinkrc

player=iina
player-args=--stdin

@bastimeyer
Copy link
Member

@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

@adriel
Copy link

adriel commented Jan 15, 2020

It works when you use "HLS (passthough)" in Streaming > Player input

@tucomel
Copy link

tucomel commented Jun 11, 2020

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

@tucomel
Copy link

tucomel commented Jan 24, 2021

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

@yacode11
Copy link

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.

@315332
Copy link

315332 commented Jul 14, 2021

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.

@yacode11
Copy link

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.

@315332
Copy link

315332 commented Jul 20, 2021

This 100% works, thank you very much.

@Brog33
Copy link

Brog33 commented Apr 11, 2023

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.

@bastimeyer
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests