2017-04-20 9 views
1

GoPro - Quikを使用して手動でmp4ビデオにタグを追加しました。 Chriki answer on superuserGoProInfo.cpp HILIGHTタグによるAndroidまたはJavaでmp4ビデオのGoPro HiLightタグを取得する方法

は、MP4ビデオのミリ秒単位でボックスタイプHMMTに格納されています。

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[org[email protected]]]] 
    MetaBox[HandlerBox[handlerType=mdir;name=��];AppleItemListBox[[email protected]]] 

更新:HMMTisoviewerです。 それは

<dependency> 
      <groupId>com.googlecode.mp4parser</groupId> 
      <artifactId>isoparser</artifactId> 
      <version>1.1.14</version> 
     </dependency> 

問題はまだ解決していない原因 com.googlecode.mp4parser IsoFileクラスは、リモート・ストリームからデータを取得するために使用ReadableByteChannelのコンストラクタを持っていない次のライブラリを使用しています。

enter image description here

ライブラリとの本当の問題はgooglecode/mp4parserしかしそのsannies/mp4parser動画のURLで動作する唯一のライブラリがあるとしながらsannies/mp4parserUserDataBoxからUnknownBoxを返していないことです。修正する必要があるか、回避策が必要です。

すべての解決策。ありがとうございました

答えて

0

Quikソフトウェアの問題は、私が予想していたようにファイル内にタグを保存しません。それはメディア一意のIDに対してタグを保存します。 GoProカメラで作成されたmp4ビデオからタグを読み取る必要があります。

のGoPro mp4ファイルのコードから入手可能なmp4のURLのコードスニペットから

InputStream inputStream = new BufferedInputStream(new URL("http://localhost:6582?BRIDGE&%2FGOPR0175.MP4&GOPR0175.MP4&80898399").openConnection().getInputStream()); 
GoProTagsBox tags = GoProUtil.getHilights(inputStream); 

stringBuilder.append("Count: "+tags.getCount()); 
if(tags.getHiLights() != null){ 
    for (long l : tags.getHiLights()) { 
     stringBuilder.append("\nHiLight: "+l); 
    } 
} 

を取得するには、両方のケースでは微細加工

GoProTagsBox tags = GoProUtil.getHilights(new RandomAccessFile(Environment.getExternalStorageDirectory().getAbsolutePath() + "/GOPR0175.MP4", "r")); 

スニペット。 jaad

https://github.com/Qamar4P/JaadAndroidアンドロイドのバージョンを使用して

関連する問題