当前位置: 首页 > 软件库 > 手机/移动开发 > >

mobile-ffmpeg

授权协议 View license
开发语言 Java
所属分类 手机/移动开发
软件类型 开源软件
地区 不详
投 递 者 池照
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

MobileFFmpeg

FFmpeg for Android, iOS and tvOS.

Not maintained anymore as explained in What’s next for MobileFFmpeg?. Superseded by FFmpegKit.

1. Features

  • Includes both FFmpeg and FFprobe

  • Use binaries available at Github/Maven Central/CocoaPods or build your own version with external libraries you need

  • Supports

    • Android, iOS and tvOS

    • FFmpeg v3.4.x, v4.0.x, v4.1, v4.2 , v4.3 and v4.4-dev releases

    • 29 external libraries

      chromaprint, fontconfig, freetype, fribidi, gmp, gnutls, kvazaar, lame, libaom, libass, libiconv, libilbc, libtheora, libvorbis, libvpx, libwebp, libxml2, opencore-amr, openh264, opus, sdl, shine, snappy, soxr, speex, tesseract, twolame, vo-amrwbenc, wavpack

    • 5 external libraries with GPL license

      rubberband, vid.stab, x264, x265, xvidcore

    • Concurrent execution

  • Exposes both FFmpeg library and MobileFFmpeg wrapper library capabilities

  • Includes cross-compile instructions for 47 open-source libraries

    chromaprint, expat, ffmpeg, fontconfig, freetype, fribidi, giflib, gmp, gnutls, kvazaar, lame, leptonica, libaom, libass, libiconv, libilbc, libjpeg, libjpeg-turbo, libogg, libpng, libsamplerate, libsndfile, libtheora, libuuid, libvorbis, libvpx, libwebp, libxml2, nettle, opencore-amr, openh264, opus, rubberband, sdl, shine, snappy, soxr, speex, tesseract, tiff, twolame, vid.stab, vo-amrwbenc, wavpack, x264, x265, xvidcore

  • Licensed under LGPL 3.0, can be customized to support GPL v3.0

1.1 Android

  • Builds arm-v7a, arm-v7a-neon, arm64-v8a, x86 and x86_64 architectures
  • Supports zlib and MediaCodec system libraries
  • Camera access on supported devices
  • Builds shared native libraries (.so)
  • Creates Android archive with .aar extension
  • Supports API Level 16+

1.2 iOS

  • Builds armv7, armv7s, arm64, arm64e, i386, x86_64 and x86_64 (Mac Catalyst) architectures
  • Supports bzip2, iconv, libuuid, zlib system libraries and AudioToolbox, VideoToolbox, AVFoundation system frameworks
  • Objective-C API
  • Camera access
  • ARC enabled library
  • Built with -fembed-bitcode flag
  • Creates static frameworks, static xcframeworks and static universal (fat) libraries (.a)
  • Supports iOS SDK 9.3 or later

1.3 tvOS

  • Builds arm64 and x86_64 architectures
  • Supports bzip2, iconv, libuuid, zlib system libraries and AudioToolbox, VideoToolbox system frameworks
  • Objective-C API
  • ARC enabled library
  • Built with -fembed-bitcode flag
  • Creates static frameworks and static universal (fat) libraries (.a)
  • Supports tvOS SDK 9.2 or later

2. Using

Prebuilt binaries are available at Github, Maven Central and CocoaPods.

2.1 Packages

There are eight different mobile-ffmpeg packages. Below you can see which system libraries and external libraries are enabled in each of them.

Please remember that some parts of FFmpeg are licensed under the GPL and only GPL licensed mobile-ffmpeg packages include them.

