Open Prasadph123 opened 5 years ago
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?
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?