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

Cannot Open youtube video after update to version 1.1.2 #3337

Closed
YuhaoT opened this issue Feb 28, 2021 · 25 comments
Closed

Cannot Open youtube video after update to version 1.1.2 #3337

YuhaoT opened this issue Feb 28, 2021 · 25 comments

Comments

@YuhaoT
Copy link

YuhaoT commented Feb 28, 2021

I recently just update iina to version 1.1.2 and suddenly it cannot load youtube playlist or youtube video. I tried to update my youtube-dl, but it doesn't solve the problem. Is there anything else that I can do?

@piratx
Copy link

piratx commented Mar 1, 2021

I am having the same issue with the latest version of macOS 11.2.2 and IINA 1.1.2 (build 28). I always get the error "Cannot open file or stream!"
I've tried from the console forced the cli command and it's still the same error.

IINA.app/Contents/MacOS/iina-cli 'https://youtube.com/video-link'

@JayBrown
Copy link

JayBrown commented Mar 1, 2021

First remark: IINA is currently at v1.2.0.

I have symlinked $HOME/Applications/IINA.app/Contents/MacOS/iina-cli as /usr/local/bin/iina with an absolute path.

In Firefox (via the OpenWith extension) I execute: /usr/local/bin/iina --no-stdin (note: OpenWith will automatically add the URL as arguments)

In iTerm I can execute either iina '<URL>' or iina --no-stdin '<URL>'. Both work fine.

@piratx
Copy link

piratx commented Mar 1, 2021

Haven't updated to 1.2.0 yet.

I have the same symlinks :)

Screen Shot 2021-03-01 at 5 01 30 PM

@JayBrown
Copy link

JayBrown commented Mar 1, 2021

We had a similar issue here: #2086

One workaround before the fix was to install expect with Homebrew and execute:

unbuffer -p /usr/local/bin/iina '<URL>'
or
unbuffer -p /Applications/IINA.app/Contents/MacOS/iina-cli '<URL>'

But that was just a workaround for a non-interactive shell, which shouldn't be relevant for our case, i.e. executing it directly in iTerm/Terminal.

@JayBrown
Copy link

JayBrown commented Mar 1, 2021

Uhm, I just checked the video from your screengrab, and the YouTube video is unavailable, so no wonder iina can't open it. ;D

@piratx
Copy link

piratx commented Mar 1, 2021

What? :-P

It's working just fine here: https://www.youtube.com/watch?v=kqLYgzKKP0Q

@JayBrown
Copy link

JayBrown commented Mar 1, 2021

Oh, right, sorry… TextSniper didn't get the ID correct: it had 00 instead of 0Q at the end.

@piratx
Copy link

piratx commented Mar 1, 2021

Software isn't always better than 👀

@YuhaoT
Copy link
Author

YuhaoT commented Mar 8, 2021

I can open the youtube link after brew upgrade iina. Looks like there are some packages were out-dated. Thanks guys :)

@piratx
Copy link

piratx commented Mar 8, 2021

@YuhaoT It worked with unbuffer or just iina-cli?
I have upgraded everything here but still its a no-go :(

Big Sur 11.2.2 and IINA last version.

@YuhaoT
Copy link
Author

YuhaoT commented Mar 8, 2021

I'm not familiar with the shell command so I just use the iina app downloaded through homebrew. But the issue that cannot open Youtube link on app version 1.1.2 has been fixed.

@piratx
Copy link

piratx commented Mar 8, 2021

Open URL from the app doesn't work either here :(

@amitjethani
Copy link

I'm on IINA 1.1.2 and I'm unable to open a YouTube video via the Safari Extension as well

@piratx
Copy link

piratx commented Mar 11, 2021

Same error?

@amitjethani
Copy link

amitjethani commented Mar 12, 2021

@piratx yes. Steps to repro:

  • Open any YouTube video
  • Click on "Open in IINA" button on the Safari toolbar
  • IINA launches and shows spinner with the correct YouTube link. "Opening stream..." with the spinner are shown.
  • Error modal pops up: Error: Cannot open file or stream!

Environment: macOS Big Sur 11.2.2. Safari 14.0.3. IINA (installed via brew) 1.1.2 Build 128.

@piratx
Copy link

piratx commented Mar 12, 2021

Yeap, same here! Have you tried the unbuffer solution?
#3337 (comment)

@amitjethani
Copy link

I just tried that and it did not work for me unfortunately :(

$ brew install expect
==> Pouring expect-5.45.4_1.big_sur.bottle.tar.gz
🍺  /usr/local/Cellar/expect/5.45.4_1: 49 files, 777.8KB

$ unbuffer -p /usr/local/bin/iina 'https://www.youtube.com/watch?v=2-TUIfpfjkM'

IINA opens up with the spinner. Same error "Cannot open file or stream!"

@piratx
Copy link

piratx commented Mar 12, 2021

Ok, we have exactly the same problem.

@E8D08F
Copy link

E8D08F commented Mar 12, 2021

I solve it by:

  1. Upgrade youtube-dl and iina to the newest versions;
  2. Copy the directory (NOT full path) from which youtube-dl to Preference > Network > Custom youtube-dl path field in IINA.app (like /usr/local/bin/).

BTW, if you want to execute iina with url in somewhere else, use the parametre --no-stdin like iina --no-stdin $(pbpaste).

@amitjethani
Copy link

@toto-minai this solution worked for me! That makes me think the bundled youtube-dl library is just out of date.

@piratx
Copy link

piratx commented Mar 12, 2021

YES! YES! It worked!! 🥇
I had the full path instead of /usr/local/bin/

@cjamcu
Copy link

cjamcu commented Mar 14, 2021

I solve it by:

  1. Upgrade youtube-dl and iina to the newest versions;
  2. Copy the directory (NOT full path) from which youtube-dl to Preference > Network > Custom youtube-dl path field in IINA.app (like /usr/local/bin/).

BTW, if you want to execute iina with url in somewhere else, use the parametre --no-stdin like iina --no-stdin $(pbpaste).

YES! YES! It worked!!. Thanks 😊

@Russ-McClelland
Copy link

I was able to get the app to play a song from the playlist. Be sure to put the trailing '/' (contrary this the example here: https://github.com/iina/iina/wiki/Use-youtube-dl-with-IINA).

When you paste a URL with a video, playlist, and index number, should it play the other songs in the list? Mine will only play the first song.

@YuhaoT YuhaoT closed this as completed Jun 21, 2021
@Write
Copy link

Write commented Mar 13, 2022

Kinda unrelated but finally got yt-dlp working with IINA.

brew install yt-dlp
ln -s /opt/homebrew/bin/yt-dlp /opt/homebrew/bin/youtube-dl

And finally add /opt/homebrew/bin/ path in Preference > Network > Custom youtube-dl path

@YuhaoT
Copy link
Author

YuhaoT commented Mar 11, 2023

If you cannot find the bin dir at/opt/homebrew/, try /usr/local/bin.
The approach is same for other youtube-dl forks and is described in #3180

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

No branches or pull requests

8 participants