public sealed class Converter : IDisposable
Public NotInheritable Class Converter
Implements IDisposable
Dim instance As Converter
public ref class Converter sealed : IDisposable
[<SealedAttribute>]
type Converter =
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.
Private WithEvents ff As New Converter(".\FFMPEG.exe")
Private Shadows Sub Shown() Handles MyBase.Shown
' Checks if FFMPEG executable is available.
MsgBox(ff.Exists)
' Checks if a video has metadata
MsgBox(ff.VideoContainsMetadata("C:\Video.mkv"))
' Remove metadata from video
ff.RemoveVideoMetadata("C:\Input.mkv", "C:\Output.mkv", True, 4)
' reCompress the audio track of a video
ff.RecompressAudio("C:\Input.mkv", "C:\Output.mkv", True, FfmpegAudioCodec.libmp3lame, FfmpegAudioBitrate.Kbps128, True, 4)
' Demuxes the audio track of file
ff.DemuxAudio("C:\Input.wmv", "C:\Output.wma", True, 4)
' Demuxes the video track of file
ff.DemuxVideo("C:\Input.mp4", "C:\Output.h264", True, 4)
' Demuxes the video track of file
ff.SaveAudioAsWav("C:\Input.mkv", "C:\Output.wav", True, 4)
End Sub
Private Sub Ffmeg_Started(ByVal sender As Object, ByVal e As FfmpegStartedEventArgs) _
Handles ff.Started
ProgressBar1.Value = ProgressBar1.Minimum
Dim sb As New System.Text.StringBuilder
sb.AppendLine(String.Format("Started an ""{0}"" operation", e.Task.ToString()))
sb.AppendLine(String.Format("Input file is: ""{0}""", e.File))
sb.AppendLine(String.Format("FFMPEG process PID is: ""{0}""", DirectCast(sender, Converter).Process.Id))
MessageBox.Show(sb.ToString(), "FFMPEG", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Sub
Private Sub Ffmeg_Exited(ByVal sender As Object, ByVal e As FfmpegExitedEventArgs) _
Handles ff.Exited
Dim sb As New System.Text.StringBuilder
sb.AppendLine(String.Format("Finished an ""{0}"" operation", e.Task.ToString()))
sb.AppendLine(String.Format("Input file is: ""{0}""", e.File))
sb.AppendLine(String.Format("FFMPEG process PID is: {0}", DirectCast(sender, Process).Id))
If e.Errors.Count <> 0 Then
sb.AppendLine(String.Format("Errors during operation: {0}", String.Join(Environment.NewLine, e.Errors)))
End If
MessageBox.Show(sb.ToString(), "FFMPEG", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Sub
Private Sub Ffmeg_ProgressChanged(ByVal sender As Object, e As FfmpegProgressEventArgs) _
Handles ff.ProgressChanged
ProgressBar1.Value = e.Percent
Label1.Text = "Percent Done: " & CStr(e.Percent) & "%"
Label2.Text = "Video Duration: " & e.VideoDuration.ToString("hh\:mm\:ss")
Label3.Text = "Written Duration: " & e.Time.ToString("hh\:mm\:ss")
Label4.Text = "Written Data: " & (e.WrittenBytes / 1024L * 1024L).ToString("n1") & "MB"
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.
Converter | Initializes a new instance of the Converter class. |
Exists | Gets a value indicating whether the FFMPEG.exe file Exists. |
FilePath | Gets the FFMPEG.exe filepath. |
Process | Gets the FFMPEG.exeProcess instance. |
DemuxAudio | Demuxes the audio track of a video file. |
DemuxVideo | Demuxes the video track of a video 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) |
GetType | Gets the Type of the current instance. (Inherited from Object) |
RecompressAudio | ReCompress the audio track of a video file. |
RemoveVideoMetadata | Removes the metadata tags from a video file. |
SaveAudioAsWav | Demuxes the audio track of a video file to save it as WAV format. |
ToString | Returns a string that represents the current object. (Inherited from Object) |
VideoContainsMetadata | Determines whether a video file contains metadata fields. |
Exited | Event raised when the FFMPEG.exe process has exited. |
ProgressChanged | Event raised when FFMPEG.exe task progress has been changed. |
Started | Event raised when the FFMPEG.exe process has been started. |
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) |