-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
plugins: Move AMF encoders from obs-ffmpeg as a separate plugin
- Loading branch information
Showing
12 changed files
with
102 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
cmake_minimum_required(VERSION 3.28...3.30) | ||
|
||
option(ENABLE_AMF "Build AMD Radeon Hardware Encoder Plugin" ON) | ||
|
||
if(NOT ENABLE_AMF) | ||
target_disable_feature(obs-amf "AMD Radeon Hardware Encoder") | ||
target_disable(obs-amf) | ||
return() | ||
endif() | ||
|
||
if(NOT TARGET OBS::opts-parser) | ||
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/opts-parser" "${CMAKE_BINARY_DIR}/shared/opts-parser") | ||
endif() | ||
|
||
find_package(AMF 1.4.29 REQUIRED) | ||
|
||
add_library(obs-amf MODULE) | ||
add_library(OBS::amf ALIAS obs-amf) | ||
|
||
add_subdirectory(obs-amf-test) | ||
|
||
target_sources(obs-amf PRIVATE obs-amf.c texture-amf-opts.hpp texture-amf.cpp) | ||
|
||
target_link_libraries(obs-amf PRIVATE OBS::libobs OBS::opts-parser AMF::AMF) | ||
|
||
if(OS_WINDOWS) | ||
configure_file(cmake/windows/obs-module.rc.in obs-amf.rc) | ||
target_sources(obs-amf PRIVATE obs-amf.rc) | ||
endif() | ||
|
||
set_target_properties_obs(obs-amf PROPERTIES FOLDER plugins/obs-amf PREFIX "") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
1 VERSIONINFO | ||
FILEVERSION ${OBS_VERSION_MAJOR},${OBS_VERSION_MINOR},${OBS_VERSION_PATCH},0 | ||
BEGIN | ||
BLOCK "StringFileInfo" | ||
BEGIN | ||
BLOCK "040904B0" | ||
BEGIN | ||
VALUE "CompanyName", "${OBS_COMPANY_NAME}" | ||
VALUE "FileDescription", "OBS AMF module" | ||
VALUE "FileVersion", "${OBS_VERSION_CANONICAL}" | ||
VALUE "ProductName", "${OBS_PRODUCT_NAME}" | ||
VALUE "ProductVersion", "${OBS_VERSION_CANONICAL}" | ||
VALUE "Comments", "${OBS_COMMENTS}" | ||
VALUE "LegalCopyright", "${OBS_LEGAL_COPYRIGHT}" | ||
VALUE "InternalName", "obs-amf" | ||
VALUE "OriginalFilename", "obs-amf" | ||
END | ||
END | ||
|
||
BLOCK "VarFileInfo" | ||
BEGIN | ||
VALUE "Translation", 0x0409, 0x04B0 | ||
END | ||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Bitrate="Bitrate" | ||
Preset="Preset" | ||
Profile="Profile" | ||
RateControl="Rate Control" | ||
KeyframeIntervalSec="Keyframe Interval (0=auto)" | ||
|
||
AMFOpts="AMF/FFmpeg Options" | ||
AMFOpts.ToolTip="Use to specify custom AMF or FFmpeg options. For example, \"level=5.2 profile=main\". Check the AMF encoder docs for more details." | ||
|
||
BFrames="Max B-frames" | ||
|
||
NVENC.CQLevel="CQ Level" | ||
|
||
AMF.Preset.speed="Speed" | ||
AMF.Preset.balanced="Balanced" | ||
AMF.Preset.quality="Quality" | ||
AMF.Preset.highQuality="High Quality" | ||
|
||
AMF.8bitUnsupportedHdr="OBS does not support 8-bit output of Rec. 2100." | ||
AMF.10bitUnsupportedAvc="Cannot perform 10-bit encode on AMD H.264 encoder." | ||
AMF.16bitUnsupported="Cannot perform 16-bit encode on this encoder." |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#include <obs-module.h> | ||
|
||
extern void amf_load(void); | ||
extern void amf_unload(void); | ||
|
||
OBS_DECLARE_MODULE() | ||
OBS_MODULE_USE_DEFAULT_LOCALE("obs-amf", "en-US") | ||
|
||
MODULE_EXPORT const char *obs_module_description(void) | ||
{ | ||
return "AMD Radeon Encoder (AMF) Plugin"; | ||
} | ||
|
||
bool obs_module_load(void) | ||
{ | ||
amf_load(); | ||
|
||
return true; | ||
} | ||
|
||
void obs_module_unload(void) | ||
{ | ||
amf_unload(); | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters