• Stars
    star
    5,527
  • Rank 7,421 (Top 0.2 %)
  • Language
    C++
  • License
    BSD 2-Clause "Sim...
  • Created about 11 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Open Source H.264 Codec

OpenH264

OpenH264 is a codec library which supports H.264 encoding and decoding. It is suitable for use in real time applications such as WebRTC. See http://www.openh264.org/ for more details.

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

OS Support

  • Windows 64-bit and 32-bit
  • Mac OS X 64-bit and 32-bit
  • Mac OS X ARM64
  • Linux 64-bit and 32-bit
  • Android 64-bit and 32-bit
  • iOS 64-bit and 32-bit
  • Windows Phone 32-bit

Architectures verified to be working

  • ppc64el

Processor Support

  • Intel x86 optionally with MMX/SSE (no AVX yet, help is welcome)
  • ARMv7 optionally with NEON, AArch64 optionally with NEON
  • Any architecture using C/C++ fallback functions

Building the Library

NASM needed to be installed for assembly code: workable version 2.10.06 or above, NASM can be downloaded from http://www.nasm.us/. For Mac OSX 64-bit NASM needed to be below version 2.11.08 as NASM 2.11.08 will introduce error when using RIP-relative addresses in Mac OSX 64-bit

To build the arm assembly for Windows Phone, gas-preprocessor is required. It can be downloaded from git://git.libav.org/gas-preprocessor.git

For Android Builds

To build for android platform, You need to install android sdk and ndk. You also need to export **ANDROID_SDK**/tools to PATH. On Linux, this can be done by

export PATH=**ANDROID_SDK**/tools:$PATH

The codec and demo can be built by

make OS=android NDKROOT=**ANDROID_NDK** TARGET=**ANDROID_TARGET**

