Commit Graph

231 Commits (500111e230a4f55643db1c966ca2bdb61b38b375)

Author SHA1 Message Date
Kurt Kartaltepe 4d89123cdc librtmp: Allow partial success for mbedtls
mbedtls_x509_crt_parse_path returns a positive number if it partially
succeeds and a negative number on complete failure. This changes the
positive result to no longer error and prevent TLS connections (OBS
verifies all endpoints so having no CA chain prevents TLS).
2020-01-12 13:31:39 -08:00
Florian Zwoch 2699bbbd77 obs-outputs: Fix mbedtls use of deprecated functions
mbedtls_md5_starts(), mbedtls_md5_update() and mbedtls_md5_finish()
have been marked deprecated since mbedtls version 2.7 and may go
away in the future.

These function have been superseded by versions with a return
value. They are suffixed with "_ret". We do not actually check
return values.

Also the header "mbedtls/net.h" has been superseded by
"mbedtls/net_sockets.h".
2020-01-08 11:45:55 +01:00
Kurt Kartaltepe 210ebcbda7 obs-outputs: Log FTL during configure 2019-11-18 20:37:33 -08:00
Clayton Groeneveld 350969a206 rtmp-stream: Fix comparison between signed and unsigned ints 2019-10-11 22:34:49 -05:00
Gol-D-Ace 03b5be75e4 Update translations from Crowdin 2019-09-17 23:21:00 +02:00
jp9000 aa4d1d0cd1 obs-outputs: Add dynamic bitrate to RTMP output
The dynamic bitrate operates based upon estimating the current bitrate
output, and then adjusting the bitrate on the fly as necessary when
congestion is detected as a replacement for dropping frames.

This may still need adjustment, as it is difficult to accurately emulate
real-world frame drop scenarios.  This does not currently drop frames at
all, and because of that, very high congestion may cause additional
stream delay to viewers (because data will be buffered), but from
limited testing, most congestion will not cause that and it can safely
recover pretty quickly without adding significant delay.
2019-08-18 03:14:38 -07:00
jp9000 91ce2349db obs-outputs: Allow changing bitrate test limit on the fly
When doing the bitrate limit test, it can be useful to have the ability
to change the current maximum bitrate limit.  This adds the ability to
press keys on windows (numpad 0-6) to change between bitrates.  Numpad 0
being no limit, 1 being 1000, 2 being 2000, etc.
2019-08-18 03:14:38 -07:00
Richard Stanway 0e77a2c75b obs-outputs: Minor pointer fixes 2019-06-29 01:28:16 +02:00
jp9000 f53df7da64 clang-format: Apply formatting
Code submissions have continually suffered from formatting
inconsistencies that constantly have to be addressed.  Using
clang-format simplifies this by making code formatting more consistent,
and allows automation of the code formatting so that maintainers can
focus more on the code itself instead of code formatting.
2019-06-23 23:49:10 -07:00
jp9000 53615ee10f clang-format: Add clang-format files 2019-06-23 01:53:56 -07:00
Gol-D-Ace 973bc481ce Update translations from Crowdin 2019-06-11 01:42:42 +02:00
jp9000 973d31b8c2 libobs: Fix lockup when an encode call fails
(This commit also modifies the UI, obs-ffmpeg, and obs-output modules)

Fixes a long-time regression where the program would lock up if an
encode call fails.  Shuts down all outputs associated with the failing
encoder and displays an error message to the user.

Ideally, it would be best if a more detailed error could be displayed to
the user about the nature of the error, though the primary problem is
the encoder errors are typically not something the user would be able to
understand.  The current message is a bit of a generic error message;
improvement is welcome.

