A Java API to read, write and create MP4 files

Last update: May 17, 2022
  • Build status: Build Status
  • Current central released version 1.x branch: Maven Central
  • Current central released version 2.x branch: Maven Central

Java MP4 Parser

A Java API to read, write and create MP4 container. Manipulating containers is different from encoding and decoding videos and audio.

Using the library

The library is published to Maven repositories. Each release is pushed to a staging repository which is published on the release page. On request specific releases can be pushed to maven central.

Gradle:

  compile 'org.mp4parser:isoparser:1.9.27'

Maven:

  <dependency>
    <groupId>org.mp4parser</groupId>
    <artifactId>isoparser</artifactId>
    <version>1.9.27</version>
  </dependency>

For projects that do not use a dependency management tool each release's artifacts (jar, javadoc-jar, source-jar) are attached to the release page. Please be aware that the project requires the aspectj-rt.jar library.

What can you do?

Typical tasks for the MP4 Parser are:

  • Muxing audio/video into an MP4 file
  • Append recordings that use same encode settings
  • Adding/Changing metadata
  • Shorten recordings by omitting frames

My examples will all use H264 and AAC as these two codecs are most typical for MP4 files. AC-3 is also not uncommon as the codec is well known from DVD. There are also MP4 files with H263/MPEG-2 video tracks but they are no longer used widespread as most android phones. You can also

Muxing Audio/Video

The API and the process is straight-forward:

  1. You wrap each raw format file into an appropriate Track object.
H264TrackImpl h264Track = new H264TrackImpl(new FileDataSourceImpl("video.h264"));
AACTrackImpl aacTrack = new AACTrackImpl(new FileDataSourceImpl("audio.aac"));
  1. These Track object are then added to a Movie object
Movie movie = new Movie();
movie.addTrack(h264Track);
movie.addTrack(aacTrack);
  1. The Movie object is fed into an MP4Builder to create the container.
Container mp4file = new DefaultMp4Builder().build(movie);
  1. Write the container to an appropriate sink.
FileChannel fc = new FileOutputStream(new File("output.mp4")).getChannel();
mp4file.writeContainer(fc);
fc.close();

There are cases where the frame rate is signalled out of band or is known in advance so that the H264 doesn't contain it literally. In this case you will have to supply it to the constructor.

There are Track implementations for the following formats:

  • H264
  • AAC
  • AC3
  • EC3

and additionally two subtitle tracks that do not directly wrap a raw format but they are conceptually similar.

Typical Issues

Audio and video are not in sync. Whenever there are problems with timing possible make sure to start

Audio starts before video

In AAC there are always samplerate/1024 sample/s so each sample's duration is 1000 * 1024 / samplerate milliseconds.

  • 48KHz => ~21.3ms
  • 44.1KHz => ~23.2ms

By omitting samples from the start you can easily shorten the audio track. Remove as many as you need. You will not be able to match audio and video exactly with that but the human perception is more sensible to early audio than to late audio.

Remember: If someone is only 10 meters away the delay between audio and video is >30ms. The brain is used to that!

AACTrackImpl aacTrackOriginal = new AACTrackImpl(new FileDataSourceImpl("audio.aac"));
// removes the first sample and shortens the AAC track by ~22ms
CroppedTrack aacTrackShort = new CroppedTrack(aacTrackOriginal, 1, aacTrack.getSamples().size());

Append Recordings with Same Encode Settings

It is important to emphasize that you cannot append any two tracks with:

  • Different resolutions
  • Different frame-rates

What can't you do?

Create JPEGs from a movie. No - this is no decoder. The MP4 Parser doesn't know how to do that. Create a movie from JPEGs

GitHub

