2017-02-24 4 views
0

Momentan versuche ich einen Livestream mit ffmpeg in Kubuntu einzurichten. Ich bin wirklich weit gekommen, aber leider kann ich ein Bit nicht erkennen, das Ausgabeformatfehler erwähnt. Hier ist der Code, den ich für meine .sh Datei bin mit:Es konnte kein passendes Ausgabeformat für 'libmp3lame' und 'flv' gefunden werden.

#! /bin/bash 

# streaming on Ubuntu via ffmpeg. 
# see http://ubuntuguide.org/wiki/Screencasts for full documentation 

# input resolution, currently fullscreen. 
# you can set it manually in the format "WIDTHxHEIGHT" instead. 
INRES="1920x1200" 

# output resolution. 
# keep the aspect ratio the same or your stream will not fill the display. 
OUTRES="1280x720" 

# input audio. You can use "/dev/dsp" for your primary audio input. 
#INAUD="pulse" 

# target fps 
FPS="30" 

# video preset quality level. 
# more FFMPEG presets avaiable in /usr/share/ffmpeg 
QUAL="ultrafast" 

# stream key. You can set this manually, or reference it from a hidden file  
like what is done here. 
STREAM_KEY=$(cat ~/.twitch_key) 

# stream url. Note the formats for twitch.tv and justin.tv 
# twitch:"rtmp://live.twitch.tv/app/$STREAM_KEY" 
# justin:"rtmp://live.justin.tv/app/$STREAM_KEY" 
STREAM_URL="rtmp://live-cdg.twitch.tv/app/$STREAM_KEY" 

ffmpeg \ 
-f alsa -ac 2 -i "$INAUD" \ 
-f x11grab -s "$INRES" -r "$FPS" -i :50.0 \ 
-vcodec libx264 -s "$OUTRES" -preset "$QUAL" -crf 22\ 
-acodec libmp3lame -threads 6 -q:a 0 -b:a 160k \ 
-f flv -ar 44100 "$STREAM_URL" 

Nun ist die Frage ist, dass, wenn ich die .sh-Datei ausführen, bekomme ich einen Fehler am Ende sagen

Unable to find a suitable output format for 'libmp3lame' 
libmp3lame: Invalid argument 

So entschied ich, durch Entfernen der Audio-Zeile am unteren Rand zu beheben und es stellte sich nur in

Unable to find a suitable output format for 'flv' 
flv: Invalid argument 

Etwas sagt mir, ist dies, weil der Strom Schlüssel nicht richtig definiert ist, aber ich habe überhaupt keine Ahnung, wie diese zu beheben.

Hat also jemand eine Idee? Vielen Dank im Voraus!

Misterff1

Antwort

0

einen Raum Geben Sie hier:

-crf 22\ 

so

-crf 22 \ 
+0

Dank! Ich kann nicht glauben, dass ich diesen Fehler gemacht habe lol – user2108727

Verwandte Themen