Transcode/Convert Video to Mp4 on Android

后端 未结 3 1778
不知归路
不知归路 2021-02-03 13:04

I\'ve a requirement where I need to transcode small video clips shot from Native camera app to lower bitrate/resolution Mp4 which is shreable via email etc.

What is the

相关标签:
3条回答
  • 2021-02-03 13:23

    Your best bet would be to use something like ffmpeg which has been ported to Android (see this SO post: ffmpeg for a android (using tutorial: "ffmpeg and Android.mk") and the ffmpeg port for android which is here: http://bambuser.com/opensource). You'll have to use JNI etc, but that will save you the hassle of dealing with the byte stream yourself.

    0 讨论(0)
  • 2021-02-03 13:26

    Haven't tried it on Android myself, so YMMV:

    Is there a Java API for mp4 files?

    http://code.google.com/p/mp4parser/

    0 讨论(0)
  • 2021-02-03 13:43

    If you're recording on-device, why not set the expected format from your code? It appears the api lets you set video size, framerate etc. in the MediaRecorder class.

    0 讨论(0)
提交回复
热议问题