ISchemm.DurationFinder 5.0.0

dotnet add package ISchemm.DurationFinder --version 5.0.0                
NuGet\Install-Package ISchemm.DurationFinder -Version 5.0.0                
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="ISchemm.DurationFinder" Version="5.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ISchemm.DurationFinder --version 5.0.0                
#r "nuget: ISchemm.DurationFinder, 5.0.0"                
#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.
// Install ISchemm.DurationFinder as a Cake Addin
#addin nuget:?package=ISchemm.DurationFinder&version=5.0.0

// Install ISchemm.DurationFinder as a Cake Tool
#tool nuget:?package=ISchemm.DurationFinder&version=5.0.0                

ISchemm.DurationFinder

This library will attempt detect the duration of a video, given a URL that points to either a raw video resource (that you might put in a <video> tag) or a supported video-sharing site.

Providers

  • SchemaOrgDurationProvider (for pages with a <meta itemprop="duration"> tag)
  • OpenGraphDurationProvider (for pages with a <meta property="og:video:duration"> or <meta property="video:duration"> tag)
  • OEmbedDurationProvider (for pages that provide oEmbed discovery through a <link> element to a JSON endpoint which contains a non-standard duration property)
  • HlsDurationProvider (for HLS VOD playlists)
  • MP4DurationProvider (for MPEG-4 Part 14 containers, such as .mp4 and .m4a - requires HTTP range request support on the remote server)
  • VorbisDurationProvider (for Ogg containers - requires HTTP range request support on the remote server, and the file must contains a Vorbis stream)

Additional providers that are not included in Providers.All but are used internally:

  • ChunklistDurationProvider (for HLS VOD chunklists)
  • JsonDurationProvider (for JSON files with a numeric duration property)

Support

  • YouTube (SchemaOrgDurationProvider)
  • SoundCloud (SchemaOrgDurationProvider)
  • Vimeo (OEmbedDurationProvider)
  • HLS (HlsDurationProvider)
  • .mp4 (MP4DurationProvider)
  • .m4a (MP4DurationProvider)
  • .ogg (VorbisDurationProvider)
  • .oga (VorbisDurationProvider)
  • .ogv (VorbisDurationProvider)

Twitch might also work with OpenGraphDurationProvider, but this can be hit and miss.

Usage

  • Use ChainedDurationProvider to combine multiple providers (or just use the static object Providers.All)
  • Call the extension function GetDurationAsync(Uri) on the resulting provider object

Each provider will check the content type of the GET response, and only download what data is necessary. The first provider to come up with a valid duration value will be used, and any remaining providers will be skipped. If none of the providers come up with a result, GetDurationAsync(Uri) will check for a <link rel="canonical"> tag and try again (provided that the URL in the tag has not been attempted yet).

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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. 
.NET Framework net48 is compatible.  net481 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 ISchemm.DurationFinder:

Package Downloads
DurationHelper

A .NET library to get duration of a video from its URL. Supports MP4, HLS (VOD), YouTube and Twitch (if you provide API keys), Vimeo, Dailymotion, and SoundCloud.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
5.0.0 86 9/8/2024
4.3.0 79 7/23/2024
4.1.0 517 3/20/2022
4.0.0 432 3/19/2022
1.0.1 492 3/14/2022
1.0.0 460 3/14/2022