windows11编译openh264源码详细过程

介绍

openh264是一个开源的H.264编解码器项目,由思科系统公司(Cisco Systems)维护并贡献给开源社区。它是基于H.264/AVC(Advanced Video Coding)标准的,该标准广泛应用于视频压缩和传输领域。

openh264项目的目标是提供一个高质量、高性能的H.264编解码器实现,同时保持对标准的兼容性。它采用了优化的算法和实现技术,以提供高效的编码和解码性能。该项目还支持多种平台和操作系统,包括Windows、Linux、macOS、Android和iOS等。

openh264的特点:
帧率、SVC、LTR在openh264上都有实现,这几个特点在x264都没有实现,但考虑主要为RTC打造,编码质量较差,码控能力较差。

Encoder Features
----------------
- Constrained Baseline Profile up to Level 5.2 (Max frame size is 36864 macro-blocks)
- Arbitrary resolution, not constrained to multiples of 16x16
- Rate control with adaptive quantization, or constant quantization
- Slice options: 1 slice per frame, N slices per frame, N macroblocks per slice, or N bytes per slice
- Multiple threads automatically used for multiple slices
- Temporal scalability up to 4 layers in a dyadic hierarchy
- Simulcast AVC up to 4 resolutions from a single input
- Spatial simulcast up to 4 resolutions from a single input
- Long Term Reference (LTR) frames
- Memory Management Control Operation (MMCO)
- Reference picture list modification
- Single reference frame for inter prediction
- Multiple reference frames when using LTR and/or 3-4 temporal layers
- Periodic and on-demand Instantaneous Decoder Refresh (IDR) frame insertion
- Dynamic changes to bit rate, frame rate, and resolution
- Annex B byte stream output
- YUV 4:2:0 planar input

Decoder Features
----------------
- Constrained Baseline Profile up to Level 5.2 (Max frame size is 36864 macro-blocks)
- Arbitrary resolution, not constrained to multiples of 16x16
- Single thread for all slices
- Long Term Reference (LTR) frames
- Memory Management Control Operation (MMCO)
- Reference picture list modification
- Multiple reference frames when specified in Sequence Parameter Set (SPS)
- Annex B byte stream input
- YUV 4:2:0 planar output

网址: https://github.com/cisco/openh264

编译过程

源码下载: git命令行下载 git clone git@github.com:cisco/openh264.git。源码里的README.md有详细的各个平台的编译介绍。
在这里插入图片描述
编译环境搭建: 在README.md里介绍windows平台推荐使用Cygwin编译工具,小编使用了已搭建的MinGW编译工具来完成编译过程。
在这里插入图片描述
使用MinGW编译: 双击MinGW安装目录下msys/1.0/msys.bat,在弹出的窗口 cd 到openh264源码位置,直接make即可生成h264dec.exeh264enc.exe两个编解码可执行文件和对应的库文件。
在这里插入图片描述
验证: 输入./h264enc.exe之后弹出命令参数使用说明,即代表编译成功,可进行下一步使用。
在这里插入图片描述

sln工程的生成

openh264提供了生成sln工程的方法,进入codec/build/win32/enc/目录下,利用vs2022直接打开,点击运行,在testbin目录里生成WelsEncoder.exe。
在这里插入图片描述
在testbin目录里编辑welsenc.cfg文件,改动对应的InputFileOutputFile到本地位置,根据个人测试需求改动对应的编码参数即可,
在这里插入图片描述

备注

  1. openh264解码编译过程类似编码过程。
  2. Cygwin编译工具的配置参考网上资料。

相关推荐

  1. Windows 编译 MariaDB

    2023-12-17 01:16:03       56 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2023-12-17 01:16:03       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2023-12-17 01:16:03       100 阅读
  3. 在Django里面运行非项目文件

    2023-12-17 01:16:03       82 阅读
  4. Python语言-面向对象

    2023-12-17 01:16:03       91 阅读

热门阅读

  1. Makefile:6: *** recipe commences before first target. Stop.

    2023-12-17 01:16:03       64 阅读
  2. wxWidgets:使用wxSplitterWindow类进行窗口分割编程

    2023-12-17 01:16:03       44 阅读
  3. LeetCode //C - 345. Reverse Vowels of a String

    2023-12-17 01:16:03       58 阅读
  4. 回调函数详解

    2023-12-17 01:16:03       63 阅读
  5. 聊聊AsyncHttpClient的SignatureCalculator

    2023-12-17 01:16:03       48 阅读
  6. 【Python基础】循环语句

    2023-12-17 01:16:03       54 阅读
  7. 会话技术+请求转发+重定向

    2023-12-17 01:16:03       56 阅读
  8. Delete、Truncate、Drop的区别有哪些,该如何选择

    2023-12-17 01:16:03       54 阅读
  9. uniapp组件map地图组件使用

    2023-12-17 01:16:03       56 阅读
  10. SpringBoot 3.0 升级之 Swagger 升级

    2023-12-17 01:16:03       53 阅读
  11. (第38天)RAC 修改 IP 信息

    2023-12-17 01:16:03       55 阅读
  12. 前端(二)

    2023-12-17 01:16:03       54 阅读