Reputation: 51
I've noticed that the moov atom is placed at the end for many .mp4 videos. I'd like to relocate this atom to the front of the video so that I can enable progressive downloading. Is there a way to do this programmatically in Android without using any external libraries? I don't want to also include these binaries in the app. Thanks!
Upvotes: 5
Views: 1256
Reputation: 489
I was working on the same problem. I found this library: https://github.com/ypresto/qtfaststart-java It is super nice to use. Here is the example:
try {
QtFastStart.fastStart(fileIn, fileOut);
} catch (IOException e) {
// Handle
} catch (QtFastStart.MalformedFileException e) {
// Handle
} catch (QtFastStart.UnsupportedFileException e) {
// Handle
}
compile 'net.ypresto.qtfaststartjava:qtfaststart:0.1.0'
Upvotes: 4