Reisen
A simple library to extract video and audio frames from media containers (based on libav).
Install / Use
/learn @zergon321/ReisenREADME
Reisen 
A simple library to extract video and audio frames from media containers (based on libav, i.e. ffmpeg).
Dependencies
The library requires libav components to work:
- libavformat
- libavcodec
- libavutil
- libswresample
- libswscale
For Arch-based Linux distributions:
sudo pacman -S ffmpeg
For Debian-based Linux distributions:
sudo add-apt-repository ppa:savoury1/ffmpeg4
sudo apt install libswscale-dev libavcodec-dev libavformat-dev libswresample-dev libavutil-dev
For macOS:
brew install ffmpeg
For Windows see the detailed tutorial.
Installation
Just casually run this command:
go get github.com/zergon321/reisen
Usage
Any media file is composed of streams containing media data, e.g. audio, video and subtitles. The whole presentation data of the file is divided into packets. Each packet belongs to one of the streams and represents a single frame of its data. The process of decoding implies reading packets and decoding them into either video frames or audio frames.
The library provides read video frames as RGBA pictures. The audio samples are provided as raw byte slices in the format of AV_SAMPLE_FMT_DBL (i.e. 8 bytes per sample for one channel, the data type is float64). The channel layout is stereo (2 channels). The byte order is little-endian. The detailed scheme of the audio samples sequence is given below.

You are welcome to look at the examples to understand how to work with the library. Also please take a look at the detailed tutorial.
Related Skills
healthcheck
340.2kHost security hardening and risk-tolerance configuration for OpenClaw deployments
imsg
340.2kiMessage/SMS CLI for listing chats, history, and sending messages via Messages.app.
xurl
340.2kA CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.
docs-writer
99.4k`docs-writer` skill instructions As an expert technical writer and editor for the Gemini CLI project, you produce accurate, clear, and consistent documentation. When asked to write, edit, or revie
