mps-youtube / yewtube

yewtube, forked from mps-youtube , is a Terminal based YouTube player and downloader. No Youtube API key required.
GNU General Public License v3.0
8.07k stars 648 forks source link

Feature request: Pipe youtube url straight to mpv #948

Open Carl-Robert opened 5 years ago

Carl-Robert commented 5 years ago

The default playing mode with mpv should be just piping the youtube watchpage url to mpv and let the program work its magic on it. Should fix the issue #942 with video stuck to 640x360 and any potential troubles with updating youtube-dl on Windows precompiled exe.

So make mpsyt act simply as a youtube browser/searcher which will pipe the whole url to mpv untouched for playing, there's seriously no need for "decrypting" the video-stream first.

Naahuel commented 5 years ago

I don't like this.

I use mpsyt on a Raspberry pi 3 with no graphical interface. mpv would simply fail to output any video:

2019-02-21_00-47

I setup mpsyt to use omxplayer which is a HW accelerated player built exclusively for the Raspberry Pi and it works great without a graphical interface. This player is simply mind blowing because you can watch high resolution videos on a really tiny computer and it outputs directly to hardware and it lets you do crazy things like cropping in real time, output the video to a section of the screen or setting alpha so your terminal is still visible, all this on a system without a graphical interface:

img_20190221_005117131

I think mpsyt is a program that makes it possible to play youtube videos on platforms like the Raspberry Pi (or other platforms that simply can't handle youtube on a browser). Otherwise just use your browser...

ritiek commented 5 years ago

@Naahuel I do not know about real-time cropping, etc. but mpv has an option --vo=drm which allows you to output vidoes without a graphical interface.

Naahuel commented 5 years ago

I'm aware of that option but never got it to work on the Raspberry Pi. It seems to be possible to build mpv to use hardware decoding and I guess in my case it'd be worth it if it'd mean being able to play higher resolution videos.

On the other hand, if this gets implemented I guess we would lose the ability to set mpsyt to use any other player?

Carl-Robert commented 5 years ago

@Naahuel The idea was to use the direct pipe to mpv when mpv is used as a player using the set player command. So other players shouldn't be affected with that implementation.