Audio 无法为';找到合适的输出格式;libmp3lame';和';flv&x27;

Audio 无法为';找到合适的输出格式;libmp3lame';和';flv&x27;,audio,ffmpeg,streaming,Audio,Ffmpeg,Streaming,目前,我正在尝试在Kubuntu中使用ffmpeg设置livestream。我真的走了很远,但不幸的是,我不能找出一点提到输出格式错误。以下是我用于.sh文件的代码: #! /bin/bash # streaming on Ubuntu via ffmpeg. # see http://ubuntuguide.org/wiki/Screencasts for full documentation # input resolution, currently fullscreen. # you

目前,我正在尝试在Kubuntu中使用ffmpeg设置livestream。我真的走了很远,但不幸的是,我不能找出一点提到输出格式错误。以下是我用于.sh文件的代码:

#! /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"
现在的问题是,无论何时运行.sh文件,最后都会出现一个错误

Unable to find a suitable output format for 'libmp3lame'
libmp3lame: Invalid argument
所以我决定通过移除底部的音频线来进行故障排除,然后它就变成了

Unable to find a suitable output format for 'flv'
flv: Invalid argument
有人告诉我这是因为流键没有正确定义,但我不知道如何解决这个问题

有人有主意吗? 提前谢谢

先生,请在此处插入空格:

-crf 22\
所以

在此处插入空格:

-crf 22\
所以