X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=nageru%2Fdefs.h;h=ae07be004ff16de3120c732466b7323232fdd4a3;hb=131a051c4cd3719a9be415386fdf0f4e15da7c66;hp=7b8cc696de1120de66ce04a1b2d29138089d024c;hpb=7188e3e948c60f78f5e2cd8756337f716de06d99;p=nageru diff --git a/nageru/defs.h b/nageru/defs.h index 7b8cc69..ae07be0 100644 --- a/nageru/defs.h +++ b/nageru/defs.h @@ -3,13 +3,6 @@ #include -// This flag is only supported in FFmpeg 3.3 and up, and we only require 3.1. -#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(57, 71, 100) -#define MUX_SKIP_TRAILER "+skip_trailer" -#else -#define MUX_SKIP_TRAILER "" -#endif - #define OUTPUT_FREQUENCY 48000 // Currently needs to be exactly 48000, since bmusb outputs in that. #define MAX_FPS 60 #define FAKE_FPS 25 // Must be an integer. @@ -28,16 +21,8 @@ #define LOCAL_DUMP_SUFFIX ".nut" #define DEFAULT_STREAM_MUX_NAME "nut" // Only for HTTP. Local dump guesses from LOCAL_DUMP_SUFFIX. #define DEFAULT_HTTPD_PORT 9095 -#define MUX_OPTS { \ - /* Make seekable .mov files, and keep MP4 muxer from using unlimited amounts of memory. */ \ - { "movflags", "empty_moov+frag_keyframe+default_base_moof" MUX_SKIP_TRAILER }, \ - \ - /* Make for somewhat less bursty stream output when using .mov. */ \ - { "frag_duration", "125000" }, \ - \ - /* Keep nut muxer from using unlimited amounts of memory. */ \ - { "write_index", "0" } \ -} + +#include "shared/mux_opts.h" // In bytes. Beware, if too small, stream clients will start dropping data. // For mov, you want this at 10MB or so (for the reason mentioned above),