![替代方案 OBS - 开放广播软件](https://linux22.com/image/1137642/%E6%9B%BF%E4%BB%A3%E6%96%B9%E6%A1%88%20OBS%20-%20%E5%BC%80%E6%94%BE%E5%B9%BF%E6%92%AD%E8%BD%AF%E4%BB%B6.png)
我遇到了一个问题。OBS [Open Broadcaster Software] 无法在我的笔记本电脑上运行,因为它不支持 OpenGL 3.5。我想进入现场编码,那么有没有OBS的替代品呢?
记录错误 OBS
Attempted path: share/obs/obs-studio/locale/en-US.ini
Attempted path: /usr/share/obs/obs-studio/locale/en-US.ini
Attempted path: share/obs/obs-studio/locale.ini
Attempted path: /usr/share/obs/obs-studio/locale.ini
Attempted path: share/obs/obs-studio/locale/es-ES.ini
Attempted path: /usr/share/obs/obs-studio/locale/es-ES.ini
info: Using preferred locale 'es-ES'
Attempted path: share/obs/obs-studio/themes/Default.qss
Attempted path: /usr/share/obs/obs-studio/themes/Default.qss
Attempted path: share/obs/obs-studio/license/gplv2.txt
Attempted path: /usr/share/obs/obs-studio/license/gplv2.txt
info: Processor: 4 logical cores
info: Processor: Intel(R) Core(TM) i5 CPU M 480 @ 2.67GHz
info: Physical Memory: 5640MB Total
info: Kernel Version: Linux 4.4.0-24-generic
info: Distribution: "Ubuntu" "16.04"
QObject::connect: invalid null parameter
info: OBS 0.14.2 (linux)
info: ---------------------------------
info: ---------------------------------
info: audio settings reset:
samples per sec: 44100
speakers: 2
error: X Error: GLXBadFBConfig
error: Failed to create OpenGL context.
error: Failed to create context!
error: device_create (GL) failed
error: Failed to initialize video: Unspecified error
info: Freeing OBS context data
info: == Profiler Results =============================
info: run_program_init: 1458.89 ms
info: ┣OBSApp::AppInit: 3.954 ms
info: ┃ ┗OBSApp::InitLocale: 1.561 ms
info: ┗OBSApp::OBSInit: 85.229 ms
info: ┣obs_startup: 2.215 ms
info: ┗OBSBasic::OBSInit: 28.661 ms
info: ┣OBSBasic::InitBasicConfig: 0.709 ms
info: ┣OBSBasic::ResetAudio: 0.166 ms
info: ┗OBSBasic::ResetVideo: 27.652 ms
info: obs_hotkey_thread(25 ms): min=0.131 ms, median=0.38 ms, max=9.193 ms, 99th percentile=9.193 ms, 100% below 25 ms
info: audio_thread(Audio): min=0 ms, median=0.009 ms, max=0.027 ms, 99th percentile=0.027 ms
info: =================================================
info: == Profiler Time Between Calls ==================
info: obs_hotkey_thread(25 ms): min=25.215 ms, median=25.484 ms, max=34.269 ms, 52.0833% within ±2% of 25 ms (0% lower, 47.9167% higher)
info: =================================================
info: Number of memory leaks: 128
答案1
解决方案!
第一的:
安装 FFMPEG
sudo apt-get update
sudo apt-get install ubuntu-restricted-extras
sudo apt-get install ffmpeg
第二:
创建一个名为“obs-fix.sh”的文件,包含以下内容
INRES="1366x768" # input resolution
OUTRES="1366x768" # output resolution
FPS="30" # target FPS
GOP="30" # i-frame interval, should be double of FPS,
GOPMIN="15" # min i-frame interval, should be equal to fps,
THREADS="4" # max 6
CBR="1000k" # constant bitrate (should be between 1000k - 3000k)
QUALITY="ultrafast" # one of the many FFMPEG preset
AUDIO_RATE="44100"
STREAM_KEY="***************************"
#SERVER="rtmp://live.twitch.tv/app/"
#SERVER="rtmp://live.justin.tv/app/"
SERVER="rtmp://usmedia3.livecoding.tv:1935/livecodingtv/"
ffmpeg -f x11grab -s "$INRES" -r "$FPS" -i :0.0 -f alsa -i pulse -f flv -ac 2 -ar $AUDIO_RATE \
-vcodec libx264 -g $GOP -keyint_min $GOPMIN -b:v $CBR -minrate $CBR -maxrate $CBR -pix_fmt yuv420p\
-s $OUTRES -preset $QUALITY -tune film -acodec libmp3lame -threads $THREADS -strict normal \
-bufsize $CBR "$SERVER$STREAM_KEY"
并执行此操作脚本和./obs-fix.sh
在 ubuntu 15.10 和 16.04 中运行良好