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

Streaming and Seeking Problem #10642

Closed
emrakyz opened this issue Sep 13, 2022 · 3 comments
Closed

Streaming and Seeking Problem #10642

emrakyz opened this issue Sep 13, 2022 · 3 comments

Comments

@emrakyz
Copy link

emrakyz commented Sep 13, 2022

  • Platform: High-end desktop PC (nvidia GPU) with a low ping ethernet network connection (100 megabits/s).
  • OS: Arch Linux with the standard linux kernel and linux-headers; all recently updated.
  • Using cloudflare DNS (1.1.1.1). I have also tried default DNS or VPN connections.
  • I recently installed 'MPV' and 'ffmpeg' through Arch Linux Package Manager with pacman -Syyu ffmpeg mpv. Then I also recently installed 'yt-dlp' through GitHub.
  • I don't use any scripts for MPV and my mpv.conf file has:
--vo=gpu
--gpu-api=vulkan
--hwdec-codecs=all
--hwdec=nvdec
--cache=yes
--sub-font='Arial'
--sub-scale=0.7
--cache-secs=1200
--script-opts-append=ytdl_hook-try_ytdl_first=yes

Normally, MPV works great. But for streaming content from the network; downloading speed is really slow and seeking takes considerably longer time than on the browser. The speeds I get:

Downloading speed in 'yt-dlp': ~13.000kbps
Streaming speed on the browser (librewolf): ~5.000kbps / Seeking is instant (0.01s) even in 8K60FPS videos.
Streaming speed on MPV: ~250kbps / Seeking can take up to 15 seconds for longer videos (3hr 1080p video). It's impossible to watch a video with 2.14x speed without stuttering.

Downloading with yt-dlp and piping it to MPV with yt-dlp 'https://www.youtube.com/watch?v=abc' -o - | mpv - seems to solve the issue but then I can't see the sections of the video and can't seek ahead.

I am aware that this problem has nothing to do with MPV directly but I am hoping to get recommendations from the developers and the other users in terms of improvements. I don't mind power efficiency or high network bandwidth usage if that would be the case.

Thanks for the great software.

@guidocella
Copy link
Contributor

#8655 (comment)

@emrakyz
Copy link
Author

emrakyz commented Sep 13, 2022

#8655 (comment)

--ytdl-format=best works amazing. Instant seeking and extremely fast downloading speed. Is this because of we don't need ffmpeg here since we have a a video that also has audio?

It's sad that the biggest resolution with audio and video on YouTube is 720p. I wish to find a way for higher resolutions too.

Thanks!

@guidocella
Copy link
Contributor

Youtube just decided not to throttle the streams with both video and audio, presumably for compatbility with old devices that can only play those.

For 1080p someone needs to implement downloading 10MB at a time in ffmpeg.

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

No branches or pull requests

3 participants