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
7.98k stars 643 forks source link

Improve sound quality yewtube + mpv #1232

Closed ghost closed 1 year ago

ghost commented 1 year ago

for this to work you need yewtube using mpv

this is a audio only profile

"set show_video true"

"set playerargs --video=no --ytdl-format=best/22+140 --volume=95"

this is a video profile

"set show_video true"

"set playerargs --ytdl-format=best/22+140 --volume=95"

Or use /mpv/mpv.conf file audio only

"set playerargs"

"set show_video true"

video=no cache=yes demuxer-readahead-secs=15 hwdec=yes cache-pause-wait=10 demuxer-cache-wait=no cache-on-disk=no script-opts="ytdl_hook-try_ytdl_first=yes" ytdl-format=best/22+140 volume=95

Or use /mpv/mpv.conf file video

"set playerargs"

"set show_video true"

cache=yes demuxer-readahead-secs=15 hwdec=yes cache-pause-wait=10 demuxer-cache-wait=no cache-on-disk=no script-opts="ytdl_hook-try_ytdl_first=yes" ytdl-format=best/22+140 volume=95

Download music at 44.1 kHz and video at 720p if available

"set encoder 1"

you need to edit the yewtube pafy.py file

type yt press enter then quickly press ctrl c

see if you can find the directory mps_youtube

go into that directory and edit pafy.py

on line 56

ytdl_format_options['format'] = 'bestaudio/best'

chnage to

ytdl_format_options['format'] = 'best/22+140'

save, enjoy