Gets the type of compression used for the current stream in the current source media file.
public int VideoCompression {get;}
Public ReadOnly Property VideoCompression As Integer
public:
property int VideoCompression {
int get();
}
A value (FOURCC code) representing the type of compression used for the current stream in the current source media file.
The video compression type is indicated by a FOURCC value. For a list of FOURCC values, refer to the Microsoft documentation on FOURCC Codes. This property will not be updated if the current stream is not a video stream. This property is updated automatically when the CurrentStream property is set to a video stream. The current source media file, found in the SourceFile property, is the file that the MediaInfo object gets information for. The SourceFile property must be set before retrieving information from any of the other MediaInfo properties.
using Leadtools;
using Leadtools.Multimedia;
using LeadtoolsMultimediaExamples.Fixtures;
public PlayCtrlForm _form = new PlayCtrlForm();
public bool _result = false;
public void ResetSourceExample()
{
// reference the play control
PlayCtrl playctrl = _form.PlayCtrl;
// input file
string inFile = Path.Combine(LEAD_VARS.MediaDir, "MediaInfo_Source.avi");
string info = string.Empty;
try
{
// create a new media info object
MediaInfo mi = new MediaInfo();
// set the input and output files
mi.SourceFile = inFile;
// set the info string
info = string.Format("Source File={0}\nSource File Size={1}\nSource BitRate={2}\nDuration={3}\nVideoBitRate={4}\nVideoBitCount={5}\n\nAre these values correct?",
// AudioBitsPerSample={5}\nAudioChannels={6}\n
mi.SourceFile, mi.SourceFileSize, mi.SourceBitRate, mi.SourceDuration, mi.VideoBitRate, mi.VideoBitCount); //, mi.AudioBitsPerSample, mi.AudioChannels);
// verify the values
_result = (MessageBox.Show(_form, info, "Media Info", MessageBoxButtons.YesNo) == DialogResult.Yes);
// reset the source
mi.ResetSource();
// set the result to what we expect
_result &= (mi.SourceFile == null);
}
catch (Exception)
{
_result = false;
}
}
static class LEAD_VARS
{
public const string MediaDir = @"C:\Program Files (x86)\LEAD Technologies\LEADTOOLS 19\Media";
}
Imports Leadtools
Imports Leadtools.Multimedia
Imports LeadtoolsMultimediaExamples.Fixtures
Public _form As PlayCtrlForm = New PlayCtrlForm()
Public _result As Boolean = False
Public Sub ResetSourceExample()
' reference the play control
Dim playctrl As PlayCtrl = _form.PlayCtrl
' input file
Dim inFile As String = Path.Combine(LEAD_VARS.MediaDir, "MediaInfo_Source.avi")
Dim info As String = String.Empty
Try
' create a new media info object
Dim mi As MediaInfo = New MediaInfo()
' set the input and output files
mi.SourceFile = inFile
' set the info string
info = String.Format("Source File={0}" _
& Microsoft.VisualBasic.Constants.vbLf _
& "Source File Size={1}" & Microsoft.VisualBasic.Constants.vbLf _
& "Source BitRate={2}" & Microsoft.VisualBasic.Constants.vbLf _
& "Duration={3}" & Microsoft.VisualBasic.Constants.vbLf _
& "VideoBitRate={4}" _
& Microsoft.VisualBasic.Constants.vbLf _
& "VideoBitCount={5}" _
& Microsoft.VisualBasic.Constants.vbLf + Microsoft.VisualBasic.Constants.vbLf _
& "Are these values correct?",
mi.SourceFile,
mi.SourceFileSize,
mi.SourceBitRate,
mi.SourceDuration,
mi.VideoBitRate,
mi.VideoBitCount) ', mi.AudioBitsPerSample, mi.AudioChannels);
' verify the values
_result = (MessageBox.Show(_form, info, "Media Info", MessageBoxButtons.YesNo) = DialogResult.Yes)
' reset the source
mi.ResetSource()
' set the result to what we expect
_result = _result And (mi.SourceFile Is Nothing)
Catch e1 As Exception
_result = False
End Try
End Sub
Public NotInheritable Class LEAD_VARS
Public Const MediaDir As String = "C:\Program Files (x86)\LEAD Technologies\LEADTOOLS 19\Media"
End Class
Products |
Support |
Feedback: VideoCompression Property - Leadtools.Multimedia |
Introduction |
Help Version 19.0.2017.6.16
|
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.