stv-ekushida / ios-mobile-ffmpeg-demo

ffmpegを利用したサンプル

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ios-mobile-ffmpeg-demo

mobile-ffmpegを利用して、動画や音声を加工するサンプル

利用ライブラリ

mobile-ffmepg

設定

XXX--Bridging-Header.h

#import <mobileffmpeg/MobileFFmpegConfig.h>
#import <mobileffmpeg/MobileFFmpeg.h>

実装

    // ffmpegのコマンドを実行する
    let command = "-i \(fromUrl) -vf scale=320:-1 -r 10 -an \(toUrl)"
    let result = MobileFFmpeg.execute(command)

    if (result == RETURN_CODE_SUCCESS) {
        print("Command execution completed successfully.\n");
    } else if (result == RETURN_CODE_CANCEL) {
        print("Command execution cancelled by user.\n");
    } else {
        print(MobileFFmpegConfig.getLastCommandOutput() ?? "");
    }

About

ffmpegを利用したサンプル


Languages

Language:Swift 95.3%Language:Ruby 3.2%Language:Objective-C 1.5%