Skip to content

Commit

Permalink
Merge pull request #109 from Jerome-D/main
Browse files Browse the repository at this point in the history
Add AMD Radeon encoders
  • Loading branch information
serpilliere authored Dec 7, 2022
2 parents 99e5233 + bc58e86 commit af2d07d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
16 changes: 16 additions & 0 deletions sanzu/sanzu.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,19 @@ async_depth = "1"

[ffmpeg.h264_v4l2m2m]
pixel_format = "yuv420p"

[ffmpeg.h264_amf]
#pixel_format possible values "yuv420p" "nv12"
pixel_format = "yuv420p"
#usage possible values "ultralowlatency" "lowlatency"
usage = "ultralowlatency"
#quality possible values "speed" "balanced" "quality"
quality = "balanced"

[ffmpeg.hevc_amf]
#pixel_format possible values "yuv420p" "nv12"
pixel_format = "yuv420p"
#usage possible values "ultralowlatency" "lowlatency"
usage = "ultralowlatency"
#quality possible values "speed" "balanced" "quality"
quality = "balanced"
4 changes: 2 additions & 2 deletions sanzu/src/video_encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -654,8 +654,8 @@ pub fn init_video_encoder<'a>(

pub fn get_encoder_category(encoder_name: &String) -> Result<String> {
let codec_name = match encoder_name.as_str() {
"libx264" | "h264_nvenc" | "h264_qsv" | "h264_v4l2m2m" => "h264",
"libx265" | "hevc_nvenc" | "hevc_qsv" => "hevc",
"libx264" | "h264_nvenc" | "h264_qsv" | "h264_v4l2m2m" | "h264_amf" => "h264",
"libx265" | "hevc_nvenc" | "hevc_qsv" | "hevc_amf" => "hevc",
"null" => "null",
_ => {
return Err(anyhow!("Unknown encoder category: {:?}", encoder_name));
Expand Down

0 comments on commit af2d07d

Please sign in to comment.