Another suggestion is to try to have the encoder restart seamlessly,
though it would take a significant amount of work to be able to make it
do something like that properly, and it sort of assumes that encoder
failures are sporadic, which may not necessarily be the case with some
hardware encoders on some systems.  It may be better just to use another
encoder in that case.  For now, seamless restart is ruled out.
2019-05-17 01:51:12 -07:00
James Park 2ff9cf17c0 obs-outputs: Fix undefined MSG_NOSIGNAL
Define MSG_NOSIGNAL even if CRYPTO is not defined.
2019-05-09 22:38:34 -07:00
Tristan Matthews 94c881b891 obs-outputs: Return error instead emitting SIGPIPE
This could happen if writing to a socket which was closed by the peer.
2019-05-09 17:05:38 -07:00
pkv a5b837518e obs-outputs: Fix leak with certs for rtmp 2019-04-21 23:54:27 +02:00
Gol-D-Ace 9fc1069e9b Remove double spaces from localization 2019-04-08 16:02:32 +02:00
Gol-D-Ace e78ac5ebef Update translations from Crowdin 2019-04-04 16:19:51 +02:00
Vainock a99f71ef1c Adjust locales for better consistency 2019-03-12 06:27:47 +01:00
Gol-D-Ace 98f78fe3a7 Update translations from Crowdin 2019-02-25 15:11:33 +01:00
Gol-D-Ace c3711bdd5e Update translations from Crowdin 2019-02-20 22:26:07 +01:00
Richard Stanway 15895bfb76 obs-outputs: Increase GetAdaptersAddresses buffer size
4096 is too small for most systems to do this in a single call.
2019-02-13 21:59:58 +01:00
Dead133 c3340c2049 obs-output: Update ftl-sdk version 2018-12-03 07:41:50 -08:00
Jim af320a0838
Merge pull request #1480 from kkartaltepe/module-descriptions
Plugins: Add descriptions to modules
2018-09-16 15:34:28 -07:00
Kurt Kartaltepe d86c8121ed Plugins: Add descriptions to modules 2018-09-11 18:28:58 -07:00
Jim 06488a55ce
Merge pull request #1416 from admshao/cleanup-macro-declaration
Cleanup Compilation warnings
2018-09-07 00:51:58 -07:00
Shaolin bf72435db8 obs-outputs: Fix unused variable compiler warning
Some security layer libraries code path used by the rtmp output had a
not used variable and not used param on HMAC_finish macro that was
triggering warnings during compilation.
2018-09-06 22:10:29 -03:00
Shaolin d500ef3bb5 obs-outputs: Make rtmp packet alloc code path clearer
On 64bit systems, this check will always evaluate to false due to
SIZE_MAX type and triggers a compiler warning.

This both makes it clearer that its only needed on 32bit system and
clear the compiler warning.
2018-09-06 22:10:24 -03:00
Richard Stanway c68d022f9c
obs-outputs: Revert f1f49bc1 to fix RTMP authentication
This reverts commit f1f49bc197, which
breaks RTMP authentication as these parameters are intended to "leak"
into the next use of the RTMP context.
2018-08-27 15:04:39 +02:00
Gol-D-Ace a79aaa28ab Update translations from Crowdin 2018-08-18 04:16:35 +02:00
Michael Goulet e67e2e12e6 obs-outputs: Add support for and use mbedTLS for SSL
This diff adds mbedTLS support to the obs-outputs plugin.  PolarSSL and
mbedTLS have grown so different between 2015-or-so when libRTMP was
written, and now it's no longer feasible to just use the USE_POLARSSL
flag.

This commit adds a WITH_RTMPS tri-state CMake variable (auto/on/off),
set to "Auto" by default.  "Auto" will use RTMPS if mbedTLS is found,
otherwise will disable RTMPS.  "On" will make it require mbedTLS,
otherwise fails configuration, and "Off" disables RTMPS support
altogether.

Closes obsproject/obs-studio#1360
2018-08-05 18:40:49 -07:00
Richard Stanway cc69ec16ec
obs-outputs: Update librtmp with upstream patches
Mostly security / reliability related, fixing various access to
uninitialized data, integer overflows, etc from
https://git.ffmpeg.org/rtmpdump
2018-07-23 23:22:37 +02:00
Quinn Damerell b5fb4d8673 obs-output: Update ftl-sdk version 2018-07-18 10:42:27 -07:00
pkviet f1f49bc197 librtmp: Fix memory leak
A leak was introduced by commit 1682d77 (July 11 2015).
This is a fix.
2018-06-07 00:44:29 +02:00
pkviet ce339ce613 obs-outputs/flv: Fix ECMA array size
Fixes the size of the ECMA array storing onMetadata in flv.
(from 14 to 20).
Fixes ticket 1204.
2018-03-23 19:43:48 +01:00
Gol-D-Ace 88282c168c Update translations from Crowdin 2018-03-15 09:00:28 +01:00
Quinn Damerell 90d3732247 obs-output: Update ftl-sdk version and ftl logging values 2018-02-15 16:11:23 -08:00
jp9000 cb47c61e42 Revert "obs-outputs: Fix FMS auth with query string"
This reverts commit 5cf11d6726.
2018-01-22 05:40:26 -08:00
Gol-D-Ace ae22886f67 Update translations from Crowdin 2018-01-22 04:55:52 +01:00
Matt Morrissette 5cf11d6726 obs-outputs: Fix FMS auth with query string
Fix FMS authentication to support RTMP connection URLs that have a
query string parameter already.

Closes jp9000/obs-studio#1105
2018-01-05 15:52:14 -08:00
pkviet 67e48ecc2c libobs/media-io: Replace quad with 4.0
(also obs, deps/media-playback, libobs/audio-monitoring, decklink,
linux-alsa, linux-pulseaudio, mac-capture, obs-ffmpeg, win-dshow,
win-wasapi)

