ffmpeg-cli-wrapper
ffmpeg-cli-wrapper copied to clipboard
compressed mp4 video is taking too much time to play in android
I used cli-wrapper to compress 44mb MP4 video to 5.7mb video, it compressed well but taking too long time to play in android(exoplayer from google).
FFmpegBuilder builder = new FFmpegBuilder()
.setInput("D:/dummyVideos/AWS video/myvideo.mp4") // Filename, or a FFmpegProbeResult
.overrideOutputFiles(true) // Override the output if it exists
.addOutput("D:/dummyVideos/AWS video/myvideo_ffmpeg.mp4") // Filename for the destination
.setFormat("mp4") // Format is inferred from filename, or can be set
.disableSubtitle() // No subtiles
.setAudioChannels(1) // Mono audio
.setAudioCodec("aac") // using the aac codec
.setAudioSampleRate(48_000) // at 48KHz
.setAudioBitRate(32768) // at 32 kbit/s
.setVideoCodec("libx264") // Video using x264
.setVideoFrameRate(24, 1) // at 24 frames per second
.setVideoResolution(1280, 720) // at 640x480 resolution
.setVideoBitRate(762800)
.setStrict(FFmpegBuilder.Strict.EXPERIMENTAL) // Allow FFmpeg to use experimental specs
.done();
[above is the details] I am not able to find why the video is taking too long time. Please anybody help me out of this.