Skip to content

Commit

Permalink
Add mapping between membrane and ffmpeg profiles namings
Browse files Browse the repository at this point in the history
  • Loading branch information
Noarkhh committed Feb 29, 2024
1 parent 18f736f commit 8103ae3
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion lib/membrane_h264_ffmpeg/encoder.ex
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ defmodule Membrane.H264.FFmpeg.Encoder do
stream_format.pixel_format,
state.preset,
state.tune,
state.profile,
get_ffmpeg_profile(state.profile),
state.max_b_frames || -1,
state.gop_size || -1,
timebase_num,
Expand Down Expand Up @@ -228,4 +228,16 @@ defmodule Membrane.H264.FFmpeg.Encoder do
profile: state.profile
}}
end

defp get_ffmpeg_profile(profile) do
case profile do
:high_10 -> :high10
:high_10_intra -> :high10
:high_422 -> :high422
:high_422_intra -> :high422
:high_444 -> :high444
:high_444_intra -> :high444
other -> other
end
end
end

0 comments on commit 8103ae3

Please sign in to comment.