min min-gpl https https-gpl audio video full full-gpl
external libraries - vid.stab
x264
x265
xvidcore
gmp
gnutls
gmp
gnutls
vid.stab
x264
x265
xvidcore
lame
libilbc
libvorbis
opencore-amr
opus
shine
soxr
speex
twolame
vo-amrwbenc
wavpack
fontconfig
freetype
fribidi
kvazaar
libaom
libass
libiconv
libtheora
libvpx
libwebp
snappy
fontconfig
freetype
fribidi
gmp
gnutls
kvazaar
lame
libaom
libass
libiconv
libilbc
libtheora
libvorbis
libvpx
libwebp
libxml2
opencore-amr
opus
shine
snappy
soxr
speex
twolame
vo-amrwbenc
wavpack
fontconfig
freetype
fribidi
gmp
gnutls
kvazaar
lame
libaom
libass
libiconv
libilbc
libtheora
libvorbis
libvpx
libwebp
libxml2
opencore-amr
opus
shine
snappy
soxr
speex
twolame
vid.stab
vo-amrwbenc
wavpack
x264
x265
xvidcore
android system libraries zlib
MediaCodec
ios system libraries zlib
AudioToolbox
AVFoundation
iconv
VideoToolbox
bzip2
tvos system libraries zlib
AudioToolbox
iconv
VideoToolbox
bzip2
  • libilbc, opus, snappy, x264 and xvidcore are supported since v1.1

  • libaom and soxr are supported since v2.0

  • chromaprint, vid.stab and x265 are supported since v2.1

  • sdl, tesseract, twolame external libraries; zlib, MediaCodec Android system libraries; bzip2, zlib iOS system libraries and AudioToolbox, VideoToolbox, AVFoundation iOS system frameworks are supported since v3.0

  • Since v4.2, chromaprint, sdl and tesseract libraries are not included in binary releases. You can still build them and include in your releases

  • AVFoundation is not available on tvOS, VideoToolbox is not available on tvOS LTS releases

  • Since v4.3.1, iOS and tvOS releases started to use iconv system library instead of iconv external library

  • vo-amrwbenc is supported since v4.4

2.2 Android

  • For versions 4.4 and 4.4.LTS, add mavenCentral() to your build.gradle and make sure that it is listedbefore jcenter()
  • For 4.3.2 and older releases, add jcenter()
    repositories {
        mavenCentral()
    }
    
  1. Add MobileFFmpeg dependency to your build.gradle in mobile-ffmpeg-<package name> pattern.

    dependencies {
        implementation 'com.arthenica:mobile-ffmpeg-full:4.4'
    }
    
  2. Execute synchronous FFmpeg commands.

    import com.arthenica.mobileffmpeg.Config;
    import com.arthenica.mobileffmpeg.FFmpeg;
    
    int rc = FFmpeg.execute("-i file1.mp4 -c:v mpeg4 file2.mp4");
    
    if (rc == RETURN_CODE_SUCCESS) {
        Log.i(Config.TAG, "Command execution completed successfully.");
    } else if (rc == RETURN_CODE_CANCEL) {
        Log.i(Config.TAG, "Command execution cancelled by user.");
    } else {
        Log.i(Config.TAG, String.format("Command execution failed with rc=%d and the output below.", rc));
        Config.printLastCommandOutput(Log.INFO);
    }
    
  3. Execute asynchronous FFmpeg commands.

    import com.arthenica.mobileffmpeg.Config;
    import com.arthenica.mobileffmpeg.FFmpeg;
    
    long executionId = FFmpeg.executeAsync("-i file1.mp4 -c:v mpeg4 file2.mp4", new ExecuteCallback() {
    
        @Override
        public void apply(final long executionId, final int returnCode) {
            if (returnCode == RETURN_CODE_SUCCESS) {
                Log.i(Config.TAG, "Async command execution completed successfully.");
            } else if (returnCode == RETURN_CODE_CANCEL) {
                Log.i(Config.TAG, "Async command execution cancelled by user.");
            } else {
                Log.i(Config.TAG, String.format("Async command execution failed with returnCode=%d.", returnCode));
            }
        }
    });
    
  4. Execute FFprobe commands.

    import com.arthenica.mobileffmpeg.Config;
    import com.arthenica.mobileffmpeg.FFprobe;
    
    int rc = FFprobe.execute("-i file1.mp4");
    
    if (rc == RETURN_CODE_SUCCESS) {
        Log.i(Config.TAG, "Command execution completed successfully.");
    } else {
        Log.i(Config.TAG, String.format("Command execution failed with rc=%d and the output below.", rc));
        Config.printLastCommandOutput(Log.INFO);
    }
    
  5. Check execution output later.

    int rc = Config.getLastReturnCode();
    
    if (rc == RETURN_CODE_SUCCESS) {
        Log.i(Config.TAG, "Command execution completed successfully.");
    } else if (rc == RETURN_CODE_CANCEL) {
        Log.i(Config.TAG, "Command execution cancelled by user.");
    } else {
        Log.i(Config.TAG, String.format("Command execution failed with rc=%d and the output below.", rc));
        Config.printLastCommandOutput(Log.INFO);
    }
    
  6. Stop ongoing FFmpeg operations.

    • Stop all executions
      FFmpeg.cancel();
      
    • Stop a specific execution
      FFmpeg.cancel(executionId);
      
  7. Get media information for a file.

    MediaInformation info = FFprobe.getMediaInformation("<file path or uri>");
    
  8. Record video using Android camera.

    FFmpeg.execute("-f android_camera -i 0:0 -r 30 -pixel_format bgr0 -t 00:00:05 <record file path>");
    
  9. Enable log callback.

    Config.enableLogCallback(new LogCallback() {
        public void apply(LogMessage message) {
            Log.d(Config.TAG, message.getText());
        }
    });
    
  10. Enable statistics callback.

    Config.enableStatisticsCallback(new StatisticsCallback() {
        public void apply(Statistics newStatistics) {
            Log.d(Config.TAG, String.format("frame: %d, time: %d", newStatistics.getVideoFrameNumber(), newStatistics.getTime()));
        }
    });
    
  11. Ignore the handling of a signal.

    Config.ignoreSignal(Signal.SIGXCPU);
    
  12. List ongoing executions.

    final List<FFmpegExecution> ffmpegExecutions = FFmpeg.listExecutions();
    for (int i = 0; i < ffmpegExecutions.size(); i++) {
        FFmpegExecution execution = ffmpegExecutions.get(i);
        Log.d(TAG, String.format("Execution %d = id:%d, startTime:%s, command:%s.", i, execution.getExecutionId(), execution.getStartTime(), execution.getCommand()));
    }
    
  13. Set default log level.

    Config.setLogLevel(Level.AV_LOG_FATAL);
    
  14. Register custom fonts directory.

    Config.setFontDirectory(this, "<folder with fonts>", Collections.EMPTY_MAP);
    

