public sealed class MediaInfoFile : IDisposable
Public NotInheritable Class MediaInfoFile
Implements IDisposable
Dim instance As MediaInfoFile
public ref class MediaInfoFile sealed : IDisposable
[<SealedAttribute>]
type MediaInfoFile =
class
interface IDisposable
end
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
Public Sub Test()
' Track position
Dim streamIndex As Integer = 0
' Open a file.
Dim mi As New MediaInfoFile("C:\File.mkv")
' Get full inform of file.
MsgBox(mi.Inform)
MsgBox(String.Format("Fullpath: {0}", mi.Fields(StreamType.General, Fields.CompleteName)))
MsgBox(String.Format("Directory: {0}", mi.Fields(StreamType.General, Fields.FolderName)))
MsgBox(String.Format("Filename: {0}", mi.Fields(StreamType.General, Fields.FileName)))
MsgBox(String.Format("Extension: {0}", mi.Fields(StreamType.General, Fields.FileExtension).ToLower()))
MsgBox(String.Format("Format: {0}", mi.Fields(StreamType.General, Fields.Format)))
MsgBox(String.Format("Size (bytes): {0}", mi.Fields(StreamType.General, Fields.FileSize)))
MsgBox(String.Format("Title (metadata): {0}", mi.Fields(StreamType.General, Fields.Title)))
MsgBox(String.Format("Audio format: {0}", mi.Fields(StreamType.Audio, streamIndex, Fields.Format)))
MsgBox(String.Format("Audio BitRate (bps): {0}", mi.Fields(StreamType.Audio, Fields.BitRate)))
MsgBox(String.Format("Audio duration (HH:MM:SS): {0}", mi.Fields(StreamType.Audio, Fields.Duration__String3).Split("."c)(0)))
MsgBox(String.Format("Video format: {0}", mi.Fields(StreamType.Video, streamIndex, Fields.Format)))
MsgBox(String.Format("Video BitRate (bps): {0}", mi.Fields(StreamType.Video, Fields.BitRate)))
MsgBox(String.Format("Video duration (HH:MM:SS): {0}", mi.Fields(StreamType.Video, Fields.Duration__String3).Split("."c)(0)))
MsgBox(String.Format("Video Framecount (Total frames): {0}", mi.Fields(StreamType.Video, streamIndex, Fields.FrameCount)))
MsgBox(String.Format("Video Contains Attachments?: {0}", mi.Fields(StreamType.Video, Fields.Attachment)))
MsgBox(String.Format("Audio track count: {0}", mi.StreamCount(StreamType.Audio)))
' Processes all the audio tracks of a video file
While Not streamIndex = mi.StreamCount(StreamType.Audio)
MsgBox(mi.Fields(StreamType.Audio, streamIndex, Fields.Format))
streamIndex += 1
End While
' Close the file by disposing the instance.
mi.Dispose()
End Sub
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
MediaInfoFile(FileInfo) | Initializes a new instance of the MediaInfoFile class. |
MediaInfoFile(String) | Initializes a new instance of the MediaInfoFile class. |
FieldCount | Gets the count of information fields available in the specified stream of the open file. |
FieldsStreamType, Fields | Gets the value of the specified information field in the open file. |
FieldsStreamType, String | Gets the value of the specified information field in the open file. |
FieldsStreamType, Int32, Fields | Gets the value of the specified information field in the open file. |
FieldsStreamType, Int32, String | Gets the value of the specified information field in the open file. |
Inform | Gets all the details about the open file. |
StreamCount | Gets the count of streams in the open file. |
StreamCountStreamType | Gets the count of streams of the specified StreamType type in the open file. |
Dispose | Releases all the resources used by this instance. |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) |
GetHashCode | Serves as the default hash function. (Inherited from Object) |
GetStreamCount | Gets the count of streams of the specified StreamType type in the open file. |
GetType | Gets the Type of the current instance. (Inherited from Object) |
ToString | Returns a string that represents the current object. (Inherited from Object) |
CanConvertTo |
Determines whether the source object can be converted to the specified target type.
(Defined by ObjectExtensions) |
CanConvertToT |
Determines whether the source object can be converted to the specified target type.
(Defined by ObjectExtensions) |
ConvertToT |
Converts an object to the specified target type.
If the conversion fails, an exception is thrown.
(Defined by ObjectExtensions) |
ConvertToT |
Converts an object to the specified target type.
If the conversion fails, returns the specified default value.
(Defined by ObjectExtensions) |
IsDisposable |
Determines whether the specified object is a disposable type
(i.e., it implements IDisposable interface).
(Defined by ObjectExtensions) |
Speak |
Speaks the string representation of the source object by using the
operating system integrated text-to-speech synthesizer.
(Defined by ObjectExtensions) |
Speak |
Speaks the string representation of the source object by using the
operating system integrated text-to-speech synthesizer.
(Defined by ObjectExtensions) |
ThrowIfNullTException |
Throws the specified exception if the source object is null.
(Defined by ObjectExtensions) |