Skip to content

PlayerForcedCodec

property

Delphi
property PlayerForcedCodec: string read GetPlayerForcedCodec write SetPlayerForcedCodec;
C++Builder
__property System::UnicodeString PlayerForcedCodec = {read=GetPlayerForcedCodec, write=SetPlayerForcedCodec};
C#
public string PlayerForcedCodec { get; set; }
VB.NET
Public Property PlayerForcedCodec As String
C++/Qt
wchar_t *GetPlayerForcedCodec ();
void SetPlayerForcedCodec (wchar_t *Value);

Force the use of a given codec during playback.

Remarks

Used to specify particular codecs to be used by TVideoGrabber.

TVideoGrabber automatically selects the default appropriate codec to play a given clip.

However in some cases a different codec can be preferred.

Note that adding codecs to the graph can also be achieved by invoking ThirdPartyFilter_AddToList (tpf_AddToGraph...

To use the default codecs, leave PlayerForcedCodec empty.

To force the use of a given codec, assign to this property the name of the codec (DirectShow filter name) or its CLSID string, e.g.:

VideoGrabber1.PlayerForcedCodec = "Microsoft DTV-DVD Video Decoder" or

VideoGrabber1.PlayerForcedCodec = "{212690FB-83E5-4526-8FD7-74478B7939CD}"

The following keywords are also supported:

PlayerForcedCodec = "LAV": forces the use of the LAV filters.

PlayerForcedCodec = "NOLAV": prevents TVideoGrabber from using the LAV filters.

PlayerForcedCodec = "MF": the local files of the formats of Windows Media Foundation (MP4, MOV, M4A, 3GP, MKV, WebM, FLAC, AAC, AVI, WAV, MP3, MPEG, ASF / WMV / WMA...) are opened first by the Media Foundation source of TVideoGrabber (demultiplexers and decoders of Windows), before the LAV filters. By default this source is used right after the LAV filters, before the other sources.

PlayerForcedCodec = "NOMF": prevents TVideoGrabber from using its Media Foundation source.

PlayerForcedCodec = "DTSTDRTSP": the clip is opened by the Datastead RTSP/RTMP/HTTP/ONVIF DirectShow Source Filter (installed separately), which decodes it with its own decoders. Also used automatically, when this filter is installed, for a local clip opened by OpenPlayer whose HEVC (H.265) video has no decoder (no HEVC decoder of Windows or DirectShow HEVC decoder installed).

These non-default settings can be restored to their default value by setting PlayerForcedCodec = ""

Note that reading the PlayerForcedCodec string does not reflect the state of these keywords: only codec names or codec CLSIDs appear in the PlayerForcedCodec string.