I am trying to open a video file with xuggle like this:
if (container.open(in, null) < 0) {
throw new IllegalArgumentException("could not open file: ");
}
The problem happened when i use mp4 file and i passed to open a InputStream:
InputStream in = new FileInputStream(filename);
In this case IContainer.open remains blocked and does not return anything.
However if I pass a file name to the open method or I use the flv format, it works fine.
I have to use InputStream with an mp4 file.
Can someone help me to find the problem?
In case some other person runs across this issue, I'll say what I did that fixed my problem:
Instead of opening from an InputStream
, I opened the file directly used
if (container.open(filename, IContainer.Type.READ, null) < 0)
{
throw new IllegalArgumentException("Could not open file: " + filename);
}
I hope this helps somebody that encounters this problem later. Cheers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With