Change quality, otherwise twitch craps itself
This commit is contained in:
parent
ed52692324
commit
5bfbdec58f
@ -377,7 +377,7 @@ static AVStream *add_video_stream(AVFormatContext *av_format_context, AVCodec **
|
|||||||
fprintf(stderr, "codec id: %d\n", (*codec)->id);
|
fprintf(stderr, "codec id: %d\n", (*codec)->id);
|
||||||
codec_context->width = window_pixmap.texture_width & ~1;
|
codec_context->width = window_pixmap.texture_width & ~1;
|
||||||
codec_context->height = window_pixmap.texture_height & ~1;
|
codec_context->height = window_pixmap.texture_height & ~1;
|
||||||
codec_context->bit_rate = 5000000 + (codec_context->width * codec_context->height) / 2; //5000000 * ((double)fps / 30.0) + (codec_context->width * codec_context->height) / 2;
|
codec_context->bit_rate = 3000000 + (codec_context->width * codec_context->height) / 2; //5000000 * ((double)fps / 30.0) + (codec_context->width * codec_context->height) / 2;
|
||||||
// Timebase: This is the fundamental unit of time (in seconds) in terms
|
// Timebase: This is the fundamental unit of time (in seconds) in terms
|
||||||
// of which frame timestamps are represented. For fixed-fps content,
|
// of which frame timestamps are represented. For fixed-fps content,
|
||||||
// timebase should be 1/framerate and timestamp increments should be
|
// timebase should be 1/framerate and timestamp increments should be
|
||||||
|
@ -2,4 +2,4 @@
|
|||||||
|
|
||||||
[ "$#" -ne 4 ] && echo "usage: twitch-stream.sh <window_id> <fps> <audio_input> <livestream_key>" && exit 1
|
[ "$#" -ne 4 ] && echo "usage: twitch-stream.sh <window_id> <fps> <audio_input> <livestream_key>" && exit 1
|
||||||
#ismv
|
#ismv
|
||||||
sibs build --release && ./sibs-build/linux_x86_64/release/gpu-screen-recorder -w "$1" -c flv -f "$2" -a "$3" | ffmpeg -i pipe:0 -c:v copy -f flv "rtmp://live.twitch.tv/app/$4"
|
sibs build --release && ./sibs-build/linux_x86_64/release/gpu-screen-recorder -w "$1" -c flv -f "$2" -a "$3" | ffmpeg -i pipe:0 -c:v copy -f flv -max_muxing_queue_size 4096 -- "rtmp://live.twitch.tv/app/$4"
|
||||||
|
Loading…
Reference in New Issue
Block a user