2.3 iOS / tvOS

  1. Add MobileFFmpeg dependency to your Podfile in mobile-ffmpeg-<package name> pattern.

    • iOS
    pod 'mobile-ffmpeg-full', '~> 4.4'
    
    • tvOS
    pod 'mobile-ffmpeg-tvos-full', '~> 4.4'
    
  2. Execute synchronous FFmpeg commands.

    #import <mobileffmpeg/MobileFFmpegConfig.h>
    #import <mobileffmpeg/MobileFFmpeg.h>
    
    int rc = [MobileFFmpeg execute: @"-i file1.mp4 -c:v mpeg4 file2.mp4"];
    
    if (rc == RETURN_CODE_SUCCESS) {
        NSLog(@"Command execution completed successfully.\n");
    } else if (rc == RETURN_CODE_CANCEL) {
        NSLog(@"Command execution cancelled by user.\n");
    } else {
        NSLog(@"Command execution failed with rc=%d and output=%@.\n", rc, [MobileFFmpegConfig getLastCommandOutput]);
    }
    
  3. Execute asynchronous FFmpeg commands.

    #import <mobileffmpeg/MobileFFmpegConfig.h>
    #import <mobileffmpeg/MobileFFmpeg.h>
    
    long executionId = [MobileFFmpeg executeAsync:@"-i file1.mp4 -c:v mpeg4 file2.mp4" withCallback:self];
    
    - (void)executeCallback:(long)executionId :(int)returnCode {
        if (rc == RETURN_CODE_SUCCESS) {
            NSLog(@"Async command execution completed successfully.\n");
        } else if (rc == RETURN_CODE_CANCEL) {
            NSLog(@"Async command execution cancelled by user.\n");
        } else {
            NSLog(@"Async command execution failed with rc=%d.\n", rc);
        }
    }
    
  4. Execute FFprobe commands.

    #import <mobileffmpeg/MobileFFmpegConfig.h>
    #import <mobileffmpeg/MobileFFprobe.h>
    
    int rc = [MobileFFprobe execute: @"-i file1.mp4"];
    
    if (rc == RETURN_CODE_SUCCESS) {
        NSLog(@"Command execution completed successfully.\n");
    } else if (rc == RETURN_CODE_CANCEL) {
        NSLog(@"Command execution cancelled by user.\n");
    } else {
        NSLog(@"Command execution failed with rc=%d and output=%@.\n", rc, [MobileFFmpegConfig getLastCommandOutput]);
    }
    
  5. Check execution output later.

    int rc = [MobileFFmpegConfig getLastReturnCode];
    NSString *output = [MobileFFmpegConfig getLastCommandOutput];
    
    if (rc == RETURN_CODE_SUCCESS) {
        NSLog(@"Command execution completed successfully.\n");
    } else if (rc == RETURN_CODE_CANCEL) {
        NSLog(@"Command execution cancelled by user.\n");
    } else {
        NSLog(@"Command execution failed with rc=%d and output=%@.\n", rc, output);
    }
    
  6. Stop ongoing FFmpeg operations.

    • Stop all executions
      [MobileFFmpeg cancel];
      
      
    • Stop a specific execution
      [MobileFFmpeg cancel:executionId];
      
  7. Get media information for a file.

    MediaInformation *mediaInformation = [MobileFFprobe getMediaInformation:@"<file path or uri>"];
    
  8. Record video and audio using iOS camera. This operation is not supported on tvOS since AVFoundation is not available on tvOS.

    [MobileFFmpeg execute: @"-f avfoundation -r 30 -video_size 1280x720 -pixel_format bgr0 -i 0:0 -vcodec h264_videotoolbox -vsync 2 -f h264 -t 00:00:05 %@", recordFilePath];
    
  9. Enable log callback.

    [MobileFFmpegConfig setLogDelegate:self];
    
    - (void)logCallback:(long)executionId :(int)level :(NSString*)message {
        dispatch_async(dispatch_get_main_queue(), ^{
            NSLog(@"%@", message);
        });
    }
    
  10. Enable statistics callback.

    [MobileFFmpegConfig setStatisticsDelegate:self];
    
    - (void)statisticsCallback:(Statistics *)newStatistics {
        dispatch_async(dispatch_get_main_queue(), ^{
            NSLog(@"frame: %d, time: %d\n", newStatistics.getVideoFrameNumber, newStatistics.getTime);
        });
    }
    
  11. Ignore the handling of a signal.

    [MobileFFmpegConfig ignoreSignal:SIGXCPU];
    
  12. List ongoing executions.

    NSArray* ffmpegExecutions = [MobileFFmpeg listExecutions];
    for (int i = 0; i < [ffmpegExecutions count]; i++) {
        FFmpegExecution* execution = [ffmpegExecutions objectAtIndex:i];
        NSLog(@"Execution %d = id: %ld, startTime: %@, command: %@.\n", i, [execution getExecutionId], [execution getStartTime], [execution getCommand]);
    }
    
  13. Set default log level.

    [MobileFFmpegConfig setLogLevel:AV_LOG_FATAL];
    
  14. Register custom fonts directory.

    [MobileFFmpegConfig setFontDirectory:@"<folder with fonts>" with:nil];
    

