public static IEnumerable <H264Encoder> Enumerate(TransformEnumFlag flags) { var output = new TRegisterTypeInformation(); output.GuidMajorType = MediaTypeGuids.Video; output.GuidSubtype = VideoFormatGuids.FromFourCC(new FourCC("H264")); foreach (var activate in MediaFactory.FindTransform(TransformCategoryGuids.VideoEncoder, flags, null, output)) { yield return(new H264Encoder(activate)); } }
/// <inheritdoc /> /// <summary> /// Class constructor /// </summary> /// <param name="width">Width, in pixels, of the frames to be fed to this encoder</param> /// <param name="height">Height, in pixels, of the frames to be fed to this encoder</param> /// <param name="destStream">Destination stream</param> public HevcMediaFoundationVideoCodec(int width, int height, Stream destStream) : base( width, height, destStream, TranscodeContainerTypeGuids.Mpeg4, VideoFormatGuids.FromFourCC(new FourCC("HEVC")), 30, 3_000_000) { }
/// <inheritdoc /> /// <summary> /// Class constructor /// </summary> /// <param name="width">Width, in pixels, of the frames to be fed to this encoder</param> /// <param name="height">Height, in pixels, of the frames to be fed to this encoder</param> /// <param name="destStream">Destination stream</param> /// <param name="fps">Frame rate in frames per second</param> /// <param name="bitrate">Bitrate</param> public H264MediaFoundationVideoCodec(int width, int height, Stream destStream, int fps, int bitrate) : base( width, height, destStream, TranscodeContainerTypeGuids.Mpeg4, VideoFormatGuids.FromFourCC(new FourCC("H264")), fps, bitrate) { }