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

Open videos with Streamlink #42

Closed
DiegoBari opened this issue Jun 27, 2023 · 6 comments
Closed

Open videos with Streamlink #42

DiegoBari opened this issue Jun 27, 2023 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@DiegoBari
Copy link

Hello,
Its is posible to open a link sent with Party Up! with Streamlink insted of the default browser?
Can I change this behaviour?

Expl: Streamlink is command-line interface which pipes streams from various services into a video player. Avoid resource-heavy and unoptimized websites, and still enjoy streamed content.

Thanks

@DiegoBari DiegoBari added the enhancement New feature or request label Jun 27, 2023
@9001
Copy link
Owner

9001 commented Jun 27, 2023

Hey! Yes this should be possible to add, assuming I'm not misunderstanding anything :>

Just want to clarify some things first -- you would like all links that are shared to be automatically opened using streamlink on the same machine that is running the copyparty server, yeah?

And when you said "...insted of the default browser", do you mean that you already have something set up to automatically open the links in the default browser on the machine that is running copyparty? If yes, how does that work?

@9001
Copy link
Owner

9001 commented Jun 27, 2023

Come to think of it -- are you perhaps using very-bad-idea?

@DiegoBari
Copy link
Author

Hello,
Yes, I' m using Very-Bad-Idea plugin (The plugin name didn't look like an invitation to be installed 😄), and I am very happy with this!
My idea is to open youtube links with Streamlinks. Other link may continue be opened in default browser running in the CopyParty server.

Thanks 9001 by your effort!

Diego from Argentina

@9001
Copy link
Owner

9001 commented Jun 27, 2023

Haha awesome, you might be the first person to use that thing in years :> glad to hear it still works!

The name comes from this part, namely how it works and the unfortunate security-related consequences that comes with it. So running it on a LAN where you trust everyone that is able to access the server (and preferably with a password) is usually okay, but it would be a "very bad idea" to run it on a machine which anyone can upload to over the internet. And... i'm just now realizing that there should be a much better warning about this, so I'll definitely fix that by adding it to the readme 🙏

EDIT: updated the android app readme and the plugins listing with appropriate warnings.

But as for the actual feature request, absolutely! Great idea, will make it run much better on slow machines like raspberry and so. I'll add it as soon as I get the chance 👍

Thanks for using copyparty 😁

@DiegoBari
Copy link
Author

Thanks to you!!

@9001 9001 closed this as completed in e767230 Jun 28, 2023
@9001
Copy link
Owner

9001 commented Jun 28, 2023

Alright, think that's it -- there is now support for both streamlink and mpv, since mpv has built-in support for playing videos using yt_dlp, which has support for some sites / videos that streamlink doesn't.

it will try mpv first, and then streamlink, and then finally it'll use the system-default opener (which is usually the web browser).

To upgrade, you'll want to make sure you have all the dependencies installed:

apt install xdotool libnotify-bin mpv
python3 -m pip install --user -U streamlink yt-dlp

and then grab the latest copy of the plugin; for example:

curl -LO https://raw.githubusercontent.com/9001/copyparty/hovudstraum/bin/mtag/very-bad-idea.py

...or just download it manually and overwrite the old one, https://raw.githubusercontent.com/9001/copyparty/hovudstraum/bin/mtag/very-bad-idea.py

Please let me know if you hit any issues or have more ideas :-)

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

No branches or pull requests

2 participants