Default channel layout for 4 channels is 4.0 in FFmpeg.
Replacing quad with 4.0 will improve compatibility since FFmpeg has
better support of its default channel layouts.
2018-01-05 09:48:52 -08:00
pkviet fb580535c9 libobs/media-io: Clean surround API
(also modifies obs-ffmpeg, audio-monitoring, win-wasapi, decklink,
obs-outputs)

Removes speaker layouts which are not exposed in UI.  The speaker
layouts selectable by users in the UI are the most common ones.  It is
not necessary to keep other layouts.  (This basically removes
5POINT1_SURROUND, 7POINT1_SURROUND, SURROUND =3.0).
2018-01-05 09:47:59 -08:00
jp9000 0497095f97 Fix a number of GCC warnings 2017-12-06 16:42:45 -08:00
jp9000 4704723759 Fix a number of MSVC warnings 2017-12-06 16:07:23 -08:00
jp9000 0d6204c8af Fix a number of MSVC warnings
Fixes a number of warnings with all modules
2017-12-05 13:53:44 -08:00
pkviet bbac3280c1 libobs: Add surround sound audio support
(This commit also modifies the following modules: UI,
deps/media-playback, coreaudio-encoder, decklink, linux-alsa,
linux-pulseaudio, mac-capture, obs-ffmpeg, obs-filters, obs-libfdk,
obs-outputs, win-dshow, and win-wasapi)

Adds surround sound audio support to the core, core plugins, and user
interface.

Compatible streaming services: Twitch, FB 360 live
Compatible protocols: rtmp / mpeg-ts tcp udp
Compatible file formats: mkv mp4 ts  (others untested)
Compatible codecs: ffmpeg aac, fdk_aac, CoreAudio aac,
		   opus, vorbis, pcm (others untested).
Tested streaming servers: wowza, nginx
	 HLS, mpeg-dash : surround passthrough
Html5 players tested with live surround:
	 videojs, mediaelement, viblast (hls+dash), hls.js
Decklink: on win32, swap channels order for 5.1 7.1
         (due to different channel mapping on wav, mpeg, ffmpeg)
Audio filters: surround working.
Monitoring: surround working (win macOs linux (pulse-audio)).
VST:	 stereo plugins keep in general only the first two channels.
	 surround plugins should work (e.g. mcfx does).
OS: win, macOs, linux (alsa, pulse-audio).
Misc: larger audio bitrates unlocked to accommodate more channels
NB: mf-aac only supports mono and stereo + 5.1 on win 10
         (not implemented due to lack of usefulness)

Closes jp9000/obs-studio#968
2017-11-26 03:41:53 -08:00
jp9000 5cfefce55e obs-outputs: Only set stop events if still active
The new code in 3032535f56 would signal that the output has stopped to
the back-end and front-end, but the event used in the outputs themselves
to shut down the send thread would still be signaled, causing the next
connection to immediately stop as soon as it had started.  This fixes it
so that the event does not get signaled unless the thread is active.
2017-10-12 09:56:47 -07:00
jp9000 3032535f56 obs-outputs: Signal stop if stop called when not active
Fixes a bug with reconnecting where the reconnecting would get stuck in
the "stopping" state.
2017-10-12 08:20:50 -07:00
jp9000 54e80661b6 obs-outputs: Fix up the internal FLV output
Fixes up the FLV output to ensure it functions properly.
2017-10-02 07:36:02 -07:00
jp9000 8d424cf1c7 obs-outputs: Fix FLV muxing bug
The end of an FLV tag would contain the size of the tag, but the code
was erroneously including the end size value in addition, which it's not
supposed to do normally.
2017-10-02 07:36:02 -07:00
jp9000 4a5ac39749 libobs: Fix starting video packet offset in outputs
(This commit also modifies the obs-outputs module)

The first video packet video offset (the value used to set the starting
point of video data) would be set to the DTS value of the first video
packet.  However, when b-frames are used, the first DTS value will be
negative.  This was originally done because FLV muxing requires that the
first packet's DTS start from 0.  Unfortunately, this would also
effectively cause the first packet's PTS/DTS value to be shifted forward
by the negative amount, which would cause video sync to be off by a
video frame or two.

This fixes it to start at the PTS value instead and preserve any
negative offsets.  Additionally, the FLV muxing code has been fixed to
ensure that it adjusts the starting video DTS to 0, and now correctly
adjusts the first audio packet's timestamp according to that DTS as well
(which it didn't do before).
2017-10-02 07:36:02 -07:00