2.4 Manual Installation

2.4.1 Android

You can import MobileFFmpeg aar packages in Android Studio using the File -> New -> New Module -> Import .JAR/.AAR Package menu.

2.4.2 iOS / tvOS

iOS and tvOS frameworks can be installed manually using the Importing Frameworks guide.If you want to use universal binaries please refer to Using Universal Binaries guide.

2.5 Test Application

You can see how MobileFFmpeg is used inside an application by running test applications provided.There is an Android test application under the android/test-app folder, an iOS test application under theios/test-app folder and a tvOS test application under the tvos/test-app folder.

All applications are identical and supports command execution, video encoding, accessing https, encoding audio,burning subtitles, video stabilisation, pipe operations and concurrent command execution.

3. Versions

MobileFFmpeg version number is aligned with FFmpeg since version 4.2.

In previous versions, MobileFFmpeg version of a release and FFmpeg version included in that release was different.The following table lists FFmpeg versions used in MobileFFmpeg releases.

  • dev part in FFmpeg version number indicates that FFmpeg source is pulled from the FFmpeg master branch.Exact version number is obtained using git describe --tags.
MobileFFmpeg Version FFmpeg Version Release Date
4.4 4.4-dev-416 Jul 25, 2020
4.4.LTS 4.4-dev-416 Jul 24, 2020
4.3.2 4.3-dev-2955 Apr 15, 2020
4.3.1 4.3-dev-1944 Jan 25, 2020
4.3.1.LTS 4.3-dev-1944 Jan 25, 2020
4.3 4.3-dev-1181 Oct 27, 2019
4.2.2 4.2-dev-1824 July 3, 2019
4.2.2.LTS 4.2-dev-1824 July 3, 2019
4.2.1 4.2-dev-1156 Apr 2, 2019
4.2 4.2-dev-480 Jan 3, 2019
4.2.LTS 4.2-dev-480 Jan 3, 2019
3.1 4.1-10 Dec 11, 2018
3.0 4.1-dev-1517 Oct 25, 2018
2.2 4.0.3 Nov 10, 2018
2.1.1 4.0.2 Sep 19, 2018
2.1 4.0.2 Sep 5, 2018
2.0 4.0.1 Jun 30, 2018
1.2 3.4.4 Aug 30, 2018
1.1 3.4.2 Jun 18, 2018
1.0 3.4.2 Jun 6, 2018

