通过ffmpeg的Android视频修剪 [英] Android video trimming via ffmpeg

查看:164
本文介绍了通过ffmpeg的Android视频修剪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经从此链接下载github的视频修剪代码。

I have downloaded video trimming code from github from this link.

它第一次工作正常,但是当我第二次尝试运行它时,代码崩溃,没有任何异常,那么当我尝试在第三次运行它之后,再次运行它崩溃它的作品!任何人对这种行为有什么想法?

It’s working perfectly for the first time, but when I try to run it for the second time the code crashes without any exception then again when I try to run it for the 3rd time after the crash it works! Does any one have any idea for this kind of behaviour?

我还在开发一个具有修剪视频的模块的应用程序。
我真的很感激,如果有人可以帮助我。

I am also developing an application which has one module of trimming videos. I would really appreciate it, if any one could help me .

推荐答案

https://lists.ffmpeg.org/pipermail/libav-user/2012-May/001964。 html

调用本机方法两次活动中的第三方库导致Android应用程序关闭

在ffmpeg.c中读取静态vars的问题...

read about the issue with static vars in 'ffmpeg.c' ...

我敢打赌你有同样的问题,需要做一些事情(3替代选择)重置或GC这些vars:

I would bet that u have the same problem and need to do something (3 alternate choices) to reset or GC those vars:


  1. 获取加载lib和GC的java类加载器它

  1. get the java classloader that loaded the lib and GC it

在c层中做OP上面的链接

in the c-layer do what the OP did in above link

写第二个共享库使用'dlsym'和'dlc

write a 2nd shared lib that uses 'dlsym' and 'dlclose' on the first library during each call cycle

github,请参阅'README' here

github , see the 'README' here

同样的问题,你有

这篇关于通过ffmpeg的Android视频修剪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