mp4parser icon indicating copy to clipboard operation
mp4parser copied to clipboard

After merging aac and mp4 files, the merged code is not rendering audio.

Open Prasadph123 opened this issue 5 years ago • 2 comments

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?

Prasadph123 avatar Apr 14 '19 15:04 Prasadph123

Did you fix problem?

rasfront avatar Jun 05 '19 10:06 rasfront

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?

nguyen-tam avatar Mar 25 '20 05:03 nguyen-tam