Xuggle を使用してローカルから mov ファイルを読み込もうとしています。これにより、次のエラーが表示されます。
30-mag-2011 15.56.55 com.xuggle.ferry.NativeLogger log
GRAVE: [mov,mp4,m4a,3gp,3g2,mj2 @ 0x102840600] moov atom not found
問題は、2 分前までエラーが発生せず、コードが同じだったことです。
しかし、私はこれを発見しました:
バイト配列を使用して IContainer を開くと、機能せず、次のエラーが表示されます。
ByteArrayInputStream b = new ByteArrayInputStream(file);
DataInputStream data = new DataInputStream(b);
IContainer container = IContainer.make();
if (container.open(data, null) < 0)
throw new IllegalArgumentException("E001 - Cannot open the container");
一時ファイルを使用して IContainer を開くと、機能します。
File temp = File.createTempFile("temp_", ".mov");
try
{
FileOutputStream fos = new FileOutputStream(temp);
fos.write(file);
fos.close();
}
catch(FileNotFoundException e)
{
System.out.println(e);
}
IContainer container = IContainer.make();
if (container.open(temp.toString(), IContainer.Type.READ, null) < 0)
throw new IllegalArgumentException("E001 - Cannot open the container");
助言がありますか?