是否可以在 Android 上压缩视频?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10991863/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Is it possible to compress video on Android?
提问by Jay Thakkar
I want to do video compression.
我想做视频压缩。
Actually in my application I want to have two options, one is low and another is high. If I choose the low option then the application will compress the video and then upload it. If I choose high then it will upload the original video which I have recorded itself.
实际上,在我的应用程序中,我想要两个选项,一个低,另一个高。如果我选择低选项,则应用程序将压缩视频然后上传。如果我选择高,那么它会上传我自己录制的原始视频。
I want to do this thing in my application and I'm confused. I have searched google a lot but I'm not able to find the useful way to solve this question please if anyone can help me out.
我想在我的应用程序中做这件事,但我很困惑。我已经在谷歌上搜索了很多,但如果有人可以帮助我,我无法找到解决这个问题的有用方法。
回答by Eli
I used ffmpeg4android,
我用过ffmpeg4android,
And was able to achieve this in about 10min using only java, Note that its a commercial library.
并且仅使用 java 就能够在大约 10 分钟内实现这一点,请注意,它是一个商业库。
回答by Macdroid Solution
Yes in android you can us ffmpeg4android for compress video it's native library
是的,在 android 中,您可以使用 ffmpeg4android 来压缩视频,它是本机库
Please check this link
请检查此链接
Install the Android NDK First to Use it
首先安装 Android NDK 以使用它