0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 21:13:04 +02:00
obs-studio/libobs/util
jp9000 b427397aa9 RTMP output: Implement frame drop code
A little bit of history about frame dropping:

I did a large number of experiments with frame dropping in old versions
of OBS1, and it's not an easy thing to deal with.  I tried just about
everything from standard i-frame delay, to large buffers, to dumping
packets, to super-unnecessarily-complex things that just ended up
causing more problems than they was worth.

When I did my experiments, I found that the most ideal frame drop system
(in terms of reducing the amount of total data that needed to be
dropped) was in the 0.4xx days where I had a 3 second frame-drop buffer
where I could calculate the actual buffer size in bytes, and then
intellgently choose packets in that buffer to trim it down to a specific
size while minimizing the number of p-frames and i-frames dropped, and
preventing the actual impact of dropped frames on the stream.  The
downside of it was that it required too much extra latency, and far too
many people complained about it, so it was removed in favor of the
current system.

The current system I just refer to just as 'packet dumping', which when
combined with low keyframe intervals (like most services use these
days), is the next-best method from my experience.  Just dump the buffer
when you reach a threshold of buffering (which I prefer to measure with
time rather than in size), then wait for a new i-frame.  Simple,
effective, and reduces the risk of consecutive buffering, while still
having fairly low impact on the stream output due to the low keyframe
interval of services.

By the way, audio will not (and should not ever) be dropped, lest you
end up with syncing issues (among other nasty things) specific to server
implementation.
2014-04-12 04:34:15 -07:00
..
vc converted project to vs2013, removed 2010 support (ugh) 2013-12-14 16:01:30 -07:00
windows Add dummy GL texture flag & direct object access 2014-03-29 17:19:31 -07:00
AlignedNew.hpp add my signal/callback interface from another project, also update license of utility files to ISC 1.3 2013-12-25 22:40:33 -07:00
array-serializer.c Implement RTMP module (still needs drop code) 2014-04-07 22:00:10 -07:00
array-serializer.h Improve serializer and add array serializer 2014-04-01 11:27:27 -07:00
base.c Fix log_level check 2014-04-03 23:41:07 +02:00
base.h Be more consistent about log levels 2014-02-28 20:02:29 -07:00
bmem.c Use atomics for allocation counter 2014-04-07 01:25:38 -07:00
bmem.h Use atomics for allocation counter 2014-04-07 01:25:38 -07:00
c99defs.h Fix a some more linux/GCC specific warnings 2014-02-14 15:56:01 -07:00
cf-lexer.c Simplify and extend callback/signalling system 2014-03-01 05:54:55 -07:00
cf-lexer.h add my signal/callback interface from another project, also update license of utility files to ISC 1.3 2013-12-25 22:40:33 -07:00
cf-parser.c Give cf_parser functions better naming 2014-03-01 01:25:41 -07:00
cf-parser.h Simplify and extend callback/signalling system 2014-03-01 05:54:55 -07:00
circlebuf.h RTMP output: Implement frame drop code 2014-04-12 04:34:15 -07:00
config-file.c Make audio devices save to settings 2014-03-07 12:56:31 -07:00
config-file.h Add comments to config-file.h 2014-04-07 01:29:56 -07:00
darray.h Add preliminary streaming code for testing 2014-03-10 13:10:35 -07:00
dstr.c Implement RTMP module (still needs drop code) 2014-04-07 22:00:10 -07:00
dstr.h Implement encoder interface (still preliminary) 2014-03-16 16:21:34 -07:00
lexer.c add my signal/callback interface from another project, also update license of utility files to ISC 1.3 2013-12-25 22:40:33 -07:00
lexer.h Simplify and extend callback/signalling system 2014-03-01 05:54:55 -07:00
platform-cocoa.m Add WASAPI audio capture 2014-03-04 07:07:13 -07:00
platform-nix.c Use atomic functions where appropriate 2014-03-16 18:26:46 -07:00
platform-windows.c Use atomic functions where appropriate 2014-03-16 18:26:46 -07:00
platform.c Add WASAPI audio capture 2014-03-04 07:07:13 -07:00
platform.h Use atomic functions where appropriate 2014-03-16 18:26:46 -07:00
serializer.h Implement RTMP module (still needs drop code) 2014-04-07 22:00:10 -07:00
text-lookup.c Use bzalloc instead of bmalloc then memset 2014-02-09 12:34:07 -07:00
text-lookup.h add my signal/callback interface from another project, also update license of utility files to ISC 1.3 2013-12-25 22:40:33 -07:00
threading-posix.c Fix GNU atomic builtins 2014-03-17 14:16:05 -07:00
threading-windows.c Use atomic functions where appropriate 2014-03-16 18:26:46 -07:00
threading.h Use atomic functions where appropriate 2014-03-16 18:26:46 -07:00
utf8.c first commit 2013-09-30 19:37:13 -07:00
utf8.h modernize header guards to #pragma once 2013-10-14 13:21:15 +02:00
util.hpp add my signal/callback interface from another project, also update license of utility files to ISC 1.3 2013-12-25 22:40:33 -07:00