[FFmpeg-user] How to see what mediainfo sees prores.mov

Andy Furniss adf.lists at gmail.com
Thu Feb 18 14:09:21 CET 2016


Anatol wrote:
> Following php func might help u:
>
> private static function checkForScanType($ffmpegBin, $srcFileName,
> $frames=1000)
> {
> /*
> [Parsed_idet_0 @ 0000000000331de0] Single frame detection: TFF:1 BFF:96
> Progressive:2 Undetermined:1
> [Parsed_idet_0 @ 0000000000331de0] Multi frame detection: TFF:0 BFF:100
> Progressive:0 Undetermined:0
> */
> if(stristr(PHP_OS,'win')) $nullDev = "NULL";
> else $nullDev = "/dev/null";
>
> $cmdLine = "$ffmpegBin -filter:v idet -frames:v $frames -an -f rawvideo -y
> $nullDev -i $srcFileName -nostats  2>&1";
> $lastLine=exec($cmdLine , $outputArr, $rv);
> if($rv!=0) {
> return 0;
> }
> $tff=0; $bff=0; $progessive=0; $undermined=0;
> foreach($outputArr as $line){
> if(strstr($line, "Parsed_idet")==false)
> continue;
> $str = strstr($line, "TFF");
> sscanf($str,"TFF:%d BFF:%d Progressive:%d Undetermined:%d", $t, $b, $p, $u);
> $tff+=$t; $bff+=$b; $progessive+=$p; $undermined+=$u;
> }
> $scanType = 0; // Default would be 'progressive'
> if($progessive<$tff+$bff)
> $scanType = 1;
> return $scanType;
> }

Thanks for that, though it seems to be to identify - I am really
wondering how to see meta/container info the ffmpeg writes but I
don't know how to read.




More information about the ffmpeg-user mailing list