]> git.sesse.net Git - nageru/blob - defs.h
Update the queue length metric after trimming, not before.
[nageru] / defs.h
1 #ifndef _DEFS_H
2 #define _DEFS_H
3
4 #define OUTPUT_FREQUENCY 48000  // Currently needs to be exactly 48000, since bmusb outputs in that.
5 #define MAX_FPS 60
6 #define FAKE_FPS 25  // Must be an integer.
7 #define MAX_VIDEO_CARDS 16
8 #define MAX_ALSA_CARDS 16
9 #define MAX_BUSES 256  // Audio buses.
10
11 // For deinterlacing. See also comments on InputState.
12 #define FRAME_HISTORY_LENGTH 5
13
14 #define AUDIO_OUTPUT_CODEC_NAME "pcm_s32le"
15 #define DEFAULT_AUDIO_OUTPUT_BIT_RATE 0
16 #define DEFAULT_X264_OUTPUT_BIT_RATE 4500  // 5 Mbit after making room for some audio and TCP overhead.
17
18 #define LOCAL_DUMP_PREFIX "record-"
19 #define LOCAL_DUMP_SUFFIX ".nut"
20 #define DEFAULT_STREAM_MUX_NAME "nut"  // Only for HTTP. Local dump guesses from LOCAL_DUMP_SUFFIX.
21 #define MUX_OPTS { \
22         /* Make seekable .mov files. */ \
23         { "movflags", "empty_moov+frag_keyframe+default_base_moof" }, \
24         \
25         /* Make for somewhat less bursty stream output when using .mov. */ \
26         { "frag_duration", "125000" }, \
27         \
28         /* Keep nut muxer from using unlimited amounts of memory. */ \
29         { "write_index", "0" } \
30 }
31
32 // In bytes. Beware, if too small, stream clients will start dropping data.
33 // For mov, you want this at 10MB or so (for the reason mentioned above),
34 // but for nut, there's no flushing, so such a large mux buffer would cause
35 // the output to be very uneven.
36 #define MUX_BUFFER_SIZE 10485760
37
38 // In number of frames. Comes in addition to any internal queues in x264
39 // (frame threading, lookahead, etc.).
40 #define X264_QUEUE_LENGTH 50
41
42 #define X264_DEFAULT_PRESET "ultrafast"
43 #define X264_DEFAULT_TUNE "film"
44
45 #endif  // !defined(_DEFS_H)