Valid **ANDROID_TARGET** can be found in **ANDROID_SDK**/platforms, such as android-12. You can also set ARCH, NDKLEVEL according to your device and NDK version. ARCH specifies the architecture of android device. Currently arm, arm64, x86 and x86_64 are supported, the default is arm. (mips and mips64 can also be used, but there's no specific optimization for those architectures.) NDKLEVEL specifies android api level, the default is 12. Available possibilities can be found in **ANDROID_NDK**/platforms, such as android-21 (strip away the android- prefix).

By default these commands build for the armeabi-v7a ABI. To build for the other android ABIs, add ARCH=arm64, ARCH=x86, ARCH=x86_64, ARCH=mips or ARCH=mips64. To build for the older armeabi ABI (which has armv5te as baseline), add APP_ABI=armeabi (ARCH=arm is implicit). To build for 64-bit ABI, such as arm64, explicitly set NDKLEVEL to 21 or higher.

For iOS Builds

You can build the libraries and demo applications using xcode project files located in codec/build/iOS/dec and codec/build/iOS/enc.

You can also build the libraries (but not the demo applications) using the make based build system from the command line. Build with

make OS=ios ARCH=**ARCH**

Valid values for **ARCH** are the normal iOS architecture names such as armv7, armv7s, arm64, and i386 and x86_64 for the simulator. Another settable iOS specific parameter is SDK_MIN, specifying the minimum deployment target for the built library. For other details on building using make on the command line, see 'For All Platforms' below.

For Linux Builds

You can build the libraries (but not the demo applications) using the make based build system from the command line. Build with

make OS=linux ARCH=**ARCH**

You can set ARCH according to your linux device . ARCH specifies the architecture of the device. Currently arm, arm64, x86 and x86_64 are supported

NOTICE: If your computer is x86 architecture, for build the libnary which be used on arm/aarch64 machine, you may need to use cross-compiler, for example: make OS=linux CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ ARCH=arm64 or make OS=linux CC=arm-linux-gnueabi-gcc CXX=arm-linux-gnueabi-g++ ARCH=arm

For Windows Builds

"make" must be installed. It is recommended to install the Cygwin and "make" must be selected to be included in the installation. After the installation, please add the Cygwin bin path to your PATH.

openh264/build/AutoBuildForWindows.bat is provided to help compile the libraries on Windows platform.
Usage of the .bat script:

`AutoBuildForWindows.bat Win32-Release-ASM` for x86 Release build  
`AutoBuildForWindows.bat Win64-Release-ASM` for x86_64 Release build  
`AutoBuildForWindows.bat ARM64-Release-ASM` for arm64 release build  

for more usage, please refer to the .bat script help.

For All Platforms

Using make

From the main project directory:

  • make for automatically detecting architecture and building accordingly
  • make ARCH=i386 for x86 32-bit builds
  • make ARCH=x86_64 for x86 64-bit builds
  • make ARCH=arm64 for arm64 Mac 64-bit builds
  • make V=No for a silent build (not showing the actual compiler commands)
  • make DEBUGSYMBOLS=True for two libraries, one is normal libraries, another one is removed the debugging symbol table entries (those created by the -g option)

The command line programs h264enc and h264dec will appear in the main project directory.

A shell script to run the command-line apps is in testbin/CmdLineExample.sh

Usage information can be found in testbin/CmdLineReadMe

Using meson

Meson build definitions have been added, and are known to work on Linux and Windows, for x86 and x86 64-bit.

See http://mesonbuild.com/Installing.html for instructions on how to install meson, then:

meson builddir
ninja -C builddir

Run the tests with:

meson test -C builddir -v

Install with:

ninja -C builddir install

Using the Source

  • codec - encoder, decoder, console (test app), build (makefile, vcproj)
  • build - scripts for Makefile build system
  • test - GTest unittest files
  • testbin - autobuild scripts, test app config files
  • res - yuv and bitstream test files

Known Issues

See the issue tracker on https://github.com/cisco/openh264/issues

  • Encoder errors when resolution exceeds 3840x2160
  • Encoder errors when compressed frame size exceeds half uncompressed size
  • Decoder errors when compressed frame size exceeds 1MB
  • Encoder RC requires frame skipping to be enabled to hit the target bitrate, if frame skipping is disabled the target bitrate may be exceeded

License

BSD, see LICENSE file for details.

More Repositories

1

ChezScheme

Chez Scheme
Scheme
6,965
star
2

joy

A package for capturing and analyzing network flow data and intraflow data, for network research, forensics, and security monitoring.
C
1,301
star
3

libsrtp

Library for SRTP (Secure Realtime Transport Protocol)
C
1,209
star
4

node-jose

JavaScript
700
star
5

thor

Thor Video Codec
C
697
star
6

mindmeld

An Open Source Conversational AI Platform for Deep-Domain Voice Interfaces and Chatbots.
Python
673
star
7

mercury

Mercury: network metadata capture and analysis
C++
437
star
8

cisco-mibs

Various SNMP MIBs from Cisco
HTML
144
star
9

exanic-software

ExaNIC drivers, utilities and development libraries
C
138
star
10

mlspp

Implementation of Messaging Layer Security
C++
108
star
11

cjose

C library implementing the Javascript Object Signing and Encryption (JOSE)
C
105
star
12

libest

C
97
star
13

elsy

An opinionated, multi-language, build tool based on Docker and Docker Compose
Go
79
star
14

lal-build-manager

Project dependency manager
Rust
75
star
15

libacvp

The libacvp library is a client-side implementation of the draft ACVP protocol (github.com/usnistgov/ACVP).
C
65
star
16

ns3-802.11ax-simulator

NS3 Simulator of 802.11ax
C++
58
star
17

cisco-network-puppet-module

Ruby
55
star
18

open-nFAPI

An open source implementation of the Small Cell Forum's Network Functional API (nFAPI)
C
54
star
19

ns3-rmcat

Simulator of IETF RMCAT congestion control protocols
C++
50
star
20

go-mls

Message Layer Security
Go
48
star
21

cisco.github.io

Public Github Pages for Cisco
JavaScript
45
star
22

libfnr

FNR is a small domain block cipher to encrypt small objects ( < 128 bits )
C
40
star
23

senml

Tool to convert senml between formats and act as gateway server to other services
Go
39
star
24

opus

Cisco work on the Opus codec
C
31
star
25

hash-sigs

A full-featured implementation of of the LMS and HSS Hash Based Signature Schemes from draft-mcgrew-hash-sigs-07.
C
31
star
26

go-hpke

Implementation of draft-irtf-cfrg-hpke
Go
30
star
27

cisco-network-node-utils

Ruby
29
star
28

systemf

Prepared statement support for the system command
C
29
star
29

cisco-network-chef-cookbook

Ruby
27
star
30

OpenOSC

Open Object Size Checking: Library to detect buffer overflows in C/C++ code
C
27
star
31

NATTools

NAT Tools
C
26
star
32

ActionOrchestratorContent

A repository for Action Orchestrator content definitions. Includes workflows and Atomic Workflow Adapters as well as general adapter definitions.
25
star
33

exact-capture

Exablaze High Rate Capture Software
C
23
star
34

oraf

Optimized RAndom Forests
Scala
22
star
35

node-kms

node-scr
JavaScript
21
star
36

JabberWerxC

A C API for XMPP connectivity
C
18
star
37

zepster

Generate database schema, documentation, and other artifacts from an Entity-Relationship diagram, which is created as a GraphML file using the yEd graph editor.
Python
17
star
38

firepower-ngfw

Firepower Threat Defense Virtual templates and artifacts
13
star
39

cisco-yang-puppet-module

Puppet module to allow configuration of IOS-XR via YANG
Ruby
11
star
40

anyconnect-kdf

Cisco AnyConnect Linux Kernel Module
C
11
star
41

webex-assistant-sdk

An SDK for developing Webex Assistant Skills based on the MindMeld platform.
Python
11
star
42

xr-telemetry-m2m-web

A small web app to explore the IOS-XR internal data model, for streaming telemetry or other automation uses
Python
10
star
43

herisson

C++
10
star
44

goFish

Finding Fish
C++
9
star
45

cisco-nxapi

Ruby
8
star
46

asav

ASAv templates and artifacts
8
star
47

syncodecs

Synthetic codecs for evaluation of RMCAT work
C++
7
star
48

ciscohls

C
7
star
49

multilingual-speech-testing

Test software and data for evaluation of speech processing algorithms in multiple languages
Python
7
star
50

sframe

Implementation of draft-omara-sframe
C++
6
star
51

hyperledger-est-ca

EST CA for Hyperledger Fabric
Go
6
star
52

SSMAMTtools

C
6
star
53

ciscoacipuppet

Ruby
6
star
54

gse

Game State Encoder and Decoder for RTP
C++
6
star
55

go-tls-syntax

Encode and decode messages in TLS 1.3 syntax
Go
6
star
56

jfnr

Java bindings for FNR block cipher
Java
5
star
57

usnic_tools

usNIC tools
C
4
star
58

ampfsm

Cisco AMP Filesystem Module
C
4
star
59

arc

Go
4
star
60

xr-telemetry-m2m-lib

Libraries for interacting with the IOS-XR M2M service.
Python
3
star
61

JdbcDecorator

Java
3
star
62

gst-plugin-dlnasrc

A fork of the original gst-dlna-src plugin, these modifications make the plugin work with the RDK server
C
3
star
63

ampnetworkflow

Cisco AMP Device Flow Control
C
3
star
64

libamvp

A client-side implementation of the AMVP protocol.
C
2
star
65

guppi

Grand Unified Platform for Process Interactions: A DevOps Environment for Data Scientists
Python
2
star
66

cisco-otel-java

Cisco Distribution of OpenTelemetry Java
1
star
67

WXM-Invitations

Optional module for dispatching SMS and Email invitations for Cisco Webex Experience Management Surveys from your private cloud
C#
1
star
68

cgmi

C
1
star
69

libusnic_verbs

Perl
1
star
70

node-scr

JavaScript
1
star
71

pam_mpa

PAM module providing Multi-Person Authentication against local (/etc/shadow)
C
1
star