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.
This commit is contained in:
jp9000
2015-01-25 10:34:58 -08:00
parent fcb8561d6c
commit d3f92ca5d6
3 changed files with 238 additions and 73 deletions

View File

@@ -11,7 +11,8 @@ include_directories(${FFMPEG_INCLUDE_DIRS})
set(obs-ffmpeg_HEADERS
obs-ffmpeg-formats.h
obs-ffmpeg-compat.h)
obs-ffmpeg-compat.h
closest-pixel-format.h)
set(obs-ffmpeg_SOURCES
obs-ffmpeg.c
obs-ffmpeg-aac.c