https://github.com/sannies/mp4parser
Comments
  • 1. NoSuchElementException when accessing list but .size() works ok

    Hello, I'm concatenating several videos to make one. It works for some videos (mainly rather short ones, the longest I tried with success was 5 min 56 sec total. But when I try to join longer set of videos I get exception on audio track .getSamples(). All audio tracks are cropped because of syncing issues so the are CroppedTrack in fact.

    Now more into details. I'm using version 1.1.7 which I believe is the latest.

    This is how error looks like in Watch: how

    As you can see size() works but whole list not.

    The code where this happens is:

    public List<Sample> getSamples() {
        return origTrack.getSamples().subList(fromSample, toSample);
    }
    

    in CroppedTrack.java. If I get into origTrack.getSamples() and run watch on private variable samples I get the error that is attached.

    I think something may be wrong with the implementation of AbstractArray for cropped list. I will try to debug further to find out what's happening but maybe you'll have time to make it even faster.

    The problem is with test case. It doesn't happen for all videos. I crop all of them and some are concatenated without a problem and others throw exception. The one rule I noticed so far, but can't tell it's 100% is that it doesn't work for long video sets. But maybe it's not about time but number of tracks. In this example there are 14 video tracks appended to each other. The error is thrown on second audio track. I go back to debugging. Let me know if you need more details on this.

    Btw. great job with the library! I will donate for sure when this finally works for me :).

    Reviewed by Episodex at 2015-09-27 10:59
  • 2. Replacing audio of video

    Hello, I want to replace an audio of a video with another audio(not append).In other words,I want to remove audio from the video and add other audio to the video.Is it possible through this library?

    Reviewed by bkjbkjbnkj687698698 at 2015-10-21 11:53
  • 3. Opening IsoFile throws OutOfMemory Exception on Android

    Hello everyone. I was using this library for a project at work. I noticed that issue #284 was closed, but I wanted to submit another issue that's similar in nature.

    The project is in Kotlin, but I can convert to Java if it helps with readability of this ticket.

    Device: Google Pixel 2 XL Android Q Beta 2 On IsoParser version 1.9.38

    I'm trying to open an IsoFile via like this: val isoFile = IsoFile(Channels.newChannel(ByteArrayInputStream(base64DecodedString)

    The resulting StackTrace error is the following:

    java.lang.OutOfMemoryError: Failed to allocate a 2064261160 byte allocation with 7167453 free bytes and 505MB until OOM, target footprint 14334909, growth limit 536870912 at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:54) at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:49) at java.nio.ByteBuffer.allocate(ByteBuffer.java:282) at org.mp4parser.support.AbstractBox.parse(AbstractBox.java:96) at org.mp4parser.AbstractBoxParser.parseBox(AbstractBoxParser.java:115) at org.mp4parser.BasicContainer.initContainer(BasicContainer.java:107) at org.mp4parser.IsoFile.<init>(IsoFile.java:57) at org.mp4parser.IsoFile.<init>(IsoFile.java:52) at com.realeyes.adinsertion.exoplayer.PsshParser$Companion.getWidevinePSSH(PsshParser.kt:69) at com.realeyes.adinsertion.components.ads.live.VodPlaylistAdStitcher.checkForDrmKey(VodPlaylistAdStitcher.java:250) at com.realeyes.adinsertion.components.ads.live.VodPlaylistAdStitcher.parseWithVmapPrerolls(VodPlaylistAdStitcher.java:205) at com.realeyes.adinsertion.components.ads.live.VodPlaylistAdStitcher.getPlaylist(VodPlaylistAdStitcher.java:103) at com.realeyes.adinsertion.components.ads.StitchingAdManager.parse(StitchingAdManager.java:68) at com.realeyes.adinsertion.components.ads.StitchingAdManager.parse(StitchingAdManager.java:24) at com.google.android.reexoplayer2.upstream.ParsingLoadable.load(ParsingLoadable.java:158) at com.google.android.reexoplayer2.upstream.Loader$LoadTask.run(Loader.java:389) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:919)

    Would greatly appreciate any advice on the following. I can't seem to determine if it's a truly known bug or not, or if it's something I'm messing up. Let me know if I can give any more information on the issue I'm experiencing.

    Reviewed by thenotoriousrog at 2019-05-07 20:51
  • 4. ArrayIndexOutOfBoundsException in DefaultMp4Builder.createStco

    I'm getting an ArrayIndexOutOfBoundsException with length=8; index=8 when trying to mux aac audio and raw h264 video into an mp4.

    I'm using isoparser:1.0.6 from maven

    The h264 video is generated using libopenh264

    Here's the exception: Caused by: java.lang.ArrayIndexOutOfBoundsException: length=8; index=8 at com.googlecode.mp4parser.authoring.builder.DefaultMp4Builder.createStco(DefaultMp4Builder.java:497) at com.googlecode.mp4parser.authoring.builder.DefaultMp4Builder.createStbl(DefaultMp4Builder.java:360) at com.googlecode.mp4parser.authoring.builder.DefaultMp4Builder.createTrackBox(DefaultMp4Builder.java:321) at com.googlecode.mp4parser.authoring.builder.DefaultMp4Builder.createMovieBox(DefaultMp4Builder.java:225) at com.googlecode.mp4parser.authoring.builder.DefaultMp4Builder.build(DefaultMp4Builder.java:115) at com.smithmicro.mp4Parser.Mp4ParserAudioMuxer.muxH264VideoAACAudio(Mp4ParserAudioMuxer.java:49) at org.jcodec.jcodec_samples.MainActivity.DoOpenh264EncodeTest(MainActivity.java:177) at org.jcodec.jcodec_samples.MainActivity.onCreate(MainActivity.java:124)

    Here's my code:

    public static boolean muxH264VideoAACAudio(int fps, String h264VideoFile, String aacAudioFile, String outputFile){
    
            H264TrackImpl h264Track;
            AACTrackImpl aacTrack;
    
            try {
                h264Track = new H264TrackImpl(new FileDataSourceImpl(h264VideoFile), "eng", fps, 1);
                aacTrack = new AACTrackImpl(new FileDataSourceImpl(aacAudioFile), "eng");
            }
            catch(FileNotFoundException e){
                e.printStackTrace();
                return false;
            }
            catch (IOException e) {
                e.printStackTrace();
                return false;
            }
    
            Movie movie = new Movie();
            movie.addTrack(h264Track);
            movie.addTrack(aacTrack);
    
            Container mp4file = new DefaultMp4Builder().build(movie);
    
            try {
                FileChannel fc = new FileOutputStream(new File(outputFile)).getChannel();
                mp4file.writeContainer(fc);
                fc.close();
            } catch (FileNotFoundException e) {
                e.printStackTrace();
                return false;
            }catch (IOException e) {
                e.printStackTrace();
                return false;
            }
    
            return true;
        }
    
    Reviewed by BrianSDev at 2015-08-12 22:48
  • 5. Tutorial how to set up aspectj runtime weaving with gradle ?

    I'm currently getting

    java.lang.RuntimeException: java.lang.NoSuchMethodException: [class java.lang.String] at com.coremedia.iso.PropertyBoxParserImpl.createBox(PropertyBoxParserImpl.java:120) at com.coremedia.iso.AbstractBoxParser.parseBox(AbstractBoxParser.java:101)

    Which to me looks like it could be something to do with me not setting up aspect-j

    I'm on android.. and I'm not too familiar with the gradle compiler options. Is there like a sample gradle file/ tutorial out there I can use to make sure I have aspectJ runtime weaving compiling ? I've search a lot on the internet with no avail.. Was wondering how the any fellow android developer is doing it ?

    Thanks :)

    Reviewed by renatofernandes28 at 2015-03-28 16:25
  • 6. Sample Code for Cutting/Shorten Videos

    I'm new to this lib, and i want to cut videos and encode and decode a video from .MOV (ios) to .mp4 Can you post a sample code demonstrating the cutting of videos.

    Reviewed by iAviatorJose at 2015-02-25 05:37
  • 7. java.lang.ArrayIndexOutOfBoundsException: length=8; index=8

    Hi, I am having strange problem. I am recording vidoe files from Android surface(originally from GoPro3) and I am adding audio track. I get exception on some files. I can play those files, ffprobe does not show anything strange. And the error shows only in combination with audio track.

    Example: Load mp4 - load video8, extract video track, add to new Movie, save - ok; Load mp4 - load video9, extract video track, add to new Movie, save - ok; Load mp4 - load video8. extract video, add to new Movie, load .aac file, add to movie, ok; Load mp4 - load video9. extract video, add to new Movie, load .aac file, add to movie, error;

    Files are here: https://www.dropbox.com/sh/jvrd5qovoz488du/AACbFSWHNCxqVO1CE1dTwGIca?dl=0

    Here is my code:

    public void openFiles(){
            String dir = Environment.getExternalStorageDirectory()+"/";
            try {
                String video = dir + "video_track9.mp4";
                Movie originalVideo = MovieCreator.build(video);
                List<Track> tracks = originalVideo.getTracks();
                Track videoTrack = null;
                for (int i = 0; i < tracks.size(); i++) {
                    Track t = tracks.get(i);
                    if (t.getHandler().equals("vide")){
                        videoTrack = tracks.get(i);
                    }
                }
                if(null != videoTrack) {
                    Log.d("Main", "start saving: ");
                    Uri uri = Uri.parse(dir + "/twentysec.aac");
                    AACTrackImpl aacTrack = new AACTrackImpl(new FileDataSourceImpl(uri.getPath()));
                    Movie movie = new Movie();
                    movie.addTrack(aacTrack);
                    movie.addTrack(videoTrack);
                    Container mp4file = new DefaultMp4Builder().build(movie);
                    FileChannel fc = new FileOutputStream(dir + "test_output_track9.mp4").getChannel();
                    mp4file.writeContainer(fc);
                    fc.close();
                    Log.d("Main", "saving done: " + video);
                }
                else{
                    Log.d("Main", "mo video track");
                }
            } catch (IOException e) {
                e.printStackTrace();
                Log.d("Muxing",e.toString());
            }
        }
    

    And here is full exception:

    java.lang.ArrayIndexOutOfBoundsException: length=8; index=8
            at com.googlecode.mp4parser.authoring.builder.DefaultMp4Builder.createStco(DefaultMp4Builder.java:497)
            at com.googlecode.mp4parser.authoring.builder.DefaultMp4Builder.createStbl(DefaultMp4Builder.java:360)
            at com.googlecode.mp4parser.authoring.builder.DefaultMp4Builder.createTrackBox(DefaultMp4Builder.java:321)
            at com.googlecode.mp4parser.authoring.builder.DefaultMp4Builder.createMovieBox(DefaultMp4Builder.java:225)
            at com.googlecode.mp4parser.authoring.builder.DefaultMp4Builder.build(DefaultMp4Builder.java:115)
            at com.example.marek.audiorecorder.MainActivity.openFiles(MainActivity.java:92)
            at com.example.marek.audiorecorder.MainActivity.onClick(MainActivity.java:68)
            at android.view.View.performClick(View.java:4761)
            at android.view.View$PerformClick.run(View.java:19767)
            at android.os.Handler.handleCallback(Handler.java:739)
            at android.os.Handler.dispatchMessage(Handler.java:95)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5312)
            at java.lang.reflect.Method.invoke(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:372)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:901)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:696)
    

    The problem is, I do not know where to look for the error. Is it in video or audio track? Also, when I tried to use FragmentedMp4Builder - the movie was saved. But library I use for reading the final file had problems reading it, so FragmentedMp4Builder is not a solution for me... The error log shows error on line:

    Container mp4file = new DefaultMp4Builder().build(movie);
    

    Thanks for repsonse!

    Reviewed by m-o at 2015-08-18 10:11
  • 8. null pointer exception

    hai sannies,

    I am getting null pointer exception at

    at com.googlecode.mp4parser.authoring.tracks.H264TrackImpl$SliceHeader.(H264TrackImpl.java:541)

    for the below code,

    H264TrackImpl h264Track = new H264TrackImpl(new FileDataSourceImpl(android.os.Environment.getExternalStorageDirectory().getAbsolutePath() + "/test.h264"));

    Movie movie = new Movie(); movie.addTrack(h264Track); Container mp4file = new DefaultMp4Builder().build(movie);

    FileChannel fc = new FileOutputStream(new File(android.os.Environment.getExternalStorageDirectory().getAbsolutePath() + "/decodingvideo.mp4")).getChannel(); mp4file.writeContainer(fc); fc.close();

    Please help me how to do this?

    Reviewed by mohanraj546 at 2015-01-30 05:08
  • 9. Simple audio track tests are giving strange parse errors

    I'm getting these kinds of exceptions from various test programs. From trying to debug the issue, I get very strange behavior with the bit alignment when trying to read the audio files.

    Exception in thread "main" java.io.IOException: Expected Start Word 0xfff
        at com.googlecode.mp4parser.authoring.tracks.AACTrackImpl.readADTSHeader(AACTrackImpl.java:293)
        at com.googlecode.mp4parser.authoring.tracks.AACTrackImpl.readSamples(AACTrackImpl.java:325)
        at com.googlecode.mp4parser.authoring.tracks.AACTrackImpl.(AACTrackImpl.java:142)
        at com.googlecode.mp4parser.authoring.tracks.AACTrackImpl.(AACTrackImpl.java:135)
    

    I initially received a similar error with an mp3 test:

    Exception in thread "main" java.io.IOException: Expected Start Word 0x7ff
        at com.googlecode.mp4parser.authoring.tracks.MP3TrackImpl.readMP3Header(MP3TrackImpl.java:200)
        at com.googlecode.mp4parser.authoring.tracks.MP3TrackImpl.readSamples(MP3TrackImpl.java:175)
        at com.googlecode.mp4parser.authoring.tracks.MP3TrackImpl.(MP3TrackImpl.java:64)
        at com.googlecode.mp4parser.authoring.tracks.MP3TrackImpl.(MP3TrackImpl.java:53)
        at Greg2.main(Greg2.java:26)
    

    and it seemed that making test changes to the MP3TrackImpl.java class after the code causing the problem would affect earlier code. For example, if I commented out the line:

            hdr.layer = brb.readBits(2); // C
    

    The code would make it past the above code.

    I was also playing around with the bits coming back from the line:

            BitReaderBuffer brb = new BitReaderBuffer((ByteBuffer) bb.rewind());
            int sync = brb.readBits(11); // A
    

    and everything worked fine up to a >>> 4 on sync. However, if I did a >>> 5, the bits would then get scrambled. It is as if the jvm is improperly optimizing the code or messing up the memory alignment.

    I've tested these things against multiple releases: isoparser-1.0.3.11.jar isoparser-1.0.4.1.jar isoparser-1.0.4.2.jar

    Any ideas?

    Reviewed by gbildson at 2014-11-05 23:21
  • 10. OutOfMemoryError when try to get size of moov box

    I got OutOfMemoryError when I run this code: MovieBox moov = isoFile.getBoxes(MovieBox.class).get(0); mMoovSize = moov.getSize();

    Here is the log: java.lang.OutOfMemoryError: Failed to allocate a 1751411830 byte allocation with 13437012 free bytes and 236MB until OOM 01-15 11:59:05.475: E/AndroidRuntime(10820): at java.nio.ByteBuffer.allocate(ByteBuffer.java:56) 01-15 11:59:05.475: E/AndroidRuntime(10820): at com.googlecode.mp4parser.AbstractBox.parse(AbstractBox.java:110) 01-15 11:59:05.475: E/AndroidRuntime(10820): at com.coremedia.iso.AbstractBoxParser.parseBox(AbstractBoxParser.java:107) 01-15 11:59:05.475: E/AndroidRuntime(10820): at com.googlecode.mp4parser.BasicContainer.next(BasicContainer.java:185) 01-15 11:59:05.475: E/AndroidRuntime(10820): at com.googlecode.mp4parser.BasicContainer.hasNext(BasicContainer.java:161) 01-15 11:59:05.475: E/AndroidRuntime(10820): at com.googlecode.mp4parser.util.LazyList.blowup(LazyList.java:30) 01-15 11:59:05.475: E/AndroidRuntime(10820): at com.googlecode.mp4parser.util.LazyList.size(LazyList.java:77) 01-15 11:59:05.475: E/AndroidRuntime(10820): at com.googlecode.mp4parser.BasicContainer.getContainerSize(BasicContainer.java:67) 01-15 11:59:05.475: E/AndroidRuntime(10820): at com.coremedia.iso.boxes.MetaBox.getSize(MetaBox.java:95) 01-15 11:59:05.475: E/AndroidRuntime(10820): at com.googlecode.mp4parser.BasicContainer.getContainerSize(BasicContainer.java:70) 01-15 11:59:05.475: E/AndroidRuntime(10820): at com.googlecode.mp4parser.AbstractContainerBox.getSize(AbstractContainerBox.java:57)

    Reviewed by sunshinetpu at 2016-01-15 05:00
  • 11. MP3TrackImpl

    Hi! I have a problem using MP3TrackImpl: java.io.IOException: Expected Start Word 0x7ff 01-05 11:05:19.754 11731-11870/de.fsappz.musicvideomaker W/System.err: at com.googlecode.mp4parser.authoring.tracks.MP3TrackImpl.readMP3Header(MP3TrackImpl.java:183) 01-05 11:05:19.754 11731-11870/de.fsappz.musicvideomaker W/System.err: at com.googlecode.mp4parser.authoring.tracks.MP3TrackImpl.readSamples(MP3TrackImpl.java:154) 01-05 11:05:19.754 11731-11870/de.fsappz.musicvideomaker W/System.err: at com.googlecode.mp4parser.authoring.tracks.MP3TrackImpl.<init>(MP3TrackImpl.java:60) 01-05 11:05:19.754 11731-11870/de.fsappz.musicvideomaker W/System.err: at com.googlecode.mp4parser.authoring.tracks.MP3TrackImpl.<init>(MP3TrackImpl.java:53)

    Im using MP3TrackImpl like this: MP3TrackImpl mp3Track = new MP3TrackImpl(new FileDataSourceImpl(audio); (Exception is thrown in this line)

    Thank you very much!

    Reviewed by fsappz78 at 2019-01-05 10:17
  • 12. VP9 support for mp4parser

    Hi everyone! I have issues getting mp4parser working with VP9 encoded files. When trying, I get the following error message:

    [...]
    java.lang.AssertionError: stsd contains not only sample entries. Something's wrong here! Bailing out
            at org.mp4parser.muxer.container.mp4.DefaultMp4SampleList.<init>(DefaultMp4SampleList.java:58)
    [...]
    

    Is there any way to enable vp9 support? Thanks for your help! Jan

    Reviewed by yetanotherjan at 2022-02-18 13:45
  • 13. MovieCreator.build(file) NullPointerException

    I got a while i call the build method, just like below, can anybody help public static void startTrim(File src, File dst, int startMs, int endMs) throws IOException { FileDataSourceImpl file = new FileDataSourceImpl(src); Movie movie = MovieCreator.build(file); // here i got the NullPointerException // remove all tracks we will create new tracks from the old List<Track> tracks = movie.getTracks(); movie.setTracks(new LinkedList<Track>());

    Reviewed by StormLion at 2021-12-16 12:05
  • 14. Write MP4 file from RTSP stream

    Hi, would it be possible to write a mp4 file by getting video/audio data from an address with rtsp protocol?

    It seems I should be able to get an InputStream from a http url with URL("http://...").openStream(), but how do I make it work with RTSP?

    Thank you!

    Reviewed by LucaBL at 2021-11-26 08:44
  • 15. Java mp4parser to create a single .m4s fragment (without malformation)

    Also posted to: https://stackoverflow.com/questions/69625970/java-mp4parser-to-create-a-single-m4s-fragment with a +100 reputation bounty for a solution!

    This use case is a service that manually encodes a series of uncompressed .wav media segments into .m4s fragments for broadcast via MPEG-DASH, using ffmpeg to compress the .wav to .aac and sannies/mp4parser to assemble the aac audio into an .m4s media fragment.

    I created this public GitHub project to reproduce the issue in its entirety.

    For example, here's the custom CustomFragmentMp4Builder.java class.

    It's critical that we be able to designate this single .m4s fragment with a sequence number (index) that we will manually increment for each media segment.

    The objective is to build an .m4s fragment comprising the box types SegmentTypeBox, SegmentIndexBox, and MovieFragmentBox. As For reference, I have used mp4parser to inspect an .m4s fragment that was generated via ffmpeg -f hls. This specification is available here as a .yaml file

    My implementation creates an MP4 without error. But, when the unit test attempts to read the file that the ChunkMp4Builder just wrote to a temp folder:

    java.lang.RuntimeException: A cast to int has gone wrong. Please contact the mp4parser discussion group (3724673092)
    	at org.mp4parser.tools.CastUtils.l2i(CastUtils.java:30)
    	at org.mp4parser.support.AbstractBox.parse(AbstractBox.java:97)
    	at org.mp4parser.AbstractBoxParser.parseBox(AbstractBoxParser.java:116)
    	at org.mp4parser.BasicContainer.initContainer(BasicContainer.java:107)
    	at org.mp4parser.IsoFile.<init>(IsoFile.java:57)
    	at org.mp4parser.IsoFile.<init>(IsoFile.java:52)
    	at com.charneykaye.TestBase.getMp4Boxes(TestBase.java:116)
    	at com.charneykaye.CustomFragmentMp4BuilderTest.run(CustomFragmentMp4BuilderTest.java:78)
    

    The expected box types SegmentTypeBox, SegmentIndexBox, and MovieFragmentBox do appear in the output:

    [The expected box types SegmentTypeBox, SegmentIndexBox, and MovieFragmentBox do appear in the output]2

    However, at the end of the file appears a box of an unknown type:

    [There seems to be a box of an unknown type, appearing at the end of the file.]3

    Reviewed by charneykaye at 2021-10-21 19:46
  • 16. Class Not Found Exception : org,mp4parser.boxes.iso.14496.part12.FileTypeBox.

    Hi , I am getting the error on release build "Class Not Found Exception : org,mp4parser.boxes.iso.14496.part12.FileTypeBox." I added these lines even after I am getting the error. -keep class com.tencent.** { ; } -keep class * implements com.coremedia.iso.boxes.Box { ; } -dontwarn com.coremedia.iso.boxes.* -dontwarn com.googlecode.mp4parser.authoring.tracks.mjpeg.** -dontwarn com.googlecode.mp4parser.authoring.tracks.ttml.** -keep class com.coremedia.iso.boxes.** { ; } -keep class com.googlecode.mp4parser.boxes.mp4.ESDescriptorBox { ; } -keep class $package. { *; }

    Reviewed by nisha-rana16 at 2021-10-08 13:02
Blade is an open source music player for Android, allowing you to play music from multiple services : files on your phone, Spotify, and more.
Blade is an open source music player for Android, allowing you to play music from multiple services : files on your phone, Spotify, and more.

Blade Player Blade is an open source music player for Android, allowing you to play music from multiple services : files on your phone, Spotify, and m

May 3, 2022
Video Transcoder is an application which uses the open source program FFmpeg to transcode video files from one format to another.
Video Transcoder is an application which uses the open source program FFmpeg to transcode video files from one format to another.

Video Transcoder Do you want to encode videos on your phone into different formats, trim videos, or extract audio? Are you looking for a free solution

May 16, 2022
Wynncraft API Wrapper - Simple wrapper to get Wynncraft Stats of a player or a guild and more in Java

WynncraftAPIWrapper Simple wrapper to get Wynncraft Stats of a player or a guild

Jan 3, 2022
Noice is an android app that allows you to create your own set of background sounds by mixing clips from environmental sources.
Noice is an android app that allows you to create your own set of background sounds by mixing clips from environmental sources.

A native Android app to relax, improve focus and boost productivity with minimal background noise.

May 9, 2022
A simple library for parsing and playing links from YouTube, YouTube Music, Vimeo and Rutube is WebView without the need to connect api data services. Request caching is available now
A simple library for parsing and playing links from YouTube, YouTube Music, Vimeo and Rutube is WebView without the need to connect api data services. Request caching is available now

Android Oembed Video A simple library for parsing and playing links from YouTube, YouTube Music, Vimeo and Rutube and others in the WebView without th

Mar 22, 2022
Convert your YouTube channel into a native Android app using YouTube Data API v3.
Convert your YouTube channel into a native Android app using YouTube Data API v3.

Convert your YouTube channel into an app. Screenshots • Description • Features • Configuration • Documentation Screenshots Description Channelify is a

Apr 9, 2022
The official Android client library for api.video
The official Android client library for api.video

api.video Android client api.video is the video infrastructure for product builders. Lightning fast video APIs for integrating, scaling, and managing

Apr 28, 2022
Autodownload MP3 API With Kotlin

Autodownload MP3 API Overview This project leverages Spring Boot, Google's YouTube API, and youtube-dl to provide an API to download videos and conver

Jan 14, 2022
Android app that uses Spotify API to recommend new music based on your listening history

Android app that uses Spotify API to recommend new music based on your listening history. Written in Kotlin and uses Spotify Web API and Android SDK. New music is presented in swipe cards where a left swipe plays the next song and a right swipe can add the app to your liked songs in Spotify.

May 16, 2022
Free p2p cdn android github sdk to reduce video streaming costs of live and on demand video using webrtc by upto 90% and improve scalability by 6x - 🚀 Vadootv 🚀
Free p2p cdn android github sdk to reduce video streaming costs  of live and on demand video using webrtc by upto 90% and improve scalability by 6x - 🚀 Vadootv 🚀

Android p2p cdn sdk to distribute load and reduce costs(https://peervadoo.com) Vadootv is a p2p sdk integration to reduce your video streaming costs b

Apr 11, 2022
Simple and lightweight, yet polished and powerful Android video player based on ExoPlayer
Simple and lightweight, yet polished and powerful Android video player based on ExoPlayer

Just (Video) Player Android video player based on ExoPlayer It uses ExoPlayer's extension-ffmpeg with all its audio formats enabled (it can handle eve

May 18, 2022
Fermata Media Player is a free, open source audio and video player with a simple and intuitive interface.

Fermata Media Player About Fermata Media Player is a free, open source audio and video player with a simple and intuitive interface. It is focused on

May 11, 2022
Echo is a lightweight and minimal music player for Android, built with Android Studio and written in Kotlin
Echo is a lightweight and minimal music player for Android, built with Android Studio and written in Kotlin

Echo - Echo, A light-weight, minimal music player for Android, with shuffle, favorites and audio visualization

Feb 7, 2022
Custom Android view with video player, loader and placeholder image
Custom Android view with video player, loader and placeholder image

VideoPlayerView Custom Android view with video player, loader and placeholder image. To stay up-to-date with news about the library Usage Here is an e

Jan 18, 2022
Android Texture VideoView having a variety of scale types like the scale types of ImageView such as fitCenter, centerCrop, centerTopCrop and more
Android Texture VideoView having a variety of scale types like the scale types of ImageView such as fitCenter, centerCrop, centerTopCrop and more

Android-ScalableVideoView Looking for the extra scale types of ImageView? Check out ScalableImageView. Android Texture VideoView having a variety of s

Apr 25, 2022
VideoView that plays video only when :eyes: are open and :boy: is detected with various other features
VideoView that plays video only when :eyes: are open and :boy: is detected with various other features

LookAtMe VideoView that plays video only when ?? are open and ?? is detected with various other features GIF AndroidPub (Medium) Post You can read the

May 4, 2022
A elegant and light weight music player for android
A elegant and light weight music player for android

A elegant and light weight music player for android

Apr 27, 2022
Lightweight and Material designed Music Player
Lightweight and Material designed Music Player

Music Player Lightweight and Material designed Music Player Based on Phonograph Features: Settings: Active tabs management Themes: Light, Dark, Black

May 12, 2022