[問題]使用sauronsoftware轉檔成mp4 但無法在HTML5上面播放的問題
小弟最近在撰寫一個轉檔程式
使用到sauronsoftware這個開放程式碼
我的目的是將影片轉檔成較小的mp4
並且可以在HTML5 上撥放
可是目前怎樣修一般撥放器可以但是HTML5就是不行
google似乎也沒有答案
請問有人有任何建議或是幫忙嗎
----------------以下為我的程式碼-----------------------
File source = new File("..\\input.mp4");
File target = new File("..\\target.mp4");
VideoAttributes video = new VideoAttributes();
video.setCodec("mpeg4");
video.setBitRate(new Integer(160000));
video.setFrameRate(new Integer(15));
video.setSize(new VideoSize(400, 300));
EncodingAttributes attrs = new EncodingAttributes();
attrs.setFormat("mp4");
attrs.setVideoAttributes(video);
Encoder encoder = new Encoder();
try
{
encoder.encode(source, target, attrs);
}
catch (IllegalArgumentException e) {
e.printStackTrace();
}
catch (InputFormatException e) {
e.printStackTrace();
}
catch (EncoderException e) {
e.printStackTrace();
}
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.96.109.105
※ 文章網址: https://www.ptt.cc/bbs/java/M.1497232976.A.D8C.html
推
06/12 14:17, , 1F
06/12 14:17, 1F
→
06/12 14:17, , 2F
06/12 14:17, 2F
→
06/12 14:18, , 3F
06/12 14:18, 3F
→
06/12 17:25, , 4F
06/12 17:25, 4F
→
06/12 17:27, , 5F
06/12 17:27, 5F
→
06/12 17:27, , 6F
06/12 17:27, 6F
→
06/12 17:28, , 7F
06/12 17:28, 7F
→
06/12 17:42, , 8F
06/12 17:42, 8F
java 近期熱門文章
PTT數位生活區 即時熱門文章