Bluegrams / YoutubeDLSharp

A simple .NET wrapper library for youtube-dl and yt-dlp
BSD 3-Clause "New" or "Revised" License
163 stars 31 forks source link

Improving RunVideoDataFetch speed? #35

Open hswlab opened 1 year ago

hswlab commented 1 year ago

Hi, is it possible to improve the fetch speed for video information in the following call somehow? var res = await ytdl.RunVideoDataFetch("https://www.youtube.com/watch?v=_QdPW8JrYzQ");

I was wondering if you could limit the information you want to get. For example, you wand just search for the title, thumbnail and the format list of a single video.

alxnull commented 1 year ago

Hey, I think improving the speed of video information fetching would mainly happen on the yt-dlp side as it is responsible for extracting & parsing the video information and passing it in json format. RunVideoDataFetch() uses yt-dlp's --dump-json for fetching video information, which always returns the full data. I'm not aware of an option that extracts & returns partial data to make it faster. Let me know if you have any suggestions regarding this though.