zouhouzi / mp4parser

Automatically exported from code.google.com/p/mp4parser
0 stars 0 forks source link

combine videos crash the app #94

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I download the latest source code for mp4parser and use this to combine two mp4 
files.
When I try to combine two mp4 videos app crashed. 

when I run this line of code
 MovieCreator.build("mnt/sdcard/CamVideo/0.mp4")

The app crashed with and crash log is

08-11 17:27:49.023: E/AndroidRuntime(24864): FATAL EXCEPTION: main
08-11 17:27:49.023: E/AndroidRuntime(24864): 
java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
08-11 17:27:49.023: E/AndroidRuntime(24864):    at 
com.googlecode.mp4parser.authoring.samples.DefaultMp4SampleList.<init>(DefaultMp
4SampleList.java:52)
08-11 17:27:49.023: E/AndroidRuntime(24864):    at 
com.coremedia.iso.boxes.mdat.SampleList.<init>(SampleList.java:33)
08-11 17:27:49.023: E/AndroidRuntime(24864):    at 
com.googlecode.mp4parser.authoring.Mp4TrackImpl.<init>(Mp4TrackImpl.java:59)
08-11 17:27:49.023: E/AndroidRuntime(24864):    at 
com.googlecode.mp4parser.authoring.container.mp4.MovieCreator.build(MovieCreator
.java:58)
08-11 17:27:49.023: E/AndroidRuntime(24864):    at 
com.googlecode.mp4parser.authoring.container.mp4.MovieCreator.build(MovieCreator
.java:39)
08-11 17:27:49.023: E/AndroidRuntime(24864):    at 
com.coderzheaven.pack.CustomCameraActivity.MergeVideos(CustomCameraActivity.java
:200)
08-11 17:27:49.023: E/AndroidRuntime(24864):    at 
com.coderzheaven.pack.CustomCameraActivity$1.onClick(CustomCameraActivity.java:1
08)
08-11 17:27:49.023: E/AndroidRuntime(24864):    at 
android.view.View.performClick(View.java:4274)
08-11 17:27:49.023: E/AndroidRuntime(24864):    at 
android.view.View$PerformClick.run(View.java:17357)
08-11 17:27:49.023: E/AndroidRuntime(24864):    at 
android.os.Handler.handleCallback(Handler.java:615)
08-11 17:27:49.023: E/AndroidRuntime(24864):    at 
android.os.Handler.dispatchMessage(Handler.java:92)
08-11 17:27:49.023: E/AndroidRuntime(24864):    at 
android.os.Looper.loop(Looper.java:137)
08-11 17:27:49.023: E/AndroidRuntime(24864):    at 
android.app.ActivityThread.main(ActivityThread.java:4949)
08-11 17:27:49.023: E/AndroidRuntime(24864):    at 
java.lang.reflect.Method.invokeNative(Native Method)
08-11 17:27:49.023: E/AndroidRuntime(24864):    at 
java.lang.reflect.Method.invoke(Method.java:511)
08-11 17:27:49.023: E/AndroidRuntime(24864):    at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1043)
08-11 17:27:49.023: E/AndroidRuntime(24864):    at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:810)
08-11 17:27:49.023: E/AndroidRuntime(24864):    at 
dalvik.system.NativeStart.main(Native Method)

I am using the same properties files that is in sample code 
"isoparser-custom.properties" and "isoparser-default.properties"

I am expecting movie object should build  properly. Can anyone tell me what I 
am doing wrong in this or can send me fully function code that merge two mp4 
files.

Please provide any additional information below.

Original issue reported on code.google.com by kokabwa...@gmail.com on 11 Aug 2014 at 12:32

GoogleCodeExporter commented 8 years ago
Two issues here:
-1- googlecode repository is outdated. Please use the github repository
-2- Do not download the sources. Use a released version. 

Original comment by Sebastian.Annies on 11 Aug 2014 at 12:37

GoogleCodeExporter commented 8 years ago
I already using the code download from github. I download the folder and create 
project for isoparser and make jar file but the above crash raise. Can you tell 
me where is release version. the github link take me 
https://github.com/sannies/mp4parser  and it has three folders isoparser, 
androidtest and examples. But could not find release.

Original comment by kokabwa...@gmail.com on 12 Aug 2014 at 4:48

GoogleCodeExporter commented 8 years ago
At this link https://github.com/sannies/mp4parser/releases we have option only 
to download the source code.

Original comment by kokabwa...@gmail.com on 12 Aug 2014 at 4:54

GoogleCodeExporter commented 8 years ago
It's a maven project, release are available at maven central. 

