<commit_before><?php
	class KDLSanityLimits {
		const MinDuration = 100;
		const MaxDuration = 360000000;	// 10h
		const MinBitrate = 1;
		const MaxBitrate = 400000;		// 40MBps
		const MinFileSize = 1;
		const MaxFileSize = 40000000000;		// 40GB
		const MinDimension = 10;
		const MaxDimension = 5000;		// 
	
		const MinFramerate = 2;
		const MaxFramerate = 90;		// 
		const MinDAR = 0.5;
		const MaxDAR = 2.5;		// 
	}

	class KDLConstants {
		const BitrateH263Factor = 1.0;
		const BitrateVP6Factor = 1.5;
		const BitrateH264Factor = 2.0;
		const BitrateOthersRatio = 1.3;
						
				/* FlavorBitrateRedundencyFactor - 
				 * The ratio between the current and prev flavors 
				 * should be at most of that value (curr/prev=ratio).
				 * Higher ratio means that the current flavor is redundant 
				 */
		const FlavorBitrateRedundencyFactor = 0.75;

		const FlavorBitrateCompliantFactor = 0.80;

		const ProductDurationFactor = 0.95;
		const ProductBitrateFactor = 0.7;

				/*
				 * TranscodersSourceBlackList
				 */
		static $TranscodersSourceBlackList = array(
			KDLTranscoders::ON2 => array(
				KDLConstants::VideoIndex=>array("icod","intermediate codec","apcn","apch"),
			),
			KDLTranscoders::FFMPEG => array(
				KDLConstants::ContainerIndex=>array("ogg", "ogv"),
				KDLConstants::VideoIndex=>array("theora", "iv41","iv50","icod","intermediate codec","apcn","apch"),
//				KDLConstants::AudioIndex=>array("vorbis"),
			),
			KDLTranscoders::FFMPEG_AUX => array(
				KDLConstants::ContainerIndex=>array("ogg", "ogv"),
				KDLConstants::VideoIndex=>array("theora", "iv41","iv50","icod","intermediate codec","apcn","apch"),
//				KDLConstants::AudioIndex=>array("vorbis"),
			),
			KDLTranscoders::MENCODER => array(
				KDLConstants::VideoIndex=>array("icod","intermediate codec","apcn","apch"),
				KDLConstants::AudioIndex=>array("a"), // MS Speach/Voice codec
			),
		);
				/*
				 * TranscodersTargetBlackList
				 */
		static $TranscodersTargetBlackList = array(
			KDLTranscoders::ON2 => array(
				KDLConstants::ContainerIndex=>array(KDLContainerTarget::WMV, KDLContainerTarget::ISMV),
				KDLConstants::VideoIndex=>array("wvc1", KDLVideoTarget::WMV2,KDLVideoTarget::WMV3)),
			KDLTranscoders::EE3 => array(
				KDLConstants::ContainerIndex=>array(KDLContainerTarget::FLV, KDLContainerTarget::MP4)),
			KDLTranscoders::FFMPEG => array(
				KDLConstants::ContainerIndex=>array(KDLContainerTarget::ISMV)),
			KDLTranscoders::FFMPEG_AUX => array(
				KDLConstants::ContainerIndex=>array(KDLContainerTarget::ISMV)),
			KDLTranscoders::ENCODING_COM => array(
				KDLConstants::ContainerIndex=>array(KDLContainerTarget::ISMV)),
			KDLTranscoders::MENCODER => array(
				KDLConstants::ContainerIndex=>array(KDLContainerTarget::ISMV)),
		);
		
		static $BitrateFactorCategory1 = array(KDLVideoTarget::H263,KDLVideoTarget::FLV, "h263", "h.263", "s263", "flv1");
		static $BitrateFactorCategory2 = array(KDLVideoTarget::VP6, "vp6", "vp6e", "vp6s", "flv4");
		static $BitrateFactorCategory3 = array(KDLVideoTarget::H264, KDLVideoTarget::H264B, 
											   KDLVideoTarget::H264M,KDLVideoTarget::H264H,
											   KDLVideoTarget::WMV3, KDLVideoTarget::WVC1A,
											   KDLVideoTarget::VP8,
											   "h264", "h.264", "x264", "avc1", "wvc1",
											   "avc", "wmv3", "wmva", "rv40");
											   		
		const MaxFramerate = 30.0;
		const DefaultGOP = 60;
		const DefaultAudioSampleRate = 44100;
		const MinAudioSampleRate = 11025;
		const MaxAudioSampleRate = 48000;
		const DefaultAudioChannels = 2;
		
		const ContainerIndex = "container";
		const VideoIndex = "video";
		const AudioIndex = "audio";
		const ImageIndex = "image";
		const PdfIndex = 'pdf';
		const SwfIndex = 'swf';
		
	}

	class KDLTranscoders {
		const KALTURA 		= "kaltura.com";
		const FFMPEG 		= "ffmpeg";
		const MENCODER 		= "mencoder";
		const ON2 			= "cli_encode";
		const ENCODING_COM 	= "encoding.com";
		const FFMPEG_AUX 	= "ffmpeg-aux";
		const EE3			= "ee3";
		const EXPRESSION_ENCODER = "expression_encoder";
		const FFMPEG_VP8 	= "ffmpeg-vp8";
		const QUICK_TIME_PLAYER_TOOLS = "quick_time_player_tools";
		const QT_FASTSTART  = "qt-faststart";
		const PDF2SWF = "pdf2swf";
		const PDF_CREATOR = "pdf_creator";
	};


	class KDLCmdlinePlaceholders {
		const InFileName	= "__inFileName__";
		const OutFileName	= "__outFileName__";<commit_msg>add avidemux<commit_after><?php
	class KDLSanityLimits {
		const MinDuration = 100;
		const MaxDuration = 360000000;	// 10h
		const MinBitrate = 1;
		const MaxBitrate = 400000;		// 40MBps
		const MinFileSize = 1;
		const MaxFileSize = 40000000000;		// 40GB
		const MinDimension = 10;
		const MaxDimension = 5000;		// 
	
		const MinFramerate = 2;
		const MaxFramerate = 90;		// 
		const MinDAR = 0.5;
		const MaxDAR = 2.5;		// 
	}

	class KDLConstants {
		const BitrateH263Factor = 1.0;
		const BitrateVP6Factor = 1.5;
		const BitrateH264Factor = 2.0;
		const BitrateOthersRatio = 1.3;
						
				/* FlavorBitrateRedundencyFactor - 
				 * The ratio between the current and prev flavors 
				 * should be at most of that value (curr/prev=ratio).
				 * Higher ratio means that the current flavor is redundant 
				 */
		const FlavorBitrateRedundencyFactor = 0.75;

		const FlavorBitrateCompliantFactor = 0.80;

		const ProductDurationFactor = 0.95;
		const ProductBitrateFactor = 0.7;

				/*
				 * TranscodersSourceBlackList
				 */
		static $TranscodersSourceBlackList = array(
			KDLTranscoders::ON2 => array(
				KDLConstants::VideoIndex=>array("icod","intermediate codec","apcn","apch"),
			),
			KDLTranscoders::FFMPEG => array(
				KDLConstants::ContainerIndex=>array("ogg", "ogv"),
				KDLConstants::VideoIndex=>array("theora", "iv41","iv50","icod","intermediate codec","apcn","apch"),
//				KDLConstants::AudioIndex=>array("vorbis"),
			),
			KDLTranscoders::FFMPEG_AUX => array(
				KDLConstants::ContainerIndex=>array("ogg", "ogv"),
				KDLConstants::VideoIndex=>array("theora", "iv41","iv50","icod","intermediate codec","apcn","apch"),
//				KDLConstants::AudioIndex=>array("vorbis"),
			),
			KDLTranscoders::MENCODER => array(
				KDLConstants::VideoIndex=>array("icod","intermediate codec","apcn","apch"),
				KDLConstants::AudioIndex=>array("a"), // MS Speach/Voice codec
			),
		);
				/*
				 * TranscodersTargetBlackList
				 */
		static $TranscodersTargetBlackList = array(
			KDLTranscoders::ON2 => array(
				KDLConstants::ContainerIndex=>array(KDLContainerTarget::WMV, KDLContainerTarget::ISMV),
				KDLConstants::VideoIndex=>array("wvc1", KDLVideoTarget::WMV2,KDLVideoTarget::WMV3)),
			KDLTranscoders::EE3 => array(
				KDLConstants::ContainerIndex=>array(KDLContainerTarget::FLV, KDLContainerTarget::MP4)),
			KDLTranscoders::FFMPEG => array(
				KDLConstants::ContainerIndex=>array(KDLContainerTarget::ISMV)),
			KDLTranscoders::FFMPEG_AUX => array(
				KDLConstants::ContainerIndex=>array(KDLContainerTarget::ISMV)),
			KDLTranscoders::ENCODING_COM => array(
				KDLConstants::ContainerIndex=>array(KDLContainerTarget::ISMV)),
			KDLTranscoders::MENCODER => array(
				KDLConstants::ContainerIndex=>array(KDLContainerTarget::ISMV)),
		);
		
		static $BitrateFactorCategory1 = array(KDLVideoTarget::H263,KDLVideoTarget::FLV, "h263", "h.263", "s263", "flv1");
		static $BitrateFactorCategory2 = array(KDLVideoTarget::VP6, "vp6", "vp6e", "vp6s", "flv4");
		static $BitrateFactorCategory3 = array(KDLVideoTarget::H264, KDLVideoTarget::H264B, 
											   KDLVideoTarget::H264M,KDLVideoTarget::H264H,
											   KDLVideoTarget::WMV3, KDLVideoTarget::WVC1A,
											   KDLVideoTarget::VP8,
											   "h264", "h.264", "x264", "avc1", "wvc1",
											   "avc", "wmv3", "wmva", "rv40");
											   		
		const MaxFramerate = 30.0;
		const DefaultGOP = 60;
		const DefaultAudioSampleRate = 44100;
		const MinAudioSampleRate = 11025;
		const MaxAudioSampleRate = 48000;
		const DefaultAudioChannels = 2;
		
		const ContainerIndex = "container";
		const VideoIndex = "video";
		const AudioIndex = "audio";
		const ImageIndex = "image";
		const PdfIndex = 'pdf';
		const SwfIndex = 'swf';
		
	}

	class KDLTranscoders {
		const KALTURA 		= "kaltura.com";
		const FFMPEG 		= "ffmpeg";
		const MENCODER 		= "mencoder";
		const ON2 			= "cli_encode";
		const ENCODING_COM 	= "encoding.com";
		const FFMPEG_AUX 	= "ffmpeg-aux";
		const EE3			= "ee3";
		const EXPRESSION_ENCODER = "expression_encoder";
		const FFMPEG_VP8 	= "ffmpeg-vp8";
		const QUICK_TIME_PLAYER_TOOLS = "quick_time_player_tools";
		const QT_FASTSTART  = "qt-faststart";
		const AVIDEMUX  = "avidemux";
		const PDF2SWF = "pdf2swf";
		const PDF_CREATOR = "pdf_creator";
	};


	class KDLCmdlinePlaceholders {
		const InFileName	= "__inFileName__";
		const OutFileName	= "__outFileName__";
{'fraction_non_alphanumeric': 0.13603572655444865, 'fraction_numerical': 0.038703767319363334, 'mean_word_length': 4.302975106253795, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 55, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 4, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1976128', 'n_tokens_mistral': 3816, 'n_tokens_neox': 3039, 'n_words': 539}