我使用GoPro - Quik手動將標籤添加到mp4視頻中。如何在Android或Java的mp4視頻中獲取GoPro HiLight標籤
根據Chriki answer on superuser和GoProInfo.cpp 高亮標籤存儲在框中鍵入HMMT
在MP4視頻的毫秒。
Path = `moov\udta\HMMT`
但我沒有發現使用sannies/mp4parser代碼
InputStream in = new BufferedInputStream(urlConnection.getInputStream());
ReadableByteChannel chanel = Channels.newChannel(in);
我繼續我的[R & d和結果得到了這個代碼
IsoFile isoFile = new IsoFile(chanel);
MovieBox movieBox = isoFile.getMovieBox();
List<UserDataBox> userDataBoxes = movieBox.getBoxes(UserDataBox.class);
stringBuilder.append("moov>UserBoxes:\n");
for (int i = 0; i < userDataBoxes.size(); i++) {
stringBuilder.append(userDataBoxes.get(i));
stringBuilder.append("\n");
UserDataBox erDataBox = userDataBoxes.get(i);
for (int i1 = 0; i1 < erDataBox.getBoxes().size(); i1++) {
stringBuilder.append(erDataBox.getBoxes().get(i));
stringBuilder.append("\n");
}
stringBuilder.append("\n");
stringBuilder.append("\n");
}
輸出任何標記毫秒:
moov>UserBoxes:
UserDataBox[MetaBox[HandlerBox[handlerType=mdir;name=��];AppleItemListBox[[email protected]]]]
MetaBox[HandlerBox[handlerType=mdir;name=��];AppleItemListBox[[email protected]]]
更新:我得到HMMT
與isoviewer。 它使用下列庫
<dependency>
<groupId>com.googlecode.mp4parser</groupId>
<artifactId>isoparser</artifactId>
<version>1.1.14</version>
</dependency>
問題仍然沒有得到解決的原因 com.googlecode.mp4parser
IsoFile類沒有構造函數用於從遠程流檢索數據ReadableByteChannel
。
與庫中的真正問題是sannies/mp4parser
從UserDataBox
沒有回報UnknownBox
而googlecode/mp4parser
確實但只有與影片網址sannies/mp4parser工作庫。需要修復或任何解決方法。
任何解決方案。謝謝