mp4parser
mp4parser copied to clipboard
After merging aac and mp4 files, the merged code is not rendering audio.
Movie movie = MovieCreator.build(videopath); AACTrackImpl aacTrack = new AACTrackImpl(new FileDataSourceImpl(audiopath)); CroppedTrack aacCroppedTrack = new CroppedTrack(aacTrack, 1, aacTrack.getSamples().size()); movie.addTrack(aacCroppedTrack); Container mp4file = new DefaultMp4Builder().build(movie); FileOutputStream fileOutputStream = new FileOutputStream(output); FileChannel fc = fileOutputStream.getChannel(); mp4file.writeContainer(fc); fileOutputStream.close();
Where audiopath = directory + "/my_song.aac"; and videopath = directory + "/myvideo.mp4"; If I try to play the output video, only video is getting played. Audio is not playing. Any solution for this?
Did you fix problem?
Movie movie = MovieCreator.build(videopath); AACTrackImpl aacTrack = new AACTrackImpl(new FileDataSourceImpl(audiopath)); CroppedTrack aacCroppedTrack = new CroppedTrack(aacTrack, 1, aacTrack.getSamples().size()); movie.addTrack(aacCroppedTrack); Container mp4file = new DefaultMp4Builder().build(movie); FileOutputStream fileOutputStream = new FileOutputStream(output); FileChannel fc = fileOutputStream.getChannel(); mp4file.writeContainer(fc); fileOutputStream.close();
Where audiopath = directory + "/my_song.aac"; and videopath = directory + "/myvideo.mp4"; If I try to play the output video, only video is getting played. Audio is not playing. Any solution for this?
How did you fix this issue?