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

The "AVS" (AVISynth) value is deprecated.

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. E.g. to play MPEG2 clips it is possible to prefer the Elecard/Moonlight video decoder instead of the Intervideo video decoder.

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

To use the default codecs, leave PlayerForcecCodec emtpy.

To force the use of a given codec, simply assign to this property:

  • either a significant part of the codec name,

  • either the CLSID string of the codec.

E.g.:

VideoGrabber1.PlayerForcedCodec "= "Elecard MPEG2 Video Decoder" or

VideoGrabber1.PlayerForcedCodec = "{F50B3F13-19C4-11CF-AA9A-02608C9BABA2}"

PlayerForcedCodec keywords

The following keywords are supported by the PlayerForcedCodec property:

PlayerForcedCodec = "NOFFDSHOW"Prevents TVideoGrabber to use the FFDSHOW codecs when they are enabled by default on the current platform.

PlayerForcedCodec = "NOMPC"Prevents TVideoGrabber to use the MPC (Media Player Classic) codecs when they are enabled by default on the current platform.

PlayerForcedCodec = "AVS" enables the playback through AVISynth when AVISynth is installed

PlayerForcedCodec = "FFDSHOW" enables the playback through FFDSHOW is the FFDSHOW video decoder is configured to decode the format to be played.

All 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.