Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Videos: Support FFmpeg hardware transcoding with Orange Pi Rockchip #4124

Open
tredntredn opened this issue Mar 26, 2024 · 3 comments
Open
Labels
help wanted Well suited for external contributors! idea Feedback wanted / feature request video Video Formats, Transcoding, FFmpeg, Streaming & Co

Comments

@tredntredn
Copy link

Orange Pi is very powerful device, for example Orange pi 5 Plus (RK3588 +16Gb RAM+M.2 slot and so on)
There is ffmpeg version with hardware acceleration https://github.com/nyanmisaka/ffmpeg-rockchip
The developer said it can be adapted to PhotoPrism also as additional ffmpeg option:

// Supported FFmpeg AVC encoders.
const (
SoftwareEncoder AvcEncoder = "libx264" // SoftwareEncoder see https://trac.ffmpeg.org/wiki/HWAccelIntro.
IntelEncoder AvcEncoder = "h264_qsv" // IntelEncoder is the Intel Quick Sync H.264 encoder.
AppleEncoder AvcEncoder = "h264_videotoolbox" // AppleEncoder is the Apple Video Toolbox H.264 encoder.
VAAPIEncoder AvcEncoder = "h264_vaapi" // VAAPIEncoder is the Video Acceleration API H.264 encoder.
NvidiaEncoder AvcEncoder = "h264_nvenc" // NvidiaEncoder is the NVIDIA H.264 encoder.
Video4LinuxEncoder AvcEncoder = "h264_v4l2m2m" // Video4LinuxEncoder is the Video4Linux H.264 encoder.
)
// AvcEncoders is the list of supported H.264 encoders with aliases.
var AvcEncoders = map[string]AvcEncoder{
"": SoftwareEncoder,
"default": SoftwareEncoder,
"software": SoftwareEncoder,
string(SoftwareEncoder): SoftwareEncoder,
"intel": IntelEncoder,
"qsv": IntelEncoder,
string(IntelEncoder): IntelEncoder,
"apple": AppleEncoder,
"osx": AppleEncoder,
"mac": AppleEncoder,
"macos": AppleEncoder,
"darwin": AppleEncoder,
string(AppleEncoder): AppleEncoder,
"vaapi": VAAPIEncoder,
"libva": VAAPIEncoder,
string(VAAPIEncoder): VAAPIEncoder,
"nvidia": NvidiaEncoder,
"nvenc": NvidiaEncoder,
"cuda": NvidiaEncoder,
string(NvidiaEncoder): NvidiaEncoder,
"v4l2": Video4LinuxEncoder,
"v4l": Video4LinuxEncoder,
"video4linux": Video4LinuxEncoder,
"rp4": Video4LinuxEncoder,
"raspberry": Video4LinuxEncoder,
"raspberrypi": Video4LinuxEncoder,
string(Video4LinuxEncoder): Video4LinuxEncoder,
}

Please, I kindly ask you to look at this information and support new powerful Rockchip processors in your wonderful application.
Thanks

@tredntredn tredntredn added the idea Feedback wanted / feature request label Mar 26, 2024
@tezza1971
Copy link

I would just like to add my support to this. The powerful RK35588 is a phenominal chipset available in many contexts and a typical SoC distro with the say 8GB of ram would make a very capable photoprism platform even in a small business context like a realestate HQ where field agents can sync to the office. These are the sorts of open-source solutions I would like to make an enterprise of because I think free (as in freedom) software can be even more prolific than it already is. The FFMPEG thing is a big deal and I'll post another thread on HLS support.

@lastzero
Copy link
Member

We are planning to upgrade FFmpeg to 7.x with one of our upcoming releases:

Would you be able to check if the new version supports Orange Pi by default (or this can be easily added), and if so, help us upgrade to FFmpeg 7? See the issue linked above for more information.

Besides adding it to internal/ffmpeg/encoders.go, it might then also be necessary to install additional system dependencies to support the Orange Pi hardware, see the following scripts and documentation:

@lastzero lastzero changed the title Rockchip FFMPEG HW support Videos: Support FFmpeg hardware transcoding with Orange Pi Rockchip Apr 16, 2024
@lastzero lastzero added video Video Formats, Transcoding, FFmpeg, Streaming & Co help wanted Well suited for external contributors! labels Apr 16, 2024
@nyanmisaka
Copy link

We are planning to upgrade FFmpeg to 7.x with one of our upcoming releases:

Would you be able to check if the new version supports Orange Pi by default (or this can be easily added), and if so, help us upgrade to FFmpeg 7? See the issue linked above for more information.

Besides adding it to internal/ffmpeg/encoders.go, it might then also be necessary to install additional system dependencies to support the Orange Pi hardware, see the following scripts and documentation:

I think 7.0 is too new for common LTS distros, such as the upcoming Ubuntu 24.04 which will also use 6.1. Only those testing/rolling-release distros will update to 7.0 in the short term. This basically means that you need to compile portable binaries for each arch and ship them with your product.

As for the ffmpeg-rockchip fork used by the Rockchip RK3588 based SBCs, I already have a new branch for 7.0, just in case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Well suited for external contributors! idea Feedback wanted / feature request video Video Formats, Transcoding, FFmpeg, Streaming & Co
Projects
None yet
Development

No branches or pull requests

4 participants