• Stars
    star
    106
  • Rank 325,871 (Top 7 %)
  • Language
    C
  • License
    MIT License
  • Created over 10 years ago
  • Updated over 10 years ago

Reviews

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

Repository Details

An OpenMAX IL example that records an H.264 video with a Raspberry Pi.

openmax-h264

An OpenMAX IL example that records an H.264 video with a Raspberry Pi

The Multi-Media Abstraction Layer (MMAL) library provided by Broadcom is not documented, so it's nearly impossible to understand how to use it. Furthermore, it's a library that wraps all the OpenMAX IL specification, so if you simply need to record an H.264 video like in this example, you can just ignore that extra layer and talk directly to OpenMAX IL. Once you understand OpenMAX IL, it's affordable to try to write your own programs without MMAL. In other words, if you are new to the OpenMAX world, it's better to learn OpenMAX IL than MMAL, which is not documented and only works with Broadcom devices.

This example records a 3 second video in H.264 format. The components involved are: camera, video_encode and null_sink.

If you want to play the video, you'll need to wrap it with a container format (some video players couldn't require this step), e.g. Matroska. You can download Matroska tools from here. Then, convert the H.264 file to a Matroska file:

$ mkvmerge --default-duration 0:25p -o video.mkv video.h264

Where 25p is the encoding framerate of the h264 video. For example, if you record 640x480 @30fps, then you should encode the matroska file with --default-duration 0:30p.

Build steps:

  • Download and install the gcc and make programs.
  • Download this repository.
  • Compile and execute: make && ./h264

Useful documentation:

More Repositories

1

raspberrypi-motd

Message of the Day for the Raspberry Pi.
Shell
193
star
2

node-streamifier

Converts a Buffer/String to a readable stream.
JavaScript
149
star
3

node-properties

.properties parser/stringifier.
JavaScript
134
star
4

node-tftp

Streaming TFTP client and server.
JavaScript
87
star
5

raspberrypi-omxcam

OpenMAX camera abstraction layer for the Raspberry Pi.
C
77
star
6

node-argp

Command-line option parser.
JavaScript
47
star
7

node-status-bar

A status bar for file transfers.
JavaScript
45
star
8

node-bufferedreader

Binary and event-based data buffered readers.
JavaScript
44
star
9

node-gfm

Converts GitHub flavored markdown files to html.
JavaScript
35
star
10

node-binary-reader

Buffered binary reader with a fluent api.
JavaScript
27
star
11

Node-Grace

Graceful application with domains, cluster, error handling and Express support.
JavaScript
25
star
12

node-bcp47

Parser for the BCP 47 language tag specification.
JavaScript
22
star
13

raspberrypi-openmax-jpeg

An OpenMAX IL example that captures a JPEG image with a Raspberry Pi.
C
22
star
14

node-hex

Pretty-prints a Buffer.
JavaScript
20
star
15

js-ie-version

Checks the Internet Explorer's version.
JavaScript
17
star
16

node-omxcam

Bindings for the omxcam C library.
C++
16
star
17

node-bufferedwriter

Writes buffered data to files.
JavaScript
15
star
18

node-ssl-self-signed-certificate

Self-signed SSL certificate for development.
JavaScript
13
star
19

node-seraphim

Configuration loader.
JavaScript
11
star
20

node-mongodb-fixture

MongoDB fixture utility for testing.
JavaScript
8
star
21

node-getmod

Module loader with aliases.
JavaScript
7
star
22

node-debuggy

Debugging utility tool for development.
JavaScript
5
star
23

node-speedy

Tiny benchmark utility.
JavaScript
5
star
24

nx-check-changes

GitHub Action that checks path changes in a Nx workspace
TypeScript
3
star
25

path-filtering

GitHub Action that filters paths.
TypeScript
3
star
26

angular-starter

Strictest Angular 10 starter project (Prettier, ESLint, Stylelint, Beautify and VSCode integration)
TypeScript
3
star
27

node-deferred-queue

Series control flow library.
JavaScript
2
star
28

node-rwd

Warns if the process has been started with the wrong cwd.
JavaScript
2
star
29

node-bole-console

Console formatter for the bole logger.
JavaScript
2
star
30

node-groot

Module loader with global variables.
JavaScript
2
star
31

node-cargo-ship

Parallel execution of tasks with a shared namespace.
JavaScript
1
star
32

node-bole-mongodb

MongoDB stream for the bole logger.
JavaScript
1
star
33

node-is-global

Checks whether Node.js is running a global module.
JavaScript
1
star
34

node-progress-bar-formatter

Progress bar formatter.
JavaScript
1
star
35

package-version

GitHub Action that reads the npm version from package.json file
Shell
1
star
36

Node-WalkieWatchie

File system watcher.
JavaScript
1
star