4 #include <libavformat/version.h>
6 // This flag is only supported in FFmpeg 3.3 and up, and we only require 3.1.
7 #if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(57, 71, 100)
8 #define MUX_SKIP_TRAILER "+skip_trailer"
10 #define MUX_SKIP_TRAILER ""
13 #define OUTPUT_FREQUENCY 48000 // Currently needs to be exactly 48000, since bmusb outputs in that.
15 #define FAKE_FPS 25 // Must be an integer.
16 #define MAX_VIDEO_CARDS 16
17 #define MAX_ALSA_CARDS 16
18 #define MAX_BUSES 256 // Audio buses.
20 // For deinterlacing. See also comments on InputState.
21 #define FRAME_HISTORY_LENGTH 5
23 #define AUDIO_OUTPUT_CODEC_NAME "pcm_s32le"
24 #define DEFAULT_AUDIO_OUTPUT_BIT_RATE 0
25 #define DEFAULT_X264_OUTPUT_BIT_RATE 4500 // 5 Mbit after making room for some audio and TCP overhead.
27 #define LOCAL_DUMP_PREFIX "record-"
28 #define LOCAL_DUMP_SUFFIX ".nut"
29 #define DEFAULT_STREAM_MUX_NAME "nut" // Only for HTTP. Local dump guesses from LOCAL_DUMP_SUFFIX.
30 #define DEFAULT_HTTPD_PORT 9095
32 /* Make seekable .mov files, and keep MP4 muxer from using unlimited amounts of memory. */ \
33 { "movflags", "empty_moov+frag_keyframe+default_base_moof" MUX_SKIP_TRAILER }, \
35 /* Make for somewhat less bursty stream output when using .mov. */ \
36 { "frag_duration", "125000" }, \
38 /* Keep nut muxer from using unlimited amounts of memory. */ \
39 { "write_index", "0" } \
42 // In bytes. Beware, if too small, stream clients will start dropping data.
43 // For mov, you want this at 10MB or so (for the reason mentioned above),
44 // but for nut, there's no flushing, so such a large mux buffer would cause
45 // the output to be very uneven.
46 #define MUX_BUFFER_SIZE 10485760
48 // In number of frames. Comes in addition to any internal queues in x264
49 // (frame threading, lookahead, etc.).
50 #define X264_QUEUE_LENGTH 50
52 #define X264_DEFAULT_PRESET "ultrafast"
53 #define X264_DEFAULT_TUNE "film"
55 #endif // !defined(_DEFS_H)