Open babakmdi opened 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?
Hello there, I haven't looked into that but it should be possible.
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();
A sample would be https://www.youtube.com/watch?v=LXb3EKWsInQ