2023-12-28 09:34:51 +08:00
ffmpeg-rockchip
=============
This project aims to provide full hardware transcoding pipeline in FFmpeg CLI for Rockchip platforms that support MPP ([Media Process Platform ](https://github.com/rockchip-linux/mpp )) and RGA ([2D Raster Graphic Acceleration ](https://github.com/airockchip/librga )). This includes hardware decoders, encoders and filters. A typical target platform is RK3588/3588s based devices.
## Hightlights
* MPP decoders support up to 8K 10-bit H.264, HEVC, VP9 and AV1 decoding
* MPP decoders support producing AFBC (ARM Frame Buffer Compression) image
* MPP decoders support de-interlace using IEP (Image Enhancement Processor)
* MPP decoders support allocator half-internal and pure-external modes
* MPP encoders support up to 8K H.264 and HEVC encoding
* MPP encoders support async encoding, AKA frame-parallel
* MPP encoders support consuming AFBC image
* RGA filters support image scaling and pixel format conversion
* RGA filters support image cropping
* RGA filters support image transposing
* RGA filters support blending two images
* RGA filters support async operation
* RGA filters support producing and consuming AFBC image
* Zero-copy DMA in above stages
## How to use
The documentation is available on the [Wiki ](https://github.com/nyanmisaka/ffmpeg-rockchip/wiki ) page of this project.
## Codecs and filters
### Decoders/Hwaccel
```
V..... av1_rkmpp Rockchip MPP (Media Process Platform) AV1 decoder (codec av1)
V..... h263_rkmpp Rockchip MPP (Media Process Platform) H263 decoder (codec h263)
V..... h264_rkmpp Rockchip MPP (Media Process Platform) H264 decoder (codec h264)
V..... hevc_rkmpp Rockchip MPP (Media Process Platform) HEVC decoder (codec hevc)
2025-05-31 18:10:35 +08:00
V..... mjpeg_rkmpp Rockchip MPP (Media Process Platform) MJPEG decoder (codec mjpeg)
2023-12-28 09:34:51 +08:00
V..... mpeg1_rkmpp Rockchip MPP (Media Process Platform) MPEG1VIDEO decoder (codec mpeg1video)
V..... mpeg2_rkmpp Rockchip MPP (Media Process Platform) MPEG2VIDEO decoder (codec mpeg2video)
V..... mpeg4_rkmpp Rockchip MPP (Media Process Platform) MPEG4 decoder (codec mpeg4)
V..... vp8_rkmpp Rockchip MPP (Media Process Platform) VP8 decoder (codec vp8)
V..... vp9_rkmpp Rockchip MPP (Media Process Platform) VP9 decoder (codec vp9)
```
### Encoders
```
V..... h264_rkmpp Rockchip MPP (Media Process Platform) H264 encoder (codec h264)
V..... hevc_rkmpp Rockchip MPP (Media Process Platform) HEVC encoder (codec hevc)
2024-03-26 22:35:48 +08:00
V..... mjpeg_rkmpp Rockchip MPP (Media Process Platform) MJPEG encoder (codec mjpeg)
2023-12-28 09:34:51 +08:00
```
### Filters
```
... overlay_rkrga VV->V Rockchip RGA (2D Raster Graphic Acceleration) video compositor
... scale_rkrga V->V Rockchip RGA (2D Raster Graphic Acceleration) video resizer and format converter
... vpp_rkrga V->V Rockchip RGA (2D Raster Graphic Acceleration) video post-process (scale/crop/transpose)
```
## Important
* Rockchip BSP/vendor kernel is necessary, 5.10 and 6.1 are two tested versions.
* For the supported maximum resolution and FPS you can refer to the datasheet or TRM.
* User MUST be granted permission to access these device files.
```
# DRM allocator
/dev/dri
# DMA_HEAP allocator
/dev/dma_heap
# RGA filters
/dev/rga
# MPP codecs
/dev/mpp_service
# Optional, for compatibility with older kernels and socs
/dev/iep
/dev/mpp-service
/dev/vpu_service
/dev/vpu-service
/dev/hevc_service
/dev/hevc-service
/dev/rkvdec
/dev/rkvenc
/dev/vepu
/dev/h265e
```
## Todo
* Support MPP VP8 video encoder
* ...
## Acknowledgments
@[hbiyik ](https://github.com/hbiyik ) @[HermanChen ](https://github.com/HermanChen ) @[rigaya ](https://github.com/rigaya )
---
2011-03-17 17:02:14 +01:00
FFmpeg README
2014-05-27 20:14:48 +02:00
=============
2001-07-22 14:37:44 +00:00
2014-08-17 21:07:05 +02:00
FFmpeg is a collection of libraries and tools to process multimedia content
2014-08-12 19:34:47 +02:00
such as audio, video, subtitles and related metadata.
2001-07-22 14:37:44 +00:00
2014-08-12 19:34:47 +02:00
## Libraries
2014-05-27 20:14:48 +02:00
2014-08-12 19:34:47 +02:00
* `libavcodec` provides implementation of a wider range of codecs.
* `libavformat` implements streaming protocols, container formats and basic I/O access.
* `libavutil` includes hashers, decompressors and miscellaneous utility functions.
2021-10-08 09:44:34 +05:30
* `libavfilter` provides means to alter decoded audio and video through a directed graph of connected filters.
2014-08-12 19:34:47 +02:00
* `libavdevice` provides an abstraction to access capture and playback devices.
2014-08-17 21:07:05 +02:00
* `libswresample` implements audio mixing and resampling routines.
2014-08-12 19:34:47 +02:00
* `libswscale` implements color conversion and scaling routines.
2001-07-22 14:37:44 +00:00
2014-08-12 19:34:47 +02:00
## Tools
2001-07-22 14:37:44 +00:00
2015-10-05 23:39:08 -04:00
* [ffmpeg ](https://ffmpeg.org/ffmpeg.html ) is a command line toolbox to
2014-08-12 19:34:47 +02:00
manipulate, convert and stream multimedia content.
2015-10-05 23:39:08 -04:00
* [ffplay ](https://ffmpeg.org/ffplay.html ) is a minimalistic multimedia player.
* [ffprobe ](https://ffmpeg.org/ffprobe.html ) is a simple analysis tool to inspect
2014-08-12 19:34:47 +02:00
multimedia content.
* Additional small tools such as `aviocat` , `ismindex` and `qt-faststart` .
2012-04-06 10:23:26 +02:00
2014-08-12 19:34:47 +02:00
## Documentation
2012-04-06 10:23:26 +02:00
2014-08-12 19:34:47 +02:00
The offline documentation is available in the **doc/** directory.
2015-10-05 23:39:08 -04:00
The online documentation is available in the main [website ](https://ffmpeg.org )
and in the [wiki ](https://trac.ffmpeg.org ).
2014-08-12 19:34:47 +02:00
### Examples
2014-11-03 09:20:27 +01:00
Coding examples are available in the **doc/examples** directory.
2014-08-12 19:34:47 +02:00
## License
2014-08-17 21:07:05 +02:00
FFmpeg codebase is mainly LGPL-licensed with optional components licensed under
2014-08-12 19:34:47 +02:00
GPL. Please refer to the LICENSE file for detailed information.
2015-09-14 13:24:22 -08:00
## Contributing
Patches should be submitted to the ffmpeg-devel mailing list using
`git format-patch` or `git send-email` . Github pull requests should be
2016-09-18 00:41:46 +01:00
avoided because they are not part of our review process and will be ignored.