I have an MP4 file that I generate with jcodec.
I then have an AAC file I generate with Android's MediaCodec.
I want to mux them together into a single file and since I don't want to limit my Android API too high, I'm opting for MP4Parser.
Currently, I'm doing the standard:
H264TrackImpl h264Track = new H264TrackImpl(new FileDataSourceImpl("input.mp4"));
AACTrackImpl aacTrack = new AACTrackImpl(new FileDataSourceImpl("input.aac"));
Movie movie = new Movie(); movie.addTrack(h264Track); movie.addTrack(aacTrack);
Container mp4file = new DefaultMp4Builder().build(movie);
FileOutputStream fileOutputStream = new FileOutputStream(new File("output.mp4"));
FileChannel fc = fileOutputStream.getChannel();
mp4file.writeContainer(fc);
fileOutputStream.close();
However, the app crashes on this line:
H264TrackImpl h264Track = new H264TrackImpl(new FileDataSourceImpl("input.mp4"));
With this as the stack trace:09-01 18:46:40.611: E/AndroidRuntime(14115): FATAL EXCEPTION: GLThread 1260
09-01 18:46:40.611: E/AndroidRuntime(14115): Process: package.app, PID: 14115
09-01 18:46:40.611: E/AndroidRuntime(14115): java.lang.RuntimeException: Sequence parameter set extension is not yet handled. Needs TLC.
09-01 18:46:40.611: E/AndroidRuntime(14115): at com.googlecode.mp4parser.authoring.tracks.H264TrackImpl.readSamples(H264TrackImpl.java:362)
09-01 18:46:40.611: E/AndroidRuntime(14115): at com.googlecode.mp4parser.authoring.tracks.H264TrackImpl.parse(H264TrackImpl.java:108)
09-01 18:46:40.611: E/AndroidRuntime(14115): at com.googlecode.mp4parser.authoring.tracks.H264TrackImpl.<init>(H264TrackImpl.java:90)
09-01 18:46:40.611: E/AndroidRuntime(14115): at com.googlecode.mp4parser.authoring.tracks.H264TrackImpl.<init>(H264TrackImpl.java:96)
09-01 18:46:40.611: E/AndroidRuntime(14115): at com.googlecode.mp4parser.authoring.tracks.H264TrackImpl.<init>(H264TrackImpl.java:100)
09-01 18:46:40.611: E/AndroidRuntime(14115): at ...
So I'm not really sure what that means? Does jcodec output an MP4 file (which works in all video players btw) that isn't compatible with MP4Parser?
What should I be looking into to fix this?
Appreciate any advice!
--
You received this message because you are subscribed to the Google Groups "mp4parser-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mp4parser-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.