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

Adding go2rtc presets for Rockchip hardware acceleration #8686

Merged
merged 4 commits into from
Nov 21, 2023
Merged

Conversation

MarcA711
Copy link
Contributor

Works using this syntax:

go2rtc:
  streams:
    Cam:
      - ffmpeg:/config/Big_Buck_Bunny_1080_hevc.mp4#video=h264/rk

However, this does not work and uses software decoding instead:

go2rtc:
  streams:
    Cam:
      - ffmpeg:/config/Big_Buck_Bunny_1080_hevc.mp4#video=h264#hardware=rk

Is this normal behavior, because this preset was added using the config and not as a default preset?

And what about decoding? go2rtc calls FFmpeg this way:
ffmpeg -hide_banner -re -i /config/Big_Buck_Bunny_1080_hevc.mp4 -c:v libx264 -g 50 -profile:v high -level:v 4.1 -preset:v superfast -tune:v zerolatency -pix_fmt:v yuv420p -an -user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp {output}
So, no decoder is specified and and FFmpeg auto selects one. As far as I can see, this is the way it's done in go2rtc (selecting the encoder and not selecting decoder). Is this correct or should I also add decoding presets that can be passed using #input=hevc/rk_dec?

Copy link

netlify bot commented Nov 20, 2023

Deploy Preview for frigate-docs canceled.

Name Link
🔨 Latest commit ea929e9
🔍 Latest deploy log https://app.netlify.com/sites/frigate-docs/deploys/655b988d03a89b000821dec6

@NickM-27
Copy link
Sponsor Collaborator

#hardware is a go2rtc specific thing that requires a code change on the go2rtc side. I'm not sure if AlexxIt would be open to this given that the default go2rtc binary does not include support for rk hardware

@NickM-27
Copy link
Sponsor Collaborator

I believe encoder should be fine as ffmpeg will auto select the decoder in this case

@MarcA711 MarcA711 marked this pull request as ready for review November 20, 2023 17:34
@blakeblackshear blakeblackshear merged commit 1eb5105 into blakeblackshear:dev Nov 21, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants