YoutubeExplode.Converter 6.2.10

There is a newer version of this package available.
See the version list below for details.
dotnet add package YoutubeExplode.Converter --version 6.2.10
                    
NuGet\Install-Package YoutubeExplode.Converter -Version 6.2.10
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="YoutubeExplode.Converter" Version="6.2.10" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="YoutubeExplode.Converter" Version="6.2.10" />
                    
Directory.Packages.props
<PackageReference Include="YoutubeExplode.Converter" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add YoutubeExplode.Converter --version 6.2.10
                    
#r "nuget: YoutubeExplode.Converter, 6.2.10"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package YoutubeExplode.Converter@6.2.10
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=YoutubeExplode.Converter&version=6.2.10
                    
Install as a Cake Addin
#tool nuget:?package=YoutubeExplode.Converter&version=6.2.10
                    
Install as a Cake Tool

YoutubeExplode.Converter

Version Downloads

YoutubeExplode.Converter is an extension package for YoutubeExplode that provides the capability to download YouTube videos by muxing separate streams into a single file. This package relies on FFmpeg under the hood.

Install

  • 📦 NuGet: dotnet add package YoutubeExplode.Converter

Usage

YoutubeExplode.Converter exposes its functionality by enhancing YoutubeExplode's clients with additional extension methods. To use them, simply add the corresponding namespace and follow the examples below.

Warning: This package requires the FFmpeg executable to work, which can be downloaded here. Ensure that it's located in your application's probe directory or on the system's PATH, or provide a custom location directly using various overloads.

Downloading videos

You can download a video directly through one of the extension methods provided on VideoClient. For example, to download a video in the specified format using the highest quality streams, simply call DownloadAsync(...) with the video ID and the destination path:

using YoutubeExplode;
using YoutubeExplode.Converter;

var youtube = new YoutubeClient();

var videoUrl = "https://youtube.com/watch?v=u_yIGGhubZs";
await youtube.Videos.DownloadAsync(videoUrl, "video.mp4");

Under the hood, this resolves the video's media streams, downloads the best candidates based on format, bitrate, framerate, and quality, and muxes them together into a single file.

Note: If the specified output format is a known audio-only container (e.g. mp3 or ogg) then only the audio stream is downloaded.

Warning: Stream muxing is a resource-intensive process. You can improve the execution speed by making sure that both the input streams and the output file use the same format, which eliminates the need for transcoding. Currently, YouTube provides adaptive streams only in mp4 and webm containers, with the highest quality video streams (e.g. 4K) only available in webm.

Customizing the conversion process

To configure various aspects of the conversion process, use the following overload of DownloadAsync(...):

using YoutubeExplode;
using YoutubeExplode.Converter;

var youtube = new YoutubeClient();
var videoUrl = "https://youtube.com/watch?v=u_yIGGhubZs";

await youtube.Videos.DownloadAsync(videoUrl, "video.mp4", o => o
    .SetContainer("webm") // override format
    .SetPreset(ConversionPreset.UltraFast) // change preset
    .SetFFmpegPath("path/to/ffmpeg") // custom FFmpeg location
);

Manually selecting streams

If you need precise control over which streams are used for the muxing process, you can also provide them yourself instead of relying on the automatic resolution:

using YoutubeExplode;
using YoutubeExplode.Videos.Streams;
using YoutubeExplode.Converter;

var youtube = new YoutubeClient();

// Get stream manifest
var videoUrl = "https://youtube.com/watch?v=u_yIGGhubZs";
var streamManifest = await youtube.Videos.Streams.GetManifestAsync(videoUrl);

// Select streams (1080p60 / highest bitrate audio)
var audioStreamInfo = streamManifest.GetAudioStreams().GetWithHighestBitrate();
var videoStreamInfo = streamManifest.GetVideoStreams().First(s => s.VideoQuality.Label == "1080p60");
var streamInfos = new IStreamInfo[] { audioStreamInfo, videoStreamInfo };

// Download and process them into one file
await youtube.Videos.DownloadAsync(streamInfos, new ConversionRequestBuilder("video.mp4").Build());
Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 is compatible. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 is compatible.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on YoutubeExplode.Converter:

Package Downloads
MP3DL.lib

Package Description

GitHub repositories (2)

Showing the top 2 popular GitHub repositories that depend on YoutubeExplode.Converter:

Repository Stars
Tyrrrz/YoutubeDownloader
Downloads videos and playlists from YouTube
crobibero/jellyfin-plugin-tmdb-trailers
Version Downloads Last Updated
6.5.4 9,956 3/13/2025
6.5.3 4,483 2/3/2025
6.5.2 1,684 1/25/2025
6.5.1 1,517 1/9/2025
6.5.0 3,549 12/5/2024
6.4.4 1,950 11/13/2024
6.4.3 3,221 10/3/2024
6.4.2 1,730 9/27/2024
6.4.1 921 9/18/2024
6.4.0 5,548 7/25/2024
6.3.16 6,506 5/21/2024
6.3.15 296 5/18/2024
6.3.14 1,654 4/27/2024
6.3.13 2,499 2/22/2024
6.3.12 3,930 1/18/2024
6.3.11 1,048 1/4/2024
6.3.10 700 12/27/2023
6.3.9 1,286 11/29/2023
6.3.8 989 11/23/2023
6.3.7 960 11/9/2023
6.3.6 1,200 10/17/2023
6.3.5 1,046 9/28/2023
6.3.4 1,430 9/6/2023
6.3.3 1,382 8/31/2023
6.3.2 1,083 8/18/2023
6.3.2-alpha1 651 7/30/2023
6.3.1 1,519 7/23/2023
6.3.0 742 7/20/2023
6.2.17 1,223 7/12/2023
6.2.16 1,278 6/28/2023
6.2.15 1,700 5/25/2023
6.2.14 2,062 5/2/2023
6.2.13 1,153 4/27/2023
6.2.12 1,850 3/31/2023
6.2.11 1,049 3/24/2023
6.2.10 884 3/17/2023
6.2.9 1,074 3/10/2023
6.2.8 5,376 3/1/2023
6.1.0 108,081 2/19/2022
6.0.8 13,729 2/10/2022
6.0.7 119,212 12/10/2021
6.0.6 4,770 12/9/2021
2.1.0 342,904 4/18/2021
2.0.2 2,679 12/26/2020
2.0.1 986 12/26/2020
2.0.0 2,753 10/14/2020
1.5.1 3,795 4/22/2020
1.5.0 1,344 4/13/2020
1.4.4 1,076 4/12/2020
1.4.3 4,079 7/27/2019
1.4.2 1,906 5/12/2019
1.4.1 1,820 3/3/2019
1.4.0 1,883 1/17/2019
1.3.0 1,308 1/16/2019
1.2.0 1,342 1/9/2019
1.1.0 1,267 1/8/2019
1.0.3 1,462 12/20/2018
1.0.2 1,335 12/17/2018
1.0.1 1,984 10/27/2018
1.0.0 1,440 10/27/2018