【问题标题】:Can I save recorded video in flv format using android?我可以使用android以flv格式保存录制的视频吗?
【发布时间】:2013-12-12 10:41:32
【问题描述】:

我正在编写一个程序来从 Android 相机录制视频。 我能够记录它并将其存储为 mp4。但我想记录并存储为flv。 这是我的媒体记录器配置。您能告诉我如何将其更改为录制为 FLV 吗?

    mMediaRecorder.setPreviewDisplay(surface);
    mMediaRecorder.setCamera(mCamera);
    mMediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
    // mMediaRecorder.setAudioSource(MediaRecorder.AudioSource.DEFAULT);
    mMediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
    mMediaRecorder.setOutputFile(this.initFile().getAbsolutePath());
    mMediaRecorder.setMaxDuration(50000);
    mMediaRecorder.setVideoFrameRate(15);
    mMediaRecorder.setVideoSize(320, 240);
    mMediaRecorder.setVideoEncodingBitRate(100000);
    // mMediaRecorder.setAudioEncodingBitRate(8000);
    mMediaRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.H263);
    // mMediaRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);

【问题讨论】:

    标签: android camera flv


    【解决方案1】:

    基本上,Android 不支持 .flv 视频文件。所以你必须使用一些第三方视频转换器将.mp4 转换为.flv 文件。或者使用ffmpeg 你可以做到这一点。

    【讨论】:

    • 非常感谢您的回答。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-12-15
    • 1970-01-01
    • 1970-01-01
    • 2014-08-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多