public void AudioList_Test2() { var a = new LibMPlayerCommon.Discover(GlobalVariables.Video2Path, GlobalVariables.MplayerPath); a.Execute(); Assert.AreEqual(1, a.AudioList.Count); }
public void IsVideo_Test1() { var a = new LibMPlayerCommon.Discover(GlobalVariables.Video1Path, GlobalVariables.MplayerPath); a.Execute(); Assert.AreEqual(true, a.Video); }
public void VideoBitrate_Test2() { var a = new LibMPlayerCommon.Discover(GlobalVariables.Video2Path, GlobalVariables.MplayerPath); a.Execute(); Assert.AreEqual(330, a.VideoBitrate); }
public void AspectRatio_Test1() { var a = new LibMPlayerCommon.Discover(GlobalVariables.Video1Path, GlobalVariables.MplayerPath); a.Execute(); Assert.AreEqual(1.33333337f, a.AspectRatio); }
public void AudioSampleRate_Test1() { var a = new LibMPlayerCommon.Discover(GlobalVariables.Video1Path, GlobalVariables.MplayerPath); a.Execute(); Assert.AreEqual(22050, a.AudioSampleRate); }
public void Height_Test1() { var a = new LibMPlayerCommon.Discover(GlobalVariables.Video1Path, GlobalVariables.MplayerPath); a.Execute(); Assert.AreEqual(240, a.Height); }
public void Length_Test1() { var a = new LibMPlayerCommon.Discover(GlobalVariables.Video1Path, GlobalVariables.MplayerPath); a.Execute(); Assert.AreEqual(208, a.Length); }
private void a_ConversionComplete(object sender, LibMPlayerCommon.MplayerEvent e) { LibMPlayerCommon.Discover a = new LibMPlayerCommon.Discover(GlobalVariables.OutputVideoDvdMpegNtsc, GlobalVariables.MplayerPath); NUnit.Framework.Assert.AreEqual(192, a.AudioBitrate); NUnit.Framework.Assert.AreEqual(720, a.Width); NUnit.Framework.Assert.AreEqual(480, a.Height); NUnit.Framework.Assert.AreEqual(48000, a.AudioSampleRate); }
private void a_ConversionComplete(object sender, LibMPlayerCommon.MplayerEvent e) { var a = new LibMPlayerCommon.Discover(GlobalVariables.OutputVideoDvdMpegNtsc, GlobalVariables.MplayerPath); Assert.AreEqual(192, a.AudioBitrate); Assert.AreEqual(720, a.Width); Assert.AreEqual(480, a.Height); Assert.AreEqual(48000, a.AudioSampleRate); }
/// <summary> /// Only allow certain conversion. No point converting a 200 kb/s video to 5000 kb/s. /// </summary> /// <param name="filePath"></param> /// <param name="requestBirate"></param> /// <returns></returns> private bool AllowVideoBitrate(string filePath, int requestBirate) { LibMPlayerCommon.Discover videoValues = new LibMPlayerCommon.Discover(filePath); int videoBitrate = videoValues.VideoBitrate; if (( requestBirate >=5000) && videoBitrate < 3000 ) { // No point upconverting this much. return false; } else if ((requestBirate >= 3000) && videoBitrate < 1000) { // No point upconverting this much. return false; } else if ((requestBirate >= 1000) && videoBitrate < 200) { // No point upconverting this much. return false; } return true; }
/// <summary> /// Which bitrate should be used with the video. /// </summary> /// <param name="filePath"></param> /// <returns></returns> private int AudioBitrateToUse(string filePath) { LibMPlayerCommon.Discover videoValues = new LibMPlayerCommon.Discover(filePath); int audioBitrate = videoValues.AudioBitrate; if (audioBitrate <= 64) { audioBitrate = 64; } else if (audioBitrate <= 128) { audioBitrate = 128; } else if (audioBitrate <= 196) { audioBitrate = 196; } else { audioBitrate = 256; } return audioBitrate; }
public void VideoBitrate_Test1() { LibMPlayerCommon.Discover a = new LibMPlayerCommon.Discover(GlobalVariables.Video1Path, GlobalVariables.MplayerPath); a.Execute(); NUnit.Framework.Assert.AreEqual(339, a.VideoBitrate); }
public void Length_Test1() { LibMPlayerCommon.Discover a = new LibMPlayerCommon.Discover(GlobalVariables.Video1Path, GlobalVariables.MplayerPath); a.Execute(); NUnit.Framework.Assert.AreEqual(208, a.Length); }
public void FPS_Test1() { LibMPlayerCommon.Discover a = new LibMPlayerCommon.Discover(GlobalVariables.Video1Path, GlobalVariables.MplayerPath); NUnit.Framework.Assert.AreEqual(29, a.FPS); }
public void AudioSampleRate_Test2() { var a = new LibMPlayerCommon.Discover(GlobalVariables.Video2Path, GlobalVariables.MplayerPath); a.Execute(); Assert.AreEqual(22050, a.AudioSampleRate); }
private void lstFilePaths_SelectedIndexChanged(object sender, EventArgs e) { if (lstFilePaths.SelectedIndex == -1) { return; } try { LibMPlayerCommon.Discover videoValues = new LibMPlayerCommon.Discover(lstFilePaths.SelectedItem.ToString().Trim()); txtVideoBitrateOriginal.Text = videoValues.VideoBitrate.ToString(); txtVidesAudioBitrateOriginal.Text = videoValues.AudioBitrate.ToString(); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public void Length_Test2() { var a = new LibMPlayerCommon.Discover(GlobalVariables.Video2Path, GlobalVariables.MplayerPath); a.Execute(); Assert.AreEqual(255, a.Length); }
public void AudioBitrate_Test2() { LibMPlayerCommon.Discover a = new LibMPlayerCommon.Discover(GlobalVariables.Video2Path, GlobalVariables.MplayerPath); NUnit.Framework.Assert.AreEqual(8, a.AudioBitrate); }
public void Height_Test2() { LibMPlayerCommon.Discover a = new LibMPlayerCommon.Discover(GlobalVariables.Video2Path, GlobalVariables.MplayerPath); NUnit.Framework.Assert.AreEqual(240, a.Height); }
public void AudioBitrate_Test1() { var a = new LibMPlayerCommon.Discover(GlobalVariables.Video1Path, GlobalVariables.MplayerPath); a.Execute(); Assert.AreEqual(8, a.AudioBitrate); }
public void FPS_Test2() { var a = new LibMPlayerCommon.Discover(GlobalVariables.Video2Path, GlobalVariables.MplayerPath); Assert.AreEqual(29, a.FPS); }
public void AspectRatio_Test2() { var a = new LibMPlayerCommon.Discover(GlobalVariables.Video2Path, GlobalVariables.MplayerPath); a.Execute(); Assert.AreEqual(1.33333337f, a.AspectRatio); }
public void Width_Test2() { LibMPlayerCommon.Discover a = new LibMPlayerCommon.Discover(GlobalVariables.Video2Path, GlobalVariables.MplayerPath); a.Execute(); NUnit.Framework.Assert.AreEqual(320, a.Width); }
public void AspectRatio_Test1() { LibMPlayerCommon.Discover a = new LibMPlayerCommon.Discover(GlobalVariables.Video1Path, GlobalVariables.MplayerPath); a.Execute(); NUnit.Framework.Assert.AreEqual(1.33333337f, a.AspectRatio); }
public void AudioList_Test1() { LibMPlayerCommon.Discover a = new LibMPlayerCommon.Discover(GlobalVariables.Video1Path, GlobalVariables.MplayerPath); NUnit.Framework.Assert.AreEqual(1, a.AudioList.Count); }
public void FPS_Test1() { var a = new LibMPlayerCommon.Discover(GlobalVariables.Video1Path, GlobalVariables.MplayerPath); Assert.AreEqual(29, a.FPS); }
public void AudioSampleRate_Test1() { LibMPlayerCommon.Discover a = new LibMPlayerCommon.Discover(GlobalVariables.Video1Path, GlobalVariables.MplayerPath); a.Execute(); NUnit.Framework.Assert.AreEqual(22050, a.AudioSampleRate); }
public void IsVideo_Test2() { LibMPlayerCommon.Discover a = new LibMPlayerCommon.Discover(GlobalVariables.Video2Path, GlobalVariables.MplayerPath); NUnit.Framework.Assert.AreEqual(true, a.Video); }