Android Studio:压缩视频和音频
正在使用Android Studio压缩视频和音频文件。我需要有用的建议和链接。 我经历了其中的一些链接,但没有发现太大的帮助。 How to compress video in android`,Android Studio:压缩视频和音频
Is there possibility to compress audio and video file in android programmatically?,
FFmpegFrameGrabber crashes 100% of time attempting to compress video on Android
请帮助我。由于
如何回合此:
https://github.com/hoolrory/AndroidVideoSamples
与Android中的视频工作It'sa Java框架(我不知道,如果that's你需要什么......不过看看)..
还有英特尔INDE(https://software.intel.com/en-us/intel-inde)和Android的媒体包,这是INDE的一部分。
检出ComposerTranscodeCoreActivity.java
您可以在Android项目中使用ffmpeg来压缩视频。
有很多方法,但常用的方法是在ffmpeg命令行工具中使用包装。这允许您使用关于mpeg的常规语法,这是有据可查的。
作为一个例子,这个代码使用的ffmpeg Android中来压缩mp4文件:
String argv[] = {"ffmpeg", "-i", videoFileToCompress.getAbsolutePath(), "-strict", "experimental",
"-acodec", "aac", compressedVideoFile.getAbsolutePath()};
int ffmpegWrapperreturnCode = FfmpegJNIWrapper.call_ffmpegWrapper(this.ctx, argue);
上面,从https://github.com/mickod/ColabAndroidHelper,使用定制的ffmpeg包装。
有得到很好的支持了许多,现在Android的ffmpeg的包装库这似乎和这将是更好地使用,我认为 - 一个例子是: