Commit 81c26d88 authored by yanzg's avatar yanzg

视频转换

parent d6caa6e5
...@@ -120,8 +120,10 @@ public class MediaHelper extends ImageHelper { ...@@ -120,8 +120,10 @@ public class MediaHelper extends ImageHelper {
} }
} finally { } finally {
recorder.stop(); // 设置转码后的视频角度
recorder.setMetadata(MediaParameter.ROTATE, String.valueOf(parameter.getVideoRotateFinally()));
recorder.release(); recorder.release();
recorder.stop();
recorder.close(); recorder.close();
} }
......
...@@ -45,6 +45,13 @@ public class TestMediaHelper { ...@@ -45,6 +45,13 @@ public class TestMediaHelper {
public void testConvertSingle() throws IOException { public void testConvertSingle() throws IOException {
String fileName = "100M.mp4"; String fileName = "100M.mp4";
// String fileName = "z001594372388232a3017ad69c82a342.MOV"; // String fileName = "z001594372388232a3017ad69c82a342.MOV";
testConvert(fileName, 0.25f, 0.25f);
}
@Test
public void testConvertSingle_Two() throws IOException {
String fileName = "100M.mp4.size_50.quot_50.mp4";
// String fileName = "z001594372388232a3017ad69c82a342.MOV";
testConvert(fileName, 0.5f, 0.5f); testConvert(fileName, 0.5f, 0.5f);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment