Retrieve a video files frame rate or FPS with taglib-sharp?

86 Views Asked by At

I want to use taglib-sharp to retrieve extended information about video files.

[Reflection.Assembly]::LoadFrom("C:\TagLibSharp.dll")
$file = [TagLib.File]::Create("C:\video.mp4")

With the above, I can get some information such as Duration:

$file.Properties.Duration

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 5
Milliseconds      : 80
Ticks             : 50800000
TotalDays         : 5.87962962962963E-05
TotalHours        : 0.00141111111111111
TotalMinutes      : 0.0846666666666667
TotalSeconds      : 5.08
TotalMilliseconds : 5080

But I cannot find a way to retrieve any information to do with video frames such as:

  • Frame Rate or FPS
  • The videos Total Frames

I have searched around on this site and elsewhere, they all seem to be focused on ID3Tags.

I am on PowerShell 7.3

0

There are 0 best solutions below