{"id":13908009,"url":"https://github.com/zergon321/reisen","last_synced_at":"2025-07-18T06:32:39.246Z","repository":{"id":37807027,"uuid":"399644786","full_name":"zergon321/reisen","owner":"zergon321","description":"A simple library to extract video and audio frames from media containers (based on libav).","archived":true,"fork":false,"pushed_at":"2023-07-27T01:42:50.000Z","size":39629,"stargazers_count":137,"open_issues_count":9,"forks_count":23,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-15T20:36:38.815Z","etag":null,"topics":["audio","avcodec","avformat","avutil","decoding","ffmpeg","ffmpeg-wrapper","frame","golang","golang-library","golang-package","image","libav","libavcodec","libavutil","rgba","sample","samples","sws","video"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zergon321.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-25T00:48:10.000Z","updated_at":"2024-08-15T09:53:16.000Z","dependencies_parsed_at":"2024-06-18T18:52:02.963Z","dependency_job_id":null,"html_url":"https://github.com/zergon321/reisen","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zergon321%2Freisen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zergon321%2Freisen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zergon321%2Freisen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zergon321%2Freisen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zergon321","download_url":"https://codeload.github.com/zergon321/reisen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226361647,"owners_count":17612936,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio","avcodec","avformat","avutil","decoding","ffmpeg","ffmpeg-wrapper","frame","golang","golang-library","golang-package","image","libav","libavcodec","libavutil","rgba","sample","samples","sws","video"],"created_at":"2024-08-06T23:02:24.290Z","updated_at":"2025-07-18T06:32:39.235Z","avatar_url":"https://github.com/zergon321.png","language":"Go","funding_links":[],"categories":["HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"# Reisen [![GoDoc](https://godoc.org/github.com/zergon321/reisen?status.svg)](https://pkg.go.dev/github.com/zergon321/reisen)\n\nA simple library to extract video and audio frames from media containers (based on **libav**, i.e. **ffmpeg**).\n\n## Dependencies\n\nThe library requires **libav** components to work:\n\n- **libavformat**\n- **libavcodec**\n- **libavutil**\n- **libswresample**\n- **libswscale**\n\nFor **Arch**-based **Linux** distributions:\n\n```bash\nsudo pacman -S ffmpeg\n```\n\nFor **Debian**-based **Linux** distributions:\n\n```bash\nsudo add-apt-repository ppa:savoury1/ffmpeg4\nsudo apt install libswscale-dev libavcodec-dev libavformat-dev libswresample-dev libavutil-dev\n```\n\nFor **macOS**:\n\n```bash\nbrew install ffmpeg\n```\n\nFor **Windows** see the [detailed tutorial](https://medium.com/@maximgradan/how-to-easily-bundle-your-cgo-application-for-windows-8515d2b19f1e).\n\n## Installation\n\nJust casually run this command:\n\n```bash\ngo get github.com/zergon321/reisen\n```\n\n## Usage\n\nAny 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.\n\nThe 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.\n\n![Audio sample structure](https://github.com/zergon321/reisen/blob/master/pictures/audio_sample_structure.png)\n\nYou are welcome to look at the [examples](https://github.com/zergon321/reisen/tree/master/examples) to understand how to work with the library. Also please take a look at the detailed [tutorial](https://medium.com/@maximgradan/playing-videos-with-golang-83e67447b111).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzergon321%2Freisen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzergon321%2Freisen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzergon321%2Freisen/lists"}