4. LTS Releases

Starting from v4.2, MobileFFmpeg binaries are published in two different variants: Main Release and LTS Release.

  • Main releases include complete functionality of the library and support the latest SDK/API features.

  • LTS releases are customized to support a wider range of devices. They are built using older API/SDK versions, so some features are not available on them.

This table shows the differences between two variants.

Main Release LTS Release
Android API Level 24 16
Android Camera Access Yes -
Android Architectures arm-v7a-neon
arm64-v8a
x86
x86-64
arm-v7a
arm-v7a-neon
arm64-v8a
x86
x86-64
Xcode Support 10.1 7.3.1
iOS SDK 12.1 9.3
iOS AVFoundation Yes -
iOS Architectures arm64
arm64e1
x86-64
x86-64-mac-catalyst2
armv7
arm64
i386
x86-64
tvOS SDK 10.2 9.2
tvOS Architectures arm64
x86-64
arm64
x86-64

1 - Included until v4.3.2

2 - Included since v4.3.2

5. Building

Build scripts from master and development branches are tested periodically. See the latest status from the table below.

branch status
master
development

5.1 Prerequisites

  1. Use your package manager (apt, yum, dnf, brew, etc.) to install the following packages.

    autoconf automake libtool pkg-config curl cmake gcc gperf texinfo yasm nasm bison autogen patch git
    

Some of these packages are not mandatory for the default build.Please visit Android Prerequisites,iOS Prerequisites andtvOS Prerequisites for the details.

  1. Android builds require these additional packages.

    • Android SDK 4.1 Jelly Bean (API Level 16) or later
    • Android NDK r21 or later with LLDB and CMake
  2. iOS builds need these extra packages and tools.

    • Xcode 7.3.1 or later
    • iOS SDK 9.3 or later
    • Command Line Tools
  3. tvOS builds need these extra packages and tools.

    • Xcode 7.3.1 or later
    • tvOS SDK 9.2 or later
    • Command Line Tools

5.2 Build Scripts

Use android.sh, ios.sh and tvos.sh to build MobileFFmpeg for each platform.

All three scripts support additional options andcan be customized to enable/disable specific external libraries and/or architectures. Please refer to wiki pages ofandroid.sh,ios.sh andtvos.sh to see all available build options.

5.2.1 Android
export ANDROID_HOME=<Android SDK Path>
export ANDROID_NDK_ROOT=<Android NDK Path>
./android.sh

5.2.2 iOS
./ios.sh

5.2.3 tvOS
./tvos.sh

5.2.4 Building LTS Binaries

Use --lts option to build lts binaries for each platform.

5.3 Build Output

All libraries created by the top level build scripts (android.sh, ios.sh and tvos.sh) can be found underthe prebuilt directory.

  • Android archive (.aar file) is located under the android-aar folder
  • iOS frameworks are located under the ios-framework folder
  • iOS xcframeworks are located under the ios-xcframework folder
  • iOS universal binaries are located under the ios-universal folder
  • tvOS frameworks are located under the tvos-framework folder
  • tvOS universal binaries are located under the tvos-universal folder

5.4 GPL Support

It is possible to enable GPL licensed libraries x264, xvidcore since v1.1; vid.stab, x265 since v2.1 andrubberband since v4.3.2 from the top level build scripts. Their source code is not included in the repository anddownloaded when enabled.

5.5 External Libraries

build directory includes build scripts of all external libraries. Two scripts exist for each external library,one for Android and one for iOS / tvOS. Each of these two scripts contains options/flags used to cross-compile thelibrary on the specified mobile platform.

CPU optimizations (ASM) are enabled for most of the external libraries. Details and exceptions can be found under theASM Support wiki page.

6. Documentation

A more detailed documentation is available at Wiki.

7. Contributors

7.1 Code Contributors

This project exists thanks to all the people who contribute. [Contribute].

7.2 Financial Contributors

Become a financial contributor and help us sustain our community. [Contribute]

