mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-20 13:08:50 +02:00
9048743ebe
In addition to the flv file format, this allows the ability to save to container formats such as mp4, ts, mkv, and any other containers that support the current codecs being used. It pipes the encoded data to the ffmpeg-mux process, which then safely muxes the file from the encoded data. If the main program unexpectedly terminates, the ffmpeg-mux piped program will safely close the file and write trailer data, preventing file corruption.
35 lines
694 B
CMake
35 lines
694 B
CMake
project(obs-ffmpeg)
|
|
|
|
if(MSVC)
|
|
set(obs-ffmpeg_PLATFORM_DEPS
|
|
w32-pthreads)
|
|
endif()
|
|
|
|
find_package(FFMpeg REQUIRED
|
|
COMPONENTS avcodec avfilter avdevice 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
|
|
obs-ffmpeg-mux.c
|
|
obs-ffmpeg-source.c)
|
|
|
|
add_library(obs-ffmpeg MODULE
|
|
${obs-ffmpeg_HEADERS}
|
|
${obs-ffmpeg_SOURCES})
|
|
target_link_libraries(obs-ffmpeg
|
|
libobs
|
|
libff
|
|
${obs-ffmpeg_PLATFORM_DEPS}
|
|
${FFMPEG_LIBRARIES})
|
|
|
|
install_obs_plugin_with_data(obs-ffmpeg data)
|
|
|
|
add_subdirectory(ffmpeg-mux)
|