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.
23 lines
551 B
C
23 lines
551 B
C
#include <obs-module.h>
|
|
|
|
OBS_DECLARE_MODULE()
|
|
OBS_MODULE_USE_DEFAULT_LOCALE("obs-ffmpeg", "en-US")
|
|
|
|
extern struct obs_source_info ffmpeg_source;
|
|
extern struct obs_output_info ffmpeg_output;
|
|
extern struct obs_output_info ffmpeg_muxer;
|
|
extern struct obs_encoder_info aac_encoder_info;
|
|
|
|
void initialize_ffmpeg_source();
|
|
|
|
bool obs_module_load(void)
|
|
{
|
|
initialize_ffmpeg_source();
|
|
|
|
obs_register_source(&ffmpeg_source);
|
|
obs_register_output(&ffmpeg_output);
|
|
obs_register_output(&ffmpeg_muxer);
|
|
obs_register_encoder(&aac_encoder_info);
|
|
return true;
|
|
}
|