7.2.1 Individuals

7.2.2 Organizations

Support this project with your organization. Your logo will show up here with a link to your website. [Contribute]

8. License

MobileFFmpeg is licensed under the LGPL v3.0. However, if source code is built using the optional --enable-gpl flagor prebuilt binaries with -gpl postfix are used, then MobileFFmpeg is subject to the GPL v3.0 license.

The source code of all external libraries included is in compliance with their individual licenses.

openh264 source code included in this repository is licensed under the 2-clause BSD License but this license doesnot cover the MPEG LA licensing fees. If you build mobile-ffmpeg with openh264 and distribute that library, thenyou are subject to pay MPEG LA licensing fees. Refer to OpenH264 FAQ page forthe details. Please note that mobile-ffmpeg does not publish a binary with openh264 inside.

strip-frameworks.sh script included and distributed (until v4.x) is published under theApache License version 2.0.

In test applications; embedded fonts are licensed under theSIL Open Font License, other digital assets are published in the publicdomain.

Please visit License page for the details.

9. Patents

It is not clearly explained in their documentation but it is believed that FFmpeg, kvazaar, x264 and x265include algorithms which are subject to software patents. If you live in a country where software algorithms arepatentable then you'll probably need to pay royalty fees to patent holders. We are not lawyers though, so we recommendthat you seek legal advice first. See FFmpeg Patent Mini-FAQ.

openh264 clearly states that it uses patented algorithms. Therefore, if you build mobile-ffmpeg with openh264 anddistribute that library, then you are subject to pay MPEG LA licensing fees. Refer toOpenH264 FAQ page for the details.

10. Contributing

Feel free to submit issues or pull requests.

Please note that master branch includes only the latest released source code. Changes planned for the next releaseare implemented under the development branch. Therefore, if you want to create a pull request, please open it againstthe development.

