AVIInfo2
Delphi
function AVIInfo2 (AVIFile: string; AVIInfoType: TAVIInfoType): string;
C++Builder
System::UnicodeString __fastcall AVIInfo2(System::UnicodeString AVIFile, TAVIInfoType AVIInfoType);
C#
public string AVIInfo2(string AVIFile, TAVIInfoType AVIInfoType);
VB.NET
Public Function AVIInfo2(AVIFile As String, AVIInfoType As TAVIInfoType) As String
C++/Qt
wchar_t * AVIInfo2 (wchar_t *AVIFile, TAVIInfoType AVIInfoType);
Retrieves information about the specified video clip: returns, as a string, the TAVIInfoType value specified by the AVIInfoType parameter for the video clip specified by the AVIFile parameter, e.g.:
Dim VideoCodec as string
VideoCodec = AVIInfo2 ("myvideoclip.avi", av_VideoCodec)
Dim ClipDuration as string
ClipDuration = AVIInfo2 ("myvideoclip.avi", av_Duration)
Note: as long as the clip file name does not change, the clip is opened only once: all the values are read and cached, so the subsequent calls to AVIInfo2 with the same file name do not reopen the video clip.
The possible values returned by AVIInfo2, depending on the TAVIInfoType value, are: av_Duration, av_FrameCount, av_VideoWidth, av_VideoHeight, av_VideoFrameRateFps, av_VideoCodec, av_AudioCodec, av_AvgBitRate, av_AudioChannels, av_AudioSamplesPerSec, av_AudioBitsPerSample, av_FileSizeInKB, av_AudioStreams.