private void GetStreamInfo() { try { _currentTask.MediaInfo = GenHelper.GetMediaInfo(_currentTask.VideoStream.TempFile); } catch (TimeoutException ex) { Log.Error(ex); } finally { if (_currentTask.MediaInfo.Video.Count > 0) { _currentTask.VideoStream.Bitrate = _currentTask.MediaInfo.Video[0].BitRate; _currentTask.VideoStream.StreamSize = GenHelper.GetFileSize(_currentTask.VideoStream.TempFile); _currentTask.VideoStream.FrameCount = _currentTask.MediaInfo.Video[0].FrameCount; _currentTask.VideoStream.StreamId = _currentTask.MediaInfo.Video[0].ID; } } for (var i = 0; i < _currentTask.AudioStreams.Count; i++) { var aStream = _currentTask.AudioStreams[i]; aStream = AudioHelper.GetStreamInfo(aStream); _currentTask.AudioStreams[i] = aStream; } foreach (var sStream in _currentTask.SubtitleStreams) { sStream.StreamSize = GenHelper.GetFileSize(sStream.TempFile); } }