Android , Java - Rendering a video using bitmap frames to reverse a video (Xuggler)

人走茶凉 提交于 2019-12-03 00:44:32

You can use ffmpeg to assemble video from images. You can integrate ffmpeg in Java(Android) in a couple of ways (one being directly running it via

Runtime.getRuntime().exec("ffmpeg <options>");

), but probably a good way to do it is via the Xuggler project - it heavily relies on ffmpeg. For starting point, here's a set of introduction tutorials and here's a complete tutorial how to encode video from sequence of images. It's a lot of work and reading, but all the information you need is there. Good luck!

Regarding your xuggler usage, the version of your library won't work on your specific device, as it contains native code compiled for x86_64 and i686 platforms:

[2012-08-18 00:29:16 - xugglertest2]  - com/xuggle/ferry/i686-pc-linux-gnu/
[2012-08-18 00:29:16 - xugglertest2]  - com/xuggle/ferry/x86_64-pc-linux-gnu/

try finding version of this library with native code parts compiled for ARMv6 (most common Android architecture - includes older devices, if don't want to support devices older than ~1-2 years ago, ARMv7 would be better).

Otherwise, you'll need to get the ffmpeg compiled for ARM and use it with support of Android NDK. You'll need to write a code in C/C++ implementing encoding your series of images into a specific file and wrap it up with JNI interface. You can pass Java arrays to native implementations of class' methods.

please see sample Android NDK applications in SDK samples to see how to use JNI in your code

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!