Original comment by Sebastian.Annies on 12 Aug 2014 at 6:25

GoogleCodeExporter commented 8 years ago
I download this file "isoparser-1.0.2.jar" from maven project and but app 
crashed with this crash report

08-18 17:32:20.571: E/AndroidRuntime(31446): FATAL EXCEPTION: main
08-18 17:32:20.571: E/AndroidRuntime(31446): 
java.lang.ExceptionInInitializerError
08-18 17:32:20.571: E/AndroidRuntime(31446):    at 
java.lang.Class.classForName(Native Method)
08-18 17:32:20.571: E/AndroidRuntime(31446):    at 
java.lang.Class.forName(Class.java:217)
08-18 17:32:20.571: E/AndroidRuntime(31446):    at 
java.lang.Class.forName(Class.java:172)
08-18 17:32:20.571: E/AndroidRuntime(31446):    at 
com.coremedia.iso.PropertyBoxParserImpl.createBox(PropertyBoxParserImpl.java:86)
08-18 17:32:20.571: E/AndroidRuntime(31446):    at 
com.coremedia.iso.AbstractBoxParser.parseBox(AbstractBoxParser.java:102)
08-18 17:32:20.571: E/AndroidRuntime(31446):    at 
com.googlecode.mp4parser.BasicContainer.next(BasicContainer.java:155)
08-18 17:32:20.571: E/AndroidRuntime(31446):    at 
com.googlecode.mp4parser.BasicContainer.hasNext(BasicContainer.java:131)
08-18 17:32:20.571: E/AndroidRuntime(31446):    at 
com.googlecode.mp4parser.util.LazyList$1.hasNext(LazyList.java:55)
08-18 17:32:20.571: E/AndroidRuntime(31446):    at 
com.coremedia.iso.IsoFile.getMovieBox(IsoFile.java:109)
08-18 17:32:20.571: E/AndroidRuntime(31446):    at 
com.googlecode.mp4parser.authoring.container.mp4.MovieCreator.build(MovieCreator
.java:48)
08-18 17:32:20.571: E/AndroidRuntime(31446):    at 
com.googlecode.mp4parser.authoring.container.mp4.MovieCreator.build(MovieCreator
.java:35)
08-18 17:32:20.571: E/AndroidRuntime(31446):    at 
com.coderzheaven.pack.CustomCameraActivity.MergeVideos(CustomCameraActivity.java
:200)
08-18 17:32:20.571: E/AndroidRuntime(31446):    at 
com.coderzheaven.pack.CustomCameraActivity$1.onClick(CustomCameraActivity.java:1
08)
08-18 17:32:20.571: E/AndroidRuntime(31446):    at 
android.view.View.performClick(View.java:3517)
08-18 17:32:20.571: E/AndroidRuntime(31446):    at 
android.view.View$PerformClick.run(View.java:14155)
08-18 17:32:20.571: E/AndroidRuntime(31446):    at 
android.os.Handler.handleCallback(Handler.java:605)
08-18 17:32:20.571: E/AndroidRuntime(31446):    at 
android.os.Handler.dispatchMessage(Handler.java:92)
08-18 17:32:20.571: E/AndroidRuntime(31446):    at 
android.os.Looper.loop(Looper.java:137)
08-18 17:32:20.571: E/AndroidRuntime(31446):    at 
android.app.ActivityThread.main(ActivityThread.java:4666)
08-18 17:32:20.571: E/AndroidRuntime(31446):    at 
java.lang.reflect.Method.invokeNative(Native Method)
08-18 17:32:20.571: E/AndroidRuntime(31446):    at 
java.lang.reflect.Method.invoke(Method.java:511)
08-18 17:32:20.571: E/AndroidRuntime(31446):    at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:809)
08-18 17:32:20.571: E/AndroidRuntime(31446):    at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:576)
08-18 17:32:20.571: E/AndroidRuntime(31446):    at 
dalvik.system.NativeStart.main(Native Method)
08-18 17:32:20.571: E/AndroidRuntime(31446): Caused by: 
java.lang.NoClassDefFoundError: org.aspectj.runtime.reflect.Factory
08-18 17:32:20.571: E/AndroidRuntime(31446):    at 
com.coremedia.iso.boxes.FileTypeBox.ajc$preClinit(FileTypeBox.java:1)
08-18 17:32:20.571: E/AndroidRuntime(31446):    at 
com.coremedia.iso.boxes.FileTypeBox.<clinit>(FileTypeBox.java:1)
08-18 17:32:20.571: E/AndroidRuntime(31446):    ... 24 more

Original comment by kokabwa...@gmail.com on 18 Aug 2014 at 12:37