fix(amf): enable H.264 profile and coder selection#4927
Conversation
|
Thank you for the PR submission, but I noticed you didn't use our PR template. Please update the PR to use the correct template. You can find it at https://github.com/LizardByte/.github/blob/master/.github/pull_request_template.md?plain=1 |
46ed0ac to
3b8a19f
Compare
4fe233d to
3b8a19f
Compare
|
| if (cfg.profile == 66) return "baseline"s; | ||
| if (cfg.profile == 77) return "main"s; |
There was a problem hiding this comment.
Where is cfg.profile coming from? This pattern doesn't seem to exist anywhere in the codebase.
3b8a19f to
7fd0fc5
Compare
|
Updated this PR on top of current master and addressed the review feedback about \cfg.profile. Changes in this update:
Reference used: AMF encoder parameter listings for FFmpeg. |
|







Description
h264_amf) insrc/video.cppdoes not have theprofileandcoderoptions wired up in itsencoder_tdefinition. This prevents clients that strictly require H.264 Baseline/CAVLC (like the Sony PSP or other legacy hardware decoders) from successfully streaming, as the encoder defaults to High Profile and CABAC regardless of the client's request or the global configuration.Older hardware decoders often have hardwired limitations. For example, the PSP-1000's Media Engine only supports:
While Sunshine/Apollo allows selecting
cavlcin the UI, this setting is ignored by theh264_amfencoder because it isn't passed to the FFmpegavcodec_open2dictionary.Update the
amdvcedefinition insrc/video.cppto include the missing options:{"coder"s, &config::video.amd.amd_coder}, {"profile"s, [](const config_t &cfg) { if (cfg.profile == 66) return "baseline"s; if (cfg.profile == 77) return "main"s; return "high"s; }},This brings the AMD implementation into parity with NVENC and QuickSync.
Screenshot
Issues Fixed or Closed
Roadmap Issues
Type of Change
Checklist
AI Usage