obs-studio/plugins/obs-ffmpeg/CMakeLists.txt
jp9000 d3f92ca5d6 obs-ffmpeg: Make FFmpeg a usable output
This makes FFmpeg usable as an output, and removes or changes most of
the code that was originally intended for testing purposes.

Changes the settings for the FFmpeg output to the following:
* url:             Sets the output URL or file path
* video_bitrate:   Sets the video bitrate
* audio_bitrate:   Sets the audio bitrate
* video_encoder:   Sets the video encoder (by name, blank for default)
* audio_encoder:   Sets the audio encoder (by name, blank for default)
* video_settings:  Sets custom video encoder FFmpeg settings
* audio_settings:  Sets custom audio encoder FFmpeg settings
* scale_width:     Image scale width (0 if none)
* scale_height:    Image scale height (0 if none)

The reason why scale_width and scale_height are provided is because it
may internally convert formats, and it may be a bit more optimal to use
that scaler instead of the pre-output scaler just in case it already has
to convert formats internally anyway (though you can do it either way
you wish).

Video format handling has also changed; it will now attempt to use the
closest format to the current format if available for a given video
codec.
2015-02-04 16:51:54 -08:00

30 lines
602 B
CMake

project(obs-ffmpeg)
if(WIN32)
set(obs-ffmpeg_PLATFORM_DEPS
w32-pthreads)
endif()
find_package(FFMpeg REQUIRED
COMPONENTS avcodec avutil swscale avformat swresample)
include_directories(${FFMPEG_INCLUDE_DIRS})
set(obs-ffmpeg_HEADERS
obs-ffmpeg-formats.h
obs-ffmpeg-compat.h
closest-pixel-format.h)
set(obs-ffmpeg_SOURCES
obs-ffmpeg.c
obs-ffmpeg-aac.c
obs-ffmpeg-output.c)
add_library(obs-ffmpeg MODULE
${obs-ffmpeg_HEADERS}
${obs-ffmpeg_SOURCES})
target_link_libraries(obs-ffmpeg
libobs
${obs-ffmpeg_PLATFORM_DEPS}
${FFMPEG_LIBRARIES})
install_obs_plugin_with_data(obs-ffmpeg data)