efca325 already increased the default bitrate for various encoders.
However, some were missed and this commit fills the gap:
* Mac-VT
* OpenH264
* Texture AMF
* VAAPI
The default of 2500 kbps was chosen 10 years ago and times have changed.
Logs and forums posts show that many users of OBS for recording don't
change their bitrate and end up with a 2.5 mbps recording which looks
terrible.
Now that service bitrate enforcement exists, this will be automatically
capped to the maximum bitrate for streaming services, so the only time
this should result in a problem is if the user's upload speed is the
limiting factor, hopefully rarer these days with increasing internet
speeds.
This reimplements the reconnect logic in mpegts muxer.
Taking cues from the WHIP output, a start and stop thread is used,
controlled by a mutex, ensuring the start and stop pipelines can never
be run concurrently.
Fixes bugs #11885, #11721, #11620, #11062, #12133.
For better readibility, this commits also breaks the big set_config
function into smaller units.
Signed-off-by: pkv <pkv@obsproject.com>
This is the first part of a fix for reconnection issues with SRT
protocol.
This part implements the logic on the side of the protocol.
The fixes are as follows:
- a cleanup of return values of the various functions used. The main
libsrt_open function returns OBS_OUTPUT_XXX enum members. But the other
functions return now only AVERROR(xxx).
- an explicit check of the socket state before returning
OBS_OUTPUT_SUCCESS. This fixes an issue due to relying on socket
non-blocking mode; in caller mode, the srt_connect function will return
a success even before a connection has succeeded since it relies on
notifications by srt_epoll_wait. This would prompt obs UI to display a
successful reconnection in spite of a failure.
Signed-off-by: pkv <pkv@obsproject.com>
The do_log function defined for the muxer expects that the struct is
named stream rather than output. So rename output to stream.
This also avoids confusion with stream->output which is an obs_output_t
pointer.
Signed-off-by: pkv <pkv@obsproject.com>
Log the codec level being used by AMF-based encoders after
ffmpeg_opts have been parsed. Users could have manually changed the
codec level so query the level via AMF then determine the string for
logging.
The default "level" setting was being used for each codec (AVC, HEVC,
AV1) supported by AMF. For example, all HEVC encoders were using
level 6.2 and this caused some playback devices to reject the
bitstream for decode because the device reported a maximum decode
level lower than 6.2.
Add functionality to determine the best match for the codec level
instead of relying on the defaults.
This allows users to leverage the OpenH264 codec from Cisco to encode
H.264 video content. It is significantly reduced in capability from
alternatives, but it does the job.
This also provides a framework for adding support for other H.264
software codecs provided through FFmpeg.
`get_rc_mode()` compares the incoming rate control mode string
to the .name member of rc_mode_t, and the table entries are
all upper-case. This caused a crash when the incoming string
is set to "cbr" instead of "CBR". Make the string comparison
case insensitive.
Use the recently added `obs_encoder_video_tex_active()` API
for AMD AMF-based encoders, similar to the recent commit for
obs-nvenc. This allows the OBS canvas to use non-NV12 pixel
formats (such as I444) while the multitrack video encoders will
use NV12 or P010 textures converted using the GPU.