Can you help me optimize my FFMPEG settings for streaming?
up vote
1
down vote
favorite
I want to optimize settings in ffmpeg for streaming. This is what I am currently running however I've basically copied and pasted different things I've found. I probably have some duplicate settings overlapping. Could a more experienced user please confirm if this is good?
sudo modprobe snd-aloop pcm_substreams=1
FFMPEG=ffmpeg
GIF=
STREAM_KEY=
URL=rtmp://a.rtmp.youtube.com/live2/$STREAM_KEY
FPS=30
KEYINT=$(expr $FPS * 3)
TEXT=/tmp/current_song.txt
COLOR="0xFFFFFF"
BCOLOR="0x000000"
$FFMPEG -thread_queue_size 512 -f alsa -ac 2 -i hw:Loopback,1,0 -fflags +genpts -ignore_loop 0 -r $FPS -i $GIF
-vf drawtext="fontfile=/usr/share/fonts/truetype/freefont/FreeSans.ttf:bordercolor=$BCOLOR: borderw=1: fontcolor=$COLOR:textfile=$TEXT:reload=1:y=10:x=5"
-vcodec libx264 -x264opts keyint=$KEYINT:min-keyint=$KEYINT:scenecut=-1 -b:v 5000k
-preset veryfast -s 1920x1080
-c:a libfdk_aac -b:a 128k -ar 44100
-f flv $URL
And here is the log dump
Log File:
https://pastebin.com/sv4utyT0
linux bash video ffmpeg
add a comment |
up vote
1
down vote
favorite
I want to optimize settings in ffmpeg for streaming. This is what I am currently running however I've basically copied and pasted different things I've found. I probably have some duplicate settings overlapping. Could a more experienced user please confirm if this is good?
sudo modprobe snd-aloop pcm_substreams=1
FFMPEG=ffmpeg
GIF=
STREAM_KEY=
URL=rtmp://a.rtmp.youtube.com/live2/$STREAM_KEY
FPS=30
KEYINT=$(expr $FPS * 3)
TEXT=/tmp/current_song.txt
COLOR="0xFFFFFF"
BCOLOR="0x000000"
$FFMPEG -thread_queue_size 512 -f alsa -ac 2 -i hw:Loopback,1,0 -fflags +genpts -ignore_loop 0 -r $FPS -i $GIF
-vf drawtext="fontfile=/usr/share/fonts/truetype/freefont/FreeSans.ttf:bordercolor=$BCOLOR: borderw=1: fontcolor=$COLOR:textfile=$TEXT:reload=1:y=10:x=5"
-vcodec libx264 -x264opts keyint=$KEYINT:min-keyint=$KEYINT:scenecut=-1 -b:v 5000k
-preset veryfast -s 1920x1080
-c:a libfdk_aac -b:a 128k -ar 44100
-f flv $URL
And here is the log dump
Log File:
https://pastebin.com/sv4utyT0
linux bash video ffmpeg
1
Why the duplication? It's hard to answer your question without knowing the context of what you are trying to do.
– slhck
Nov 7 at 22:13
The complete log from yourffmpeg
command would be informative for us to provide suggestions.
– LordNeckbeard
Nov 7 at 22:45
3 mbps max bitrate seems a bit low for 1080p. Are you happy with the quality you get at that bitrate? Do you have some kind of slow DSL link you want this to work over, or some other reason for keeping the bitrate that low?
– Spiff
Nov 8 at 0:02
Please help us help you. Click onedit
above and to the left, and add the requested answers into your original post. We need that to find useful information to help you.
– K7AAY
Nov 8 at 0:33
Updated and attached log :)
– Orophix
Nov 14 at 12:18
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I want to optimize settings in ffmpeg for streaming. This is what I am currently running however I've basically copied and pasted different things I've found. I probably have some duplicate settings overlapping. Could a more experienced user please confirm if this is good?
sudo modprobe snd-aloop pcm_substreams=1
FFMPEG=ffmpeg
GIF=
STREAM_KEY=
URL=rtmp://a.rtmp.youtube.com/live2/$STREAM_KEY
FPS=30
KEYINT=$(expr $FPS * 3)
TEXT=/tmp/current_song.txt
COLOR="0xFFFFFF"
BCOLOR="0x000000"
$FFMPEG -thread_queue_size 512 -f alsa -ac 2 -i hw:Loopback,1,0 -fflags +genpts -ignore_loop 0 -r $FPS -i $GIF
-vf drawtext="fontfile=/usr/share/fonts/truetype/freefont/FreeSans.ttf:bordercolor=$BCOLOR: borderw=1: fontcolor=$COLOR:textfile=$TEXT:reload=1:y=10:x=5"
-vcodec libx264 -x264opts keyint=$KEYINT:min-keyint=$KEYINT:scenecut=-1 -b:v 5000k
-preset veryfast -s 1920x1080
-c:a libfdk_aac -b:a 128k -ar 44100
-f flv $URL
And here is the log dump
Log File:
https://pastebin.com/sv4utyT0
linux bash video ffmpeg
I want to optimize settings in ffmpeg for streaming. This is what I am currently running however I've basically copied and pasted different things I've found. I probably have some duplicate settings overlapping. Could a more experienced user please confirm if this is good?
sudo modprobe snd-aloop pcm_substreams=1
FFMPEG=ffmpeg
GIF=
STREAM_KEY=
URL=rtmp://a.rtmp.youtube.com/live2/$STREAM_KEY
FPS=30
KEYINT=$(expr $FPS * 3)
TEXT=/tmp/current_song.txt
COLOR="0xFFFFFF"
BCOLOR="0x000000"
$FFMPEG -thread_queue_size 512 -f alsa -ac 2 -i hw:Loopback,1,0 -fflags +genpts -ignore_loop 0 -r $FPS -i $GIF
-vf drawtext="fontfile=/usr/share/fonts/truetype/freefont/FreeSans.ttf:bordercolor=$BCOLOR: borderw=1: fontcolor=$COLOR:textfile=$TEXT:reload=1:y=10:x=5"
-vcodec libx264 -x264opts keyint=$KEYINT:min-keyint=$KEYINT:scenecut=-1 -b:v 5000k
-preset veryfast -s 1920x1080
-c:a libfdk_aac -b:a 128k -ar 44100
-f flv $URL
And here is the log dump
Log File:
https://pastebin.com/sv4utyT0
linux bash video ffmpeg
linux bash video ffmpeg
edited Nov 14 at 12:18
asked Nov 7 at 22:03
Orophix
62
62
1
Why the duplication? It's hard to answer your question without knowing the context of what you are trying to do.
– slhck
Nov 7 at 22:13
The complete log from yourffmpeg
command would be informative for us to provide suggestions.
– LordNeckbeard
Nov 7 at 22:45
3 mbps max bitrate seems a bit low for 1080p. Are you happy with the quality you get at that bitrate? Do you have some kind of slow DSL link you want this to work over, or some other reason for keeping the bitrate that low?
– Spiff
Nov 8 at 0:02
Please help us help you. Click onedit
above and to the left, and add the requested answers into your original post. We need that to find useful information to help you.
– K7AAY
Nov 8 at 0:33
Updated and attached log :)
– Orophix
Nov 14 at 12:18
add a comment |
1
Why the duplication? It's hard to answer your question without knowing the context of what you are trying to do.
– slhck
Nov 7 at 22:13
The complete log from yourffmpeg
command would be informative for us to provide suggestions.
– LordNeckbeard
Nov 7 at 22:45
3 mbps max bitrate seems a bit low for 1080p. Are you happy with the quality you get at that bitrate? Do you have some kind of slow DSL link you want this to work over, or some other reason for keeping the bitrate that low?
– Spiff
Nov 8 at 0:02
Please help us help you. Click onedit
above and to the left, and add the requested answers into your original post. We need that to find useful information to help you.
– K7AAY
Nov 8 at 0:33
Updated and attached log :)
– Orophix
Nov 14 at 12:18
1
1
Why the duplication? It's hard to answer your question without knowing the context of what you are trying to do.
– slhck
Nov 7 at 22:13
Why the duplication? It's hard to answer your question without knowing the context of what you are trying to do.
– slhck
Nov 7 at 22:13
The complete log from your
ffmpeg
command would be informative for us to provide suggestions.– LordNeckbeard
Nov 7 at 22:45
The complete log from your
ffmpeg
command would be informative for us to provide suggestions.– LordNeckbeard
Nov 7 at 22:45
3 mbps max bitrate seems a bit low for 1080p. Are you happy with the quality you get at that bitrate? Do you have some kind of slow DSL link you want this to work over, or some other reason for keeping the bitrate that low?
– Spiff
Nov 8 at 0:02
3 mbps max bitrate seems a bit low for 1080p. Are you happy with the quality you get at that bitrate? Do you have some kind of slow DSL link you want this to work over, or some other reason for keeping the bitrate that low?
– Spiff
Nov 8 at 0:02
Please help us help you. Click on
edit
above and to the left, and add the requested answers into your original post. We need that to find useful information to help you.– K7AAY
Nov 8 at 0:33
Please help us help you. Click on
edit
above and to the left, and add the requested answers into your original post. We need that to find useful information to help you.– K7AAY
Nov 8 at 0:33
Updated and attached log :)
– Orophix
Nov 14 at 12:18
Updated and attached log :)
– Orophix
Nov 14 at 12:18
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1373601%2fcan-you-help-me-optimize-my-ffmpeg-settings-for-streaming%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Why the duplication? It's hard to answer your question without knowing the context of what you are trying to do.
– slhck
Nov 7 at 22:13
The complete log from your
ffmpeg
command would be informative for us to provide suggestions.– LordNeckbeard
Nov 7 at 22:45
3 mbps max bitrate seems a bit low for 1080p. Are you happy with the quality you get at that bitrate? Do you have some kind of slow DSL link you want this to work over, or some other reason for keeping the bitrate that low?
– Spiff
Nov 8 at 0:02
Please help us help you. Click on
edit
above and to the left, and add the requested answers into your original post. We need that to find useful information to help you.– K7AAY
Nov 8 at 0:33
Updated and attached log :)
– Orophix
Nov 14 at 12:18