MPV + Youtube HW Working

Post Reply
User avatar
jart25
Posts: 94
Joined: Sat Jul 11, 2020 1:42 am
languages_spoken: english
ODROIDs: N2
Has thanked: 8 times
Been thanked: 11 times
Contact:

MPV + Youtube HW Working

Post by jart25 »

I have used mpv + youtube link and it works really fine, using gpu decode?

mpv --ytdl-format="bestvideo[ext=mp4][fps<=?30][height<=?1080]+bestaudio[ext=m4a]" url (30 fps)
mpv --ytdl-format="bestvideo[ext=mp4][fps<=?60][height<=?1080]+bestaudio[ext=m4a]" url (60fps)
Attachments
Youtube H264.png
Youtube H264.png (1.42 MiB) Viewed 301 times
Last edited by jart25 on Mon Jul 05, 2021 5:20 am, edited 1 time in total.

User avatar
jart25
Posts: 94
Joined: Sat Jul 11, 2020 1:42 am
languages_spoken: english
ODROIDs: N2
Has thanked: 8 times
Been thanked: 11 times
Contact:

Re: MPV + Youtube HW Working

Post by jart25 »

UPDATE:
https://github.com/trizen/pipe-viewer
yay -S pipe-viewer-git archlinux

Menu -> Preferences Edit to:
dash => 0,
prefer_av1 => 0,
prefer_fork => 0,
prefer_invidious => 0,
prefer_m4a => 1,
prefer_mp4 => 1,
ignore_av1 => 1,

Edit your MPV default configuration to:
~/.config/mpv/mpv.conf
hwdec=auto
hwdec-codecs=all

Enjoy youtube using a lite experience and GPU decode by h264 :)
Attachments
Gtk PipeViewer Custom.png
Gtk PipeViewer Custom.png (1.41 MiB) Viewed 261 times

User avatar
mctom
Posts: 440
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 48 times
Been thanked: 41 times
Contact:

Re: MPV + Youtube HW Working

Post by mctom »

I do it all the time. I recommend "Open With" plugin for Firefox, that lets you open a link in an external program.
I have two options, for youtube movies and music (downloads audio only):

mpv --fs --ytdl-format="bestvideo[height<=?1500]+bestaudio/best" %s
foot mpv --ytdl-format="bestaudio/best" %s

The video version is selected for my 2K display, and I think yours would also benefot from 1500 rather than 1080.
The latter is being opened in "foot" terminal, but can be substituted with xterm or whatever.

Thanks for pointing out pipe-viewer, i've been long waiting for anything like it.
These users thanked the author mctom for the post:
jart25 (Mon Jul 05, 2021 6:22 am)
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

User avatar
jart25
Posts: 94
Joined: Sat Jul 11, 2020 1:42 am
languages_spoken: english
ODROIDs: N2
Has thanked: 8 times
Been thanked: 11 times
Contact:

Re: MPV + Youtube HW Working

Post by jart25 »

mctom wrote:
Mon Jul 05, 2021 6:03 am
I do it all the time. I recommend "Open With" plugin for Firefox, that lets you open a link in an external program.
I have two options, for youtube movies and music (downloads audio only):

mpv --fs --ytdl-format="bestvideo[height<=?1500]+bestaudio/best" %s
foot mpv --ytdl-format="bestaudio/best" %s

The video version is selected for my 2K display, and I think yours would also benefot from 1500 rather than 1080.
The latter is being opened in "foot" terminal, but can be substituted with xterm or whatever.

Thanks for pointing out pipe-viewer, i've been long waiting for anything like it.
Can you test that flags on your firefox?
media.av1.enabled=false
media.av1.use-dav1d=false
media.ffmpeg.vaapi.enabled=true
media.ffvpx.enabled=false
media.mediasource.vp9.enabled=false
media.peerconnection.video.vp9_enabled=false
With that flags my firefox use a 20-30% in youtube
Attachments
108030fps.png
108030fps.png (1.15 MiB) Viewed 247 times
Nerd.png
Nerd.png (1.33 MiB) Viewed 247 times
lowCpuUsage.png
lowCpuUsage.png (1.37 MiB) Viewed 251 times

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 2 guests