SharpGrabber icon indicating copy to clipboard operation
SharpGrabber copied to clipboard

Support 4K Videos

Open babakmdi opened this issue 4 years ago • 4 comments

babakmdi avatar May 30 '21 19:05 babakmdi

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

javidsho avatar Jun 01 '21 21:06 javidsho

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

babakmdi avatar Jun 02 '21 18:06 babakmdi

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

javidsho avatar Jun 02 '21 19:06 javidsho

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();

Jeager2 avatar Oct 18 '21 03:10 Jeager2