11. See Also

  • 包含添加字幕能力的ffmpeg和相关so编译 需要下载的源码 https://github.com/tanersener/mobile-ffmpeg https://github.com/tanersener/FFmpeg https://github.com/tanersener/x264 考虑源码较大,github不好下载成功,可以从gitee镜像仓库下载 https://gitee.com/

  • 最近因为业务需要,要对上传的图片 和 视屏做压缩处理,我们都知道,凡事涉及到图形图像方面的,ffmpeg肯定是首选的,但是对于移动端ios ,android 都需要自己去编译,并且包的大小不是很好的控制,因为大多人如果不是做和ffmpeg 相关的的工作,连他如何顺利的编译都都搞不懂,更别提如何选择性的去编译包了.        给大家推荐一个很好用的ffmpeg 库,mobile-ffmpeg  

  • 这里的播放器演示程序用于播放一个本地文件,因而不需要关心播放网络上的媒体数据时的网络传输问题。 对于播放本地媒体文件的播放器来说,所要完成的工作主要包括:解封装 -> 音频解码/视频解码 -> 对于音频来说,还需要做格式转换和重采样 -> 音频渲染和视频渲染。本文的代码位于 GitHub ffmpeg-mediaplayer-android。 音频渲染 音频播放通过 Android 的 OpenS

  • (一)FFmpeg日志的使用 (1)添加引用 #include "libavutil/log.h" (2)设定日志级别,什么样的日志可以显示 av_log_set_level(AV_LOG_DEBUG); (3)打印日志,前两个参数设置后,第一个为NULL,第二个为显示的日志级别,后面使用和printf类似 av_log(NULL,AV_LOG_INFO,"%d\n",int i); (二)常用日

  • 目录 一、引言 二、H264压缩 ------> 2.1、视频压缩 三、音频压缩 四、常见的分辨率与带宽对应表 ------> 4.1、像素与带宽对应关系 五、H265与H264压缩率比较 ------> 5.1、使用CQP对比 一、引言 之前关于视频编码的码率控制写过一篇文章ffmpeg4.4项目学习–H264编码之码率控制模式及参数配置,今天就来详细分析一下对应的压缩率 二、H264压缩 我们

  • ffmpeg命令系列: FFmpeg命令行使用手册-protocols协议汇总篇 FFmpeg命令行使用手册-devices输入输出设备汇总篇 一、前言 本系列介绍ffmpeg命令行中有关-devices输入输出设备的支持和使用。 输入设备(input devices)用于采集/抓取来自连接到系统的多媒体设备的数据,比如采集麦克风/话筒的音频采样数据,桌面屏幕图像数据,摄像头/相机图像数据等。 输

  • FFmpeg iOS https://github.com/tanersener/mobile-ffmpeg/releases/tag/v4.4 项目集成 pod 'mobile-ffmpeg-full-gpl', '~> 4.4' 简单使用 import mobileffmpeg 多图合成视频例子 func outVideo(path1:String,outPath:String) {

  • 说明 有些可简单命令实现的功能可以调起一条系统命令搞定,无需写太多复杂代码。 代码实现 下面是一个很简单的demo,参数:流地址或者文件地址,录制多少秒 FileUtil.judeDirExists:检查文件夹没有创建,网上一大堆自己找代码 DateUtils.dateToStr:日期格式转换,可以换个别的地址,想跑demo自己写个日期工具。 import java.io.File; import

  • 学习 / 工作 / 归纳 总结文档,持续更新。。。请先参考 基础归纳篇  1、获取视频信息,包括网络url ffmpeg -i input.mp4 ffmpeg -i http://xxx.com/videofiles/xxxx.flv 2、分离音视频流 ffmpeg -i input_file -vcodec copy -an output_file_video // 视频流按原来的编码格式,禁

  • FFmpeg库对于音视频的编解码都做了相应的处理,使用起来相当方便,iOS的原生播放器并不支持opus格式的音频,因此需要对opus格式进行解码。 下面是对opus解码的主要步骤: 导入ffmpeg相关库: #include "libavformat/avformat.h" #include "libswscale/swscale.h" #include "libavcodec/avcodec.h

  • 一、视频左右/上下镜像和任意旋转 //mp4向左旋转90度 # ffmpeg -i input.mp4 -metadata:s:v rotate="90" -codec copy outut.mp4 //mp4向右旋转90度 # ffmpeg -i input.mp4 -metadata:s:v rotate="-90" -codec copy outut.mp4 //mp4左右镜像翻转

  • 目录 一、引言 二、ffmpeg工具转换 ------> 2.1、解码 ------> 2.2、ffplay 三、源码解析 ------> 3.1、动态指定解码器 ------> 3.2、AVCodecContext属性填充 ------> 3.3、文件相关操作 ------> 3.4、缓存创建 ------> 3.5、读取输入文件并解析 ------> 3.6、解码 ------> 3.7、YU

  • 在xcode上实现 iphone 实时传输当前画面的功能,本文件针对 h264 编码,如果需要其他编码 ,可以把video_encode_frame_init()里面的 编码id替换掉 1、 ffmpeg 视频流文件 使用之前编译好ffmpeg 库,并且加载了x264的库,然后将下面代码拷贝到一个空白的源文件中,它再次封装了视频流处理的四个流程。 一、 注册编码器 void video_encod

 相关资料
  • Bitwarden Mobile Application The Bitwarden mobile application is written in C# with Xamarin Android, Xamarin iOS, and Xamarin Forms. Build/Run Requirements Visual Studio Xamarin Run the app Open the s

  • Jquery Mobile的策略可以很容易的概括:创建一个顶级的javascript库,在不同的智能手机和桌面电脑的web浏览器上,形成统一的用户ui. 要达到这个目标最关键的就是通过Jquery Mobile解决移动平台的多样性。我们一直致力于使Jquery支持所有的性能足够的和在市场占有一定份额的移动设备浏览器.所以 我们将手机网页浏览器和桌面浏览器的Jquery开发做同等重要的对待。 为了使

  • Why make TinyMCE mobile friendly? Simple. We live in a “mobile-first” world and expect a seamless experience between desktop and mobile. Our goal is to help you achieve this with as little effort as p

  • Burp Suite Mobile Assistant Burp Suite Mobile Assistant is a tool to facilitate testing of iOS apps with Burp Suite. If you do not already have Mobile Assistant installed, please see the help on Insta

  • layer mobile是为移动设备(手机、平板等webkit内核浏览器/webview)量身定做的弹层UI。由于是采用原生 JavaScript编写,所有并不依赖任何第三方库。layer mobile完全独立于PC版的layer,您需要按照场景选择使用。layer mobile正致力于成为您WebApp开发过程中弹出交互的不二选择。  演示:http://layer.layui.com/mobile/

  • RAP mobile provides a powerful widget toolkit that renders native iOS and Android widgets. It provides a proven technology stack with SWT, JFace and OSGi. You can write your application entirely in Ja