[I have found below link upon stackoverflow but it does not match my requirements. I am trying to append videos by presenting a custom gallery to user in which all the videos stored in sdcard is displayed and the user has to select any number of them and finally after pressing append button videos get merged/appended, it works fine in many cases but it fails in some cases don't understand this error and how to solve it. And the link above is used to setVideoCodec for videos which are recorded from application itself which I am not doing. How to change videocodec of already available mp4 video?
This is the Log error that I get while appending.I have also printed sample box description entries to get help out of it but to no avail and I can see the sample box description entries are same and there is no documentation of Isoparser Library which can help me out. I am using isoparser-1.0-RC-2.jar
and aspectjrt-1.8.0.jar
as the latest isoparser library didn't work for me :-(
java-io-ioexception-cannot-append-mp4trackimplhandler-vide-to-mp4trackimpl
09-03 11:53:43.390: I/MERGE_VIDEO_ACTIVITY(28345): SampleDescriptionBox[AudioSampleEntry]
09-03 11:53:43.390: I/MERGE_VIDEO_ACTIVITY(28345): SampleDescriptionBox[com.coremedia.iso.boxes.sampleentry.VisualSampleEntry@42118240]
09-03 11:53:43.390: I/MERGE_VIDEO_ACTIVITY(28345): SampleDescriptionBox[AudioSampleEntry]
09-03 11:53:43.390: I/MERGE_VIDEO_ACTIVITY(28345): SampleDescriptionBox[com.coremedia.iso.boxes.sampleentry.VisualSampleEntry@41f08c60]
09-03 11:53:43.400: W/System.err(28345): java.io.IOException: Cannot append com.googlecode.mp4parser.authoring.Mp4TrackImpl@42008d78 to com.googlecode.mp4parser.authoring.Mp4TrackImpl@41ef5d90 since their Sample Description Boxes differ
09-03 11:53:43.400: W/System.err(28345): at com.googlecode.mp4parser.authoring.tracks.AppendTrack.<init>(AppendTrack.java:48)
09-03 11:53:43.400: W/System.err(28345): at com.spec.videoeditingdemo.service.asynctasks.MergeVideos.doInBackground(MergeVideos.java:113)
09-03 11:53:43.400: W/System.err(28345): at com.spec.videoeditingdemo.service.asynctasks.MergeVideos.doInBackground(MergeVideos.java:1)
09-03 11:53:43.400: W/System.err(28345): at android.os.AsyncTask$2.call(AsyncTask.java:288)
09-03 11:53:43.400: W/System.err(28345): at java.util.concurrent.FutureTask.run(FutureTask.java:237)
09-03 11:53:43.400: W/System.err(28345): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
09-03 11:53:43.400: W/System.err(28345): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
09-03 11:53:43.400: W/System.err(28345): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
09-03 11:53:43.400: W/System.err(28345): at java.lang.Thread.run(Thread.java:841)
-Thanks in advance. I would be very happy if somebody could help me out with the issue.