- Fixed an issue where calling
StreamClient.GetManifestAsync(...)failed on some videos with an error sayingThe format of value is invalid.
- Added support for providing cookies directly to
YoutubeClientwith the help of two new constructor overloads:new YoutubeClient(IReadOnlyList<Cookie> initialCookies)andnew YoutubeClient(HttpClient http, IReadOnlyList<Cookie> initialCookies). You will still need to obtain the cookies yourself (see the readme for some guidance), but YoutubeExplode will take care of generating the required headers and sending them with every request.
- Changed the implementation of the
HttpMessageHandlerused by default inYoutubeClientfromHttpClientHandlertoSocketsHttpHandleron platforms that support it. - Fixed an issue where certain system playlist IDs were considered invalid, such as
LL.
- Fixed an issue where
ClosedCaptionClient.WriteToAsync(...)andClosedCaptionClient.DownloadAsync(...)produced invalid SRT timestamps for caption tracks that exceeded 24 hours in length. - [Converter] Fixed an issue where processing a video longer than 24 hours failed with an error or resulted in a deadlock.
- [Converter] Reduced the amount of irrelevant output that is displayed as part of an error message when FFmpeg fails to process a video.
- Fixed an issue where calling
StreamClient.GetManifestAsync(...)failed on some videos with an error sayingCould not get cipher manifest.
- Fixed an issue where an attempt to read a media stream sometimes resulted in a
403 Forbiddenerror.
- Improved support for older target frameworks via polyfills.
- Fixed an issue where calling
VideoClient.GetAsync(...)failed withCould not extract video upload dateon certain videos. - Fixed an issue where retrieving metadata for a video that didn't have a title failed with
Could not extract video title. This affected metadata obtained for specific videos, videos inside playlists, or channel uploads. Apparently, videos on YouTube may sometimes not have a title, which should not be considered an error.
- Fixed an issue which caused the library to throw an exception when trying to use it in an application built with assembly trimming enabled.
- Fixed an issue where trying to read a stream returned by
StreamClient.GetAsync(...)resulted in an exception when targeting the legacy .NET Framework.
- [Converter] Added support for providing more than 2 input streams, when using the manual overload of
VideoClient.DownloadAsync(...). This allows you to download a video with multiple audio and/or video tracks, and switch between them in the player.
- Fixed an issue where the streams returned by
StreamClient.GetAsync(...)were very slow to read, due to recent YouTube changes. - Fixed an issue where two instances of
VideoQualitywere incorrectly treated as equal if they had the sameMaxHeightandFrameratebut differentLabel. That meant that, for example, a1080p60and1080p60 HDRplayback options were considered the same when filtering available streams by quality.
- Added more built-in retry policies to resolve transient errors, such as internal server errors (5XX status codes), abruptly closed connections, broken streams, etc.
- Fixed an issue where an attempt to retrieve a stream occasionally failed with a
403 Forbiddenerror. - [Converter] Fixed an issue where downloading a video as an
mp3file sometimes resulted in lower bitrate than the original audio.
- Fixed an issue where empty text blocks in closed caption tracks were ignored. This makes the behavior consistent with YouTube's player, where empty closed captions are still rendered.
- Fixed an issue where
ChannelSlug.Parse(...)failed on URLs that had encoded special characters.
- Fixed incorrect targets file name.
- Added support for retrieving channel metadata using channel handle or URL. You can do that via
ChannelClient.GetByHandleAsync. To parse a channel handle out of a URL, useChannelHandle.Parse(...). (Thanks @Holger Schmidt) - Added a build check that prevents the package from being used on the territory of a terrorist state.
- Implemented a workaround for resolving media streams for age-restricted videos. This workaround is not perfect and may still not work in some cases, but it should allow you to download age-restricted videos most of the time. (Thanks @Roberto Blázquez)
- Fixed an issue where calling
StreamClient.GetManifestAsync(...)failed with an error sayingThe following content is not available on this app. (Thanks @Curtis Caulfield)
- Added support for retrieving channel metadata using a custom channel URL. You can do that via
ChannelClient.GetBySlugAsync(...). To parse a channel slug out of a custom channel URL, useChannelSlug.Parse(...).
- Updated documentation on
Engagement.DislikeCountandEngagement.AverageRatingto indicate that dislikes are not supported. - Obsoleted
Author.Titlein favor ofAuthor.ChannelTitlefor consistency with other properties. - [Converter] Fixed an issue where downloading a video with subtitles resulted in a truncated video file.
- Fixed an issue which caused
MissingMethodExceptionto be thrown when using YoutubeExplode from a project with assembly trimming enabled.
- Added
IsAudioOnlyproperty toContainer. If this property evaluates totrue, the container is guaranteed to not contain any video streams. If it evaluates tofalse, the container may or may not contain video streams. - [Converter] Added an overload of
VideoClient.DownloadAsync(...)that allows muxing specified streams and closed caption tracks into a single container. Closed captions are embedded inside the container as soft subtitles. - [Converter] Obsoleted
Container.IsAudioOnly()extension method. Use the newly added property instead.
- Added handling for video URLs in YouTube Shorts format. (Thanks @wellWINeo)
- Added support for retrieving metadata of mix playlists using
PlaylistClient.GetAsync(...). (Thanks @Roberto Blázquez) - Added
ChannelUrlproperty toAuthor. - Fixed an issue where attempting to retrieve certain auto-generated closed caption tracks threw an exception because of malformed data structure in the manifest. (Thanks @AlmightyLks)
- [Converter] Obsoleted
YoutubeExplode.Converter.ConversionFormattype. Going forward, useYoutubeExplode.Videos.Streams.Containerinstead.
- Added an overload for
SearchClient.GetResultBatchesAsync(...)that accepts aSearchFilterparameter. This parameter can be used to limit the query to only certain type of results (videos, playlists, channels) and avoid redundant requests. - Updated implementations of
SearchClient.GetVideosAsync(...),SearchClient.GetPlaylistsAsync(...), andSearchClient.GetChannelsAsync(...)to use the new overload. These methods should now execute faster on search queries that normally contain mixed results. - [Converter] Fixed an issue where downloading a video to an
mp3file incorrectly recorded the duration of the file as double of what it's supposed to be.
- Fixed an issue which caused
Seek(...)method on streams returned fromStreamClient.GetStreamAsync(...)to move the stream into incorrect position. - Fixed an issue which caused an exception when parsing closed captions that don't have timing information. (Thanks @dbakuntsev)
- Fixed an issue which caused an exception when handling videos that had escape characters inside player config's JSON payload. (Thanks @wleader)
- Fixed an issue where the streams returned from
StreamClient.GetStreamAsync(...)were very slow to read. (Thanks @Roberto Blázquez)
- Fixed an issue where calling
ClosedCaptionsClient.GetManifestAsync(...)failed with 404 HTTP error due to recent YouTube changes.
- Fixed an issue where
StreamClient.GetHttpLiveStreamUrlAsync(...)threw exceptions when called on valid live streams. - Fixed an issue where the version of YoutubeExplode targeting .NET 5 unnecessarily had
System.Text.Jsonlisted as a dependency.
- Fixed an issue where trying to get stream or closed caption manifest failed on some videos with 404 HTTP error due to recent YouTube changes.
- Fixed an issue where some videos contained incorrect video quality labels.
Known issues: StreamClient.GetHttpLiveStreamUrlAsync(...) does not work and throws exceptions on every video, including valid livestreams (#566).
- Fixed an issue where trying to get stream manifest of videos with HDR streams failed with exception.
- Fixed an issue where trying to get stream manifest failed on some videos with 404 HTTP error due to recent YouTube changes.
- Fixed an issue where trying to get stream manifest occasionally resulted in a
FormatException. - Fixed an issue where some required cookies were not passed along with requests, which caused them to fail.
- Fixed an issue where an attempt to get playlist metadata or playlist videos resulted in an exception, due to YouTube's recent changes.
- Fixed an issue where an attempt to get videos returned by a search query resulted in an exception, due to YouTube's recent changes.
- Fixed an issue where an attempt to get video metadata resulted in an exception, due to YouTube's recent changes.
- Fixed an issue where some age-restricted videos were reported as unplayable, due to YouTube's recent changes.
- Fixed an issue where
av01-encoded video-only streams were occasionally missing from the resolved stream manifest. - Fixed many other issues brought on by recent YouTube changes.
- Changes to videos:
- Changed
Video.Durationto a nullable property. It may benullon videos that haven't finished yet (i.e. ongoing livestreams). - Changed
Video.Authortype fromstringtoAuthorobject, which encapsulates both channel ID and channel title. RemovedVideo.ChannelId. - Changed
Video.Thumbnailstype fromThumbnailSettoIReadOnlyList<Thumbnail>. - Removed public constructor from
VideoId. To create an instance ofVideoId, useVideoId.Parse(...),VideoId.TryParse(...), or the implicit conversion fromstringtoVideoId. - Changes to streams:
- Removed
IStreamInfo.Tagproperty. - Reworked
VideoQualityinto a struct (from an enum) which encapsulates video quality label, maximum height, and framerate. RemovedIVideoStreamInfo.VideoQualityLabelandIVideoStreamInfo.Frameratein favor of this new consolidated type. - Renamed extension method
WithHighestBitrate(...)toTryGetWithHighestBitrate(...). Also addedGetWithHighestBitrate(...)which does not returnnull, but instead throws if the source sequence is empty. - Renamed extension method
WithHighestVideoQuality(...)toTryGetWithHighestVideoQuality(...). Also addedGetWithHighestVideoQuality(...)which does not returnnull, but instead throws if the source sequence is empty. - Changed the behavior of
TryGetWithHighestVideoQuality(...)andGetWithHighestVideoQuality(...)extension methods so that they now also take into account the framerate of the stream. - Removed
GetAllVideoQualityLabels(...)extension method.
- Removed
- Changes to closed captions:
- Added
ClosedCaptionManifest.GetByLanguage(...). It works likeClosedCaptionManifest.TryGetByLanguage(...)but throws an exception in case of failure instead of returningnull. - Added
ClosedCaptionTrack.GetByTime(...). It works likeClosedCaptionTrack.TryGetByTime(...)but throws an exception in case of failure instead of returningnull. - Added
ClosedCaption.GetPartByTime(...). It works likeClosedCaption.TryGetPartByTime(...)but throws an exception in case of failure instead of returningnull.
- Added
- Changed
- Changes to playlists:
- Changed
Playlist.Authortype toAuthor. Note that this property is nullable because auto-generated playlists (mixed, topics, etc.) don't have an author. - Changed
Playlist.Thumbnailstype fromThumbnailSettoIReadOnlyList<Thumbnail>. - Videos contained within playlists are now of type
PlaylistVideoinstead ofVideo. PlaylistVideoimplementsIVideointerface, which outlines properties shared withVideo.PlaylistVideono longer contains some of the properties available onVideo, specifically:UploadDate,Description,Keywords, andEngagement.- Changed
PlaylistVideo.Authortype toAuthor. - Added
PlaylistClient.GetVideoBatchesAsync(...)which returns videos in batches, each encompassing one response from YouTube. - Removed the previously available parameters for specifying starting page and page count on
PlaylistClient.GetVideosAsync(...). It is no longer possible to specify the starting page altogether because the new endpoint used by YoutubeExplode does not have the concept of pages. If you need manual control over how many requests you make, usePlaylistClient.GetVideoBatchesAsync(...)instead. - Removed public constructor from
PlaylistId. To create an instance ofPlaylistId, usePlaylistId.Parse(...),PlaylistId.TryParse(...), or the implicit conversion fromstringtoPlaylistId.
- Changed
- Changes to search:
- Search functionality is now using a different endpoint, which also returns channels and playlists in addition to just videos.
- Added
VideoSearchResult,PlaylistSearchResult, andChannelSearchResultto represent the different possible result types. They implementIVideo,IPlaylist, andIChannelrespectively. - Added
SearchClient.GetResultsAsync(...)which returns instances ofISearchResult. You will need to match the instance with one of its possible implementations (VideoSearchResult,PlaylistSearchResult, orChannelSearchResult) to extract detailed information. - Added
SearchClient.GetResultBatchesAsync(...)that provides more granular control over how many requests are sent to YouTube, similar toPlaylistClient.GetVideoBatchesAsync(...). - Added additional methods to filter results by type:
SearchClient.GetVideosAsync(...),SearchClient.GetChannelsAsync(...), andSearchClient.GetPlaylistsAsync(...). Under the hood, these methods callSearchClient.GetResultsAsync(...).
- Changes to channels:
- Removed
Channel.LogoUrlin favor ofChannel.Thumbnailsof typeIReadOnlyList<Thumbnail>. - Removed public constructor from
ChannelId. To create an instance ofChannelId, useChannelId.Parse(...),ChannelId.TryParse(...), or the implicit conversion fromstringtoChannelId. - Removed public constructor from
UserName. To create an instance ofUserName, useUserName.Parse(...),UserName.TryParse(...), or the implicit conversion fromstringtoUserName.
- Removed
- Renamed
VideoResolutiontoResolutionand moved it fromYoutubeExplode.Video.Streamsnamespace toYoutubeExplode.Common. This type is now also used inThumbnailto specify the size of the thumbnail image. - Added
TryGetWithHighestResolution(...)andGetWithHighestResolution(...)extension methods onIEnumerable<Thumbnail>. These methods return the thumbnail with the highest resolution by area (width multiplied by height). - Moved extension methods that enable
awaitexpressions on certainIAsyncEnumerable<T>instances fromYoutubeExplodenamespace toYoutubeExplode.Common. Remember to add corresponding using directive for this namespace when working with playlists or search. - Renamed
BufferAsync(...)extension method toCollectAsync(...). - Added
CancellationTokenparameter to all asynchronous client methods where it was previously missing. - Consolidated exceptions into fewer types.
Thanks to @d4n3436, @Benjamin K., and @Baimbekka who helped find workarounds for recent YouTube breakages by submitting pull requests. Your contribution is very appreciated!
- Fixed an issue where some age-restricted videos were reported as unplayable, due to YouTube's recent changes.
- Fixed an issue where trying to get stream manifest resulted in an exception sometimes.
- Fixed numerous issues related to stream extraction caused by recent YouTube changes.
- Improved memory usage when downloading streams.
- Updated package icon. (Thanks @Khalid Abuhakmeh)
- Added a specialized
PlaylistUnavailableExceptionthat gets thrown when the requested playlist is private, doesn't exist, or otherwise unavailable. (Thanks @Brandon Wood) - Fixed an issue where streams without rate-limiting did not properly support seeking. (Thanks @Johnson Pan)
- Fixed an issue where some age-restricted videos were reported as unplayable, due to YouTube's recent changes.
- Fixed an issue with player config extraction for some videos.
- Fixed an issue where an exception was thrown when using video search. (Thanks @Mattia & @Unreal852)
- Fixed an issue where some age-restricted videos could not be played, due to a change in the way STS (signature timestamp) is formatted in the player source.
- Improved performance in
VideoClient.GetAsync. (Thanks @SnGmng) - Fixed an issue where an exception "Could not find signature decipherer definition body" was thrown, due to recent YouTube changes. (Thanks @Tymoteusz Jankowski and @OMANSAK)
- Added overload for
SearchClient.GetVideosAsync()that can be used to specify starting page and page count, if you only want a subset of results. (Thanks @Tom PoLáKoSz) - Fixed an issue where an exception "Could not find signature decipherer definition body" was thrown, due to recent YouTube changes.
- Fixed an issue where age-restricted videos could not be downloaded.
- Fixed an issue where
PlatformNotSupportedExceptionwas thrown when targeting Blazor WASM.
- Added
ChannelIdproperty to theVideoobject. (Thanks @Tom PoLáKoSz) - Added
Thumbnailsproperty to thePlaylistobject. The playlist's thumbnail is the same as the thumbnail of its first video. If the playlist is empty, then this property isnull. (Thanks @Halil)
- Fixed an issue where sometimes the content length of a stream was equal to
1due to an error in parsing. - Fixed an issue where an exception was thrown on videos that contained unplayable media streams. These streams are now ignored.
- Fixed an issue where trying to get stream manifest on 360° videos resulted in an exception.
- Fixed an issue where
Engagement.ToString()was incorrectly formatting likes and dislikes. (Thanks @bcook254)
- Fixed an issue where the search query was not correctly escaped in
SearchClient. (Thanks @Calle) - Fixed an issue where an exception "The given key was not present in the dictionary" was thrown when trying to get streams for some videos, due to recent YouTube changes.
- Fixed an issue where streams couldn't be extracted for some videos.
- Added
TryParsestatic method toChannelId,UserName,PlaylistId,VideoIdobjects. - Added an extension method to make it simpler to buffer an asynchronous list of videos in-memory. You can now do
var videos = await youtube.Playlist.GetVideosAsync(...)on top of enumerating it withawait foreach. The readme has been updated with new usage examples. - Simplified exception messages.
- Extended
ClosedCaptionwithPartsproperty that contains separate parts of a caption, along with their individual timings. Note that not all tracks contain this information. - Fixed an issue where searching for videos sometimes failed with an exception.
- Added missing operators for
FileSize,Bitrate,Framerate,VideoResolution,Container,Language,VideoId,PlaylistId,ChannelId,UserName.
- Reworked the entire library from the ground up.
- Video, playlist, channel IDs and usernames are now encapsulated in corresponding domain objects. This means that you no longer have to parse IDs manually -- e.g. if a method accepts a parameter of type
VideoId, you can either specify an ID (bnsUkE8i0tU) or a URL (https://youtube.com/watch?v=bnsUkE8i0tU). - Playlist videos and search results are now returned as
IAsyncEnumerableso you can enumerate through them without worrying about making too many or too few requests. If you want to buffer them in-memory, you can use an extension method calledBufferAsync(). - Improved exceptions, exception messages, and everything related to exceptions. Additionally, all exception types now derive from
YoutubeExplodeException, making them easier to catch. - Added built-in retry mechanisms to work around transient errors on YouTube's side.
- Improved resilience of the library in general.
- Fixed an issue where attempts to download some videos were periodically causing
403 Forbidden. - Fixed a metric ton of YouTube-related issues.
- Many, many others improvements that I didn't think to mention.
- Dropped .NET Framework v4.5 target in favor of v4.6.1 and .NET Standard v1.1 target in favor of v2.0.
- Fixed an issue where attempts to download some videos were periodically causing
403 Forbidden.
- Fixed some issues revolving around videos marked with "content warning".
- Fixed an issue where
GetMediaStreamAsyncandDownloadMediaStreamAsyncthrew an exception due to recent YouTube changes. As a side effect, age-restricted videos may no longer work, at least until a new workaround is found.
- Fixed an issue where
GetPlaylistAsynconly returned 200 videos for some larger playlists. Thanks @polynoman.
- Fixed an issue where some playlist IDs were incorrectly considered invalid.
- Fixed an issue where
GetVideoMediaStreamInfosAsyncsometimes returned a set without any streams due to recent YouTube changes. - Fixed an issue where "my mix" playlists were considered invalid.
- Added nullable reference type annotations and removed ReSharper annotations.
- Fixed an issue where
GetVideoMediaStreamInfosAsyncthrew an exception due to recent YouTube changes.
- Updated signature deciphering to match recent YouTube changes.
- Fixed an issue where
UploadDatewas incorrect on videos returned fromGetPlaylistAsync,SearchVideosAsyncandGetChannelUploadsAsync.
- Fixed an issue where most methods threw
VideoUnavailableExceptionon all videos due to recent YouTube changes.
- Fixed an issue where
GetVideoMediaStreamInfosAsyncthrew an exception due to recent YouTube changes. - Fixed how error reason is extracted from the watch page when a video is unavailable.
- Dropped dependency on AngleSharp and replaced it with LtGt.
- Fixed an issue where
GetChannelUploadsAsyncalways returned empty result.
- Updated how videos in a playlist are resolved to match recent YouTube changes.
- Updated signature deciphering to match recent YouTube changes.
- Fixed an issue where
ArgumentExceptionwas thrown on some videos due to recent YouTube changes. - Improved exception messages to make them slightly more user-friendly.
- Improved exception messages for cases when a video is blocked in user's country or is age-restricted and unembeddable.
- Fixed an issue where YoutubeExplode always failed to extract media streams due to recent YouTube changes.
- Improved performance in
GetVideoAsyncby optimizing description parser.
- Fixed some more inconsistencies with how links in video descriptions are rendered.
- Fixed an issue where
JsonReaderExceptionwas thrown when downloading videos that were blocked on copyright grounds.
- Fixed an issue where parser methods for channel ID and username failed if the URL contained query parameters.
- Fixed some inconsistencies with how links in video descriptions are rendered.
- Pinned AngleSharp dependency to version 0.9.11 because newer versions contain breaking changes that are currently incompatible with YoutubeExplode.
- Improved the implementation of
GetChannelAsyncso that it's more fast and works on channels without any uploaded videos.
- Fixed an issue where closed caption tracks were sometimes missing whitespace between words in auto-generated tracks.
- Added an extension method to get all distinct video quality labels from a set --
MediaStreamInfoSet.GetAllVideoQualityLabels.
- Fixed an issue where
GetVideoMediaStreamInfosAsyncreturned empty for live stream recording videos.
- Fixed sporadic failures in
GetVideoAuthorChannelAsyncandGetChannelIdAsync. - Re-added
VideoRequiresPurchaseExceptionas a child ofVideoUnplayableException.
- Switched majority of video-related parsing to a new approach, which allows circumventing signature deciphering, provides more info, and is marginally faster and more consistent. This makes
GetVideoMediaStreamInfosAsynccomplete twice as fast, on average. - Switched from itag-based property mapping to manual string parsing, which should be more stable in the long run.
- Added
MediaStreamInfoSet.ValidUntilproperty which can be used to determine when the contained streams will expire. - Fixed an issue where controversial videos could not be parsed.
- Removed
User-Agentheader from default request headers. - Removed
VideoQuality.GetVideoQualityLabelextension method. - Removed
MediaStreamInfo.GetUrlExpiryDateextension method. - Removed
VideoRequiresPurchaseExceptionand replaced it withVideoUnplayableExceptionwhich covers a wider spectrum of errors. VideoUnavailableExceptionno longer has properties for error code and error reason. Error code was basically useless so it was removed, error reason is now part of theMessageproperty.- Removed
ParseExceptionentirely. - Some enum values in
AudioEncoding,VideoEncodingandContainertypes were marked as obsolete because they are no longer used by YouTube.
- Fixed an issue where signature decipherer was throwing an exception due to recent YouTube changes.
- Fixed an issue where
GetVideoAsyncwas throwing an exception due to recent YouTube changes.
- Fixed an issue where
GetVideoMediaStreamInfosAsyncwas sometimes returning adaptive streams that were not working. There are very rare cases where it still might happen.
- Fixed an issue where external links were truncated in
Video.Descriptionif they are too long. - Added support for seeking in
MediaStream.
- Improved
GetVideoAsync,GetVideoAuthorChannelAsyncandGetVideoClosedCaptionTrackInfosAsyncso that they don't fail on unavailable videos. - Added extra result validation to
GetChannelIdAsyncto verify that the extracted value is indeed a valid channel ID. - Added static methods to parse and validate YouTube usernames.
- Fixed an issue where
JsonReaderExceptionwas thrown on all videos due to recent YouTube changes. - Added support for itag 394.
- Added
GetChannelIdAsyncmethod that retrieves channel ID from username. - Added support for OL playlists.
- Added support for AV1 video codec.
- Fixed an issue where
ParseExceptionwas thrown on signature-protected videos due to recent YouTube changes.
- Fixed an issue where retrieving some streams may throw a
403 Forbiddenerror due to recent YouTube changes.
- Reworked
GetMediaStreamAsyncso that it implements the workaround for rate-limited streams, which was originally only available inDownloadMediaStreamAsync. This is achieved by returning a stream that internally sends multiple segmented requests in a sequence. - Fixed
MediaStream.ReadAsyncnot using theReadAsyncof the underlying stream. - Fixed
GetVideoQualityLabelso that it displays the framerate as rounded up to the nearest 10, instead of always displaying it as '60'.
- Fixed an issue where some non-embeddable videos could not be processed.
- Fixed an issue where non-embeddable age-restricted videos could not be processed.
- Fixed exception messages not being shown in Visual Studio's exception popup.
- Fixed xml docs on
Playlist.Typeproperty.
- Fixed an issue where
VideoUnavailableExceptionwould always be thrown for non-embeddable videos due to recent YouTube changes.
- Relaxed validation rules for all playlist IDs because there are even more variations than expected.
- Fixed an issue where
GetVideoAuthorChannelAsyncwould always throw an exception due to recent YouTube changes.
- Added an extension method to parse
MediaStreamInfo.Urlexpiry date --MediaStreamInfo.GetUrlExpiryDate. - Replaced instances of
DateTimewithDateTimeOffset. - Relaxed validation rules for RD playlist IDs because there are simply too many possible variations.
- Fixed some playlist IDs being considered invalid even though they aren't.
- Fixed an
OutOfMemoryExceptionissue that would occur when executingGetVideoMediaStreamInfosAsyncon a large video.
- Added overloads for
DownloadMediaStreamAsyncandDownloadClosedCaptionTrackAsyncthat acceptStreamas output. - Removed
IHttpService,HttpServicein favor of using unwrappedHttpClient. - Added
IYoutubeClientto aid in testing.
- Fixed an issue where
GetClosedCaptionTrackAsyncwould throw on some malformed automatic captions. - Fixed an issue where some video qualities were not correctly identified due to itag inconsistency.
- Added support for 2880p video quality.
- Implemented segmented downloading for rate-limited media streams. This fixes slow download speed of
DownloadMediaStreamAsynccaused by YouTube changes. - Added
SearchVideosAsyncmethod toYoutubeClient. Can be used to search for videos using given query. The method returnsVideoobjects but not all properties have valid values, due to how this internal API functions. - Added
HlsLiveStreamUrltoMediaStreamInfoSetwhich can be used to extract URL of M3U8 playlists for livestream videos. - Added
UploadDatetoVideo. - Fixed incorrect return value in
GetVideoQualityLabel/VideoQualityLabelin cases where FPS was below 60 but above 30. - Renamed
GetRegularUrlextension methods toGetUrl. - Added some useful extension methods for models.
- Added some ReSharper annotations.
- Reworked
YoutubeClientAPI by splitting workflows into separate methods. What was done solely byGetVideoAsyncis now done byGetVideoAsync,GetVideoMediaStreamInfosAsync,GetVideoClosedCaptionTrackInfosAsync,GetVideoAuthorChannelAsync. - Media stream and closed caption track information is no longer part of the
Videomodel. Extended channel information was also removed. PlaylistVideohas been removed as it now shares the same property set withVideo. Existing usages ofPlaylistVideohave been replaced withVideo.- Order of some parameters in
Playlistconstructor has been changed. Be careful if you initialize it yourself. - Removed some properties from
Channelthat are no longer accessible due to YouTube changes. - Exception messages now provide more information, without needing to check inside properties.
ValidatePlaylistIdand(Try)ParsePlaylistIdare now more strict and check the first two characters in the ID as well.- Added a lot of useful extensions methods. Refactored some existing methods to extensions.
- Fixed incompatibility with age-restricted videos due to YouTube changes.
- Fixed other issues that prevented the library from being usable due to YouTube changes.
- Added dependency on
Newtonsoft.JsonandAngleSharp.
This version has a lot of breaking changes and the migration isn't very straightforward. The readme has been updated with new usage examples and demo projects have been changed to work with new API.