我试图通过缩短示例来制作视频分割应用。我正在尝试从github实现以下项目。 https://github.com/dadachi/TestMp4parser。
但该应用无法正常工作和中止。
LogCat -
08-05 17:03:42.161: D/OpenGLRenderer(6834): Enabling debug mode 0
08-05 17:03:44.934: D/do shoren starting(6834): do shoren starting
08-05 17:03:44.944: W/dalvikvm(6834): threadid=12: thread exiting with uncaught exception (group=0x4151e700)
08-05 17:03:44.944: E/AndroidRuntime(6834): FATAL EXCEPTION: doShorten
08-05 17:03:44.944: E/AndroidRuntime(6834): java.lang.RuntimeException: No box object found for ftyp
08-05 17:03:44.944: E/AndroidRuntime(6834): at com.coremedia.iso.PropertyBoxParserImpl$FourCcToBox.invoke(PropertyBoxParserImpl.java:187)
08-05 17:03:44.944: E/AndroidRuntime(6834): at com.coremedia.iso.PropertyBoxParserImpl.createBox(PropertyBoxParserImpl.java:90)
08-05 17:03:44.944: E/AndroidRuntime(6834): at com.coremedia.iso.AbstractBoxParser.parseBox(AbstractBoxParser.java:87)
08-05 17:03:44.944: E/AndroidRuntime(6834): at com.coremedia.iso.IsoFile.parse(IsoFile.java:85)
08-05 17:03:44.944: E/AndroidRuntime(6834): at com.coremedia.iso.IsoFile.<init>(IsoFile.java:54)
08-05 17:03:44.944: E/AndroidRuntime(6834): at com.googlecode.mp4parser.authoring.container.mp4.MovieCreator.build(MovieCreator.java:32)
08-05 17:03:44.944: E/AndroidRuntime(6834): at ek.shor.shortanproj.ShortenExample$1.run(ShortenExample.java:105)
08-05 17:03:44.944: E/AndroidRuntime(6834): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
08-05 17:03:44.944: E/AndroidRuntime(6834): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
08-05 17:03:44.944: E/AndroidRuntime(6834): at java.lang.Thread.run(Thread.java:841)
08-05 17:03:45.535: E/WindowManager(6834): Activity ek.shor.shortanproj.MainActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{41df8010 V.E..... R......D 0,0-729,192} that was originally added here
08-05 17:03:45.535: E/WindowManager(6834): android.view.WindowLeaked: Activity ek.shor.shortanproj.MainActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{41df8010 V.E..... R......D 0,0-729,192} that was originally added here
08-05 17:03:45.535: E/WindowManager(6834): at android.view.ViewRootImpl.<init>(ViewRootImpl.java:345)
08-05 17:03:45.535: E/WindowManager(6834): at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:239)
08-05 17:03:45.535: E/WindowManager(6834): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69)
08-05 17:03:45.535: E/WindowManager(6834): at android.app.Dialog.show(Dialog.java:281)
08-05 17:03:45.535: E/WindowManager(6834): at org.bestforce.utils.Ut.ShowWaitDialog(Ut.java:40)
08-05 17:03:45.535: E/WindowManager(6834): at ek.shor.shortanproj.ShortenExample.doShorten(ShortenExample.java:82)
08-05 17:03:45.535: E/WindowManager(6834): at ek.shor.shortanproj.ShortenExample.shorten(ShortenExample.java:78)
08-05 17:03:45.535: E/WindowManager(6834): at ek.shor.shortanproj.MainActivity.onClick(MainActivity.java:50)
08-05 17:03:45.535: E/WindowManager(6834): at android.view.View.performClick(View.java:4240)
08-05 17:03:45.535: E/WindowManager(6834): at android.view.View$PerformClick.run(View.java:17721)
08-05 17:03:45.535: E/WindowManager(6834): at android.os.Handler.handleCallback(Handler.java:730)
08-05 17:03:45.535: E/WindowManager(6834): at android.os.Handler.dispatchMessage(Handler.java:92)
08-05 17:03:45.535: E/WindowManager(6834): at android.os.Looper.loop(Looper.java:137)
08-05 17:03:45.535: E/WindowManager(6834): at android.app.ActivityThread.main(ActivityThread.java:5103)
08-05 17:03:45.535: E/WindowManager(6834): at java.lang.reflect.Method.invokeNative(Native Method)
08-05 17:03:45.535: E/WindowManager(6834): at java.lang.reflect.Method.invoke(Method.java:525)
08-05 17:03:45.535: E/WindowManager(6834): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
08-05 17:03:45.535: E/WindowManager(6834): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
08-05 17:03:45.535: E/WindowManager(6834): at dalvik.system.NativeStart.main(Native Method)
文件与git hub项目中的文件相同。请让我知道我正在做的错误是我犯的错误。
答案 0 :(得分:0)
TestMp4Parser示例未更新。 Mp4Parser库已更新,有新的方法可以拆分和附加视频。