public Int32 getVideoFileLength(string filename) { if (filename != null) { Int32 FileLength; MetadataReadResult res = getMetadataReadResult(filename); if (res != null && res.VideoMetadata != null && Int32.TryParse(res.VideoMetadata.Duration.TotalMilliseconds.ToString(), out FileLength) && FileLength > 0) { return(FileLength); } } return(0); }
public String getFrameRate(String filename) { if (filename != null) { Double frameRate; MetadataReadResult res = getMetadataReadResult(filename); if (res != null && res.VideoMetadata != null && Double.TryParse(res.VideoMetadata.Framerate.ToString(), out frameRate) && frameRate > 0) { return(frameRate.ToString()); } } return(""); }