dotnettools / SharpGrabber

Download from YouTube, Vimeo, HLS (M3U8 files) and more with .NET and JavaScript - Library and desktop app for downloading high quality media
GNU Lesser General Public License v3.0
314 stars 46 forks source link

Support 4K Videos #31

Open babakmdi opened 3 years ago

javidsho commented 3 years ago

A sample would be https://www.youtube.com/watch?v=LXb3EKWsInQ

babakmdi commented 3 years ago

hello javid. 4k videos have no audio , why? it's just only video! is there anyway to download 4k videos with audio?

javidsho commented 3 years ago

Hello there, I haven't looked into that but it should be possible.

Jeager2 commented 2 years ago

From what I had read, Youtube only provides Muxed video+ Audio files up to 720p... all higher resolutions need to be downloaded and Muxed together with an audio file that you download.

(Media streams come in 3 forms -- Muxed (video & audio), Audio (audio only) and Video (video only). Highest qualities are not available in muxed streams so you'll have to download separate streams and multiplex them yourself using tools like ffmpeg.)

Use ffmpeg that SharpGrabber provides:

var merger = new MediaMerger(outputPath); if (audioPath != "") { merger.AddStreamSource(audioPath, MediaStreamType.Audio); } merger.AddStreamSource(videoPath, MediaStreamType.Video); merger.OutputMimeType = videoStream.Format.Mime; merger.OutputShortName = videoStream.Format.Extension; merger.Build();