private static VideoInfo ParseVideo(MediaInfo mi)
 {
     return new VideoInfo
     {
         Codec = mi.Get("Video", 0, "Format"),
         Width = int.Parse(mi.Get("Video", 0, "Width")),
         Heigth = int.Parse(mi.Get("Video", 0, "Height")),
         Duration = TimeSpan.FromMilliseconds(int.Parse(mi.Get("Video", 0, "Duration"))),
         Bitrate = int.Parse(mi.Get("Video", 0, "BitRate")),
         AspectRatioMode = mi.Get("Video", 0, "AspectRatio/String"), //as formatted string
         AspectRatio = double.Parse(mi.Get("Video", 0, "AspectRatio")),
         FrameRate = double.Parse(mi.Get("Video", 0, "FrameRate")),
         FrameRateMode = mi.Get("Video", 0, "FrameRate_Mode"),
         ScanType = mi.Get("Video", 0, "ScanType")
     };
 }
 private static AudioInfo ParseAudio(MediaInfo mi)
 {
     return new AudioInfo
     {
         Codec = mi.Get("Audio", 0, "Format"),
         Duration = TimeSpan.FromMilliseconds(int.Parse(mi.Get("Audio", 0, "Duration"))),
         Bitrate = int.Parse(mi.Get("Audio", 0, "BitRate")),
         BitrateMode = mi.Get("Audio", 0, "BitRate_Mode"),
         CompressionMode = mi.Get("Audio", 0, "Compression_Mode"),
         ChannelPositions = mi.Get("Audio", 0, "ChannelPositions"),
         SamplingRate = int.Parse(mi.Get("Audio", 0, "SamplingRate"))
     };
 }