deepin 中使用obs
Tofloor
poster avatar
那个大爷
deepin
2018-11-27 07:46
Author
在应用商店中安装的obs不行,可以打开但一点录制就出错,本机测试编译安装成功可以正常录制,不要用源和应用商店的,得手动编译安装,整理步骤如下:

1。参照官网(https://github.com/obsproject/obs-studio/wiki/Install-Instructions#debian-based-build-directions):

  1. sudo apt-get install build-essential pkg-config cmake git-core checkinstall
Copy the Code
  1. sudo apt-get install libx11-dev libgl1-mesa-dev libvlc-dev libpulse-dev libxcomposite-dev \
  2.           libxinerama-dev libv4l-dev libudev-dev libfreetype6-dev \
  3.           libfontconfig-dev qtbase5-dev libqt5x11extras5-dev libx264-dev \
  4.           libxcb-xinerama0-dev libxcb-shm0-dev libjack-jackd2-dev libcurl4-openssl-dev \
  5.           luajit-5.1-dev swig python3.6-dev
Copy the Code
2。安装FFmpeg !!!这个也得编译安装,不能直接用源安装,参照官网(https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu


Get the Dependencies
  1. sudo apt-get update -qq && sudo apt-get -y install \
  2.   autoconf \
  3.   automake \
  4.   build-essential \
  5.   cmake \
  6.   git-core \
  7.   libass-dev \
  8.   libfreetype6-dev \
  9.   libsdl2-dev \
  10.   libtool \
  11.   libva-dev \
  12.   libvdpau-dev \
  13.   libvorbis-dev \
  14.   libxcb1-dev \
  15.   libxcb-shm0-dev \
  16.   libxcb-xfixes0-dev \
  17.   pkg-config \
  18.   texinfo \
  19.   wget \
  20.   zlib1g-dev
Copy the Code
NASM
  1. cd ~/ffmpeg_sources && \
  2. wget https://www.nasm.us/pub/nasm/releasebuilds/2.13.03/nasm-2.13.03.tar.bz2 && \
  3. tar xjvf nasm-2.13.03.tar.bz2 && \
  4. cd nasm-2.13.03 && \
  5. ./autogen.sh && \
  6. PATH="$HOME/bin:$PATH" ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" && \
  7. make && \
  8. make install
Copy the Code
Yasm
  1. cd ~/ffmpeg_sources && \
  2. wget -O yasm-1.3.0.tar.gz https://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz && \
  3. tar xzvf yasm-1.3.0.tar.gz && \
  4. cd yasm-1.3.0 && \
  5. ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" && \
  6. make && \
  7. make install
Copy the Code
libx264
  1. cd ~/ffmpeg_sources && \
  2. git -C x264 pull 2> /dev/null || git clone --depth 1 https://git.videolan.org/git/x264 && \
  3. cd x264 && \
  4. PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --enable-static --enable-pic && \
  5. PATH="$HOME/bin:$PATH" make && \
  6. make install
Copy the Code
libx265
  1. sudo apt-get install mercurial libnuma-dev && \
  2. cd ~/ffmpeg_sources && \
  3. if cd x265 2> /dev/null; then hg pull && hg update; else hg clone https://bitbucket.org/multicoreware/x265; fi && \
  4. cd x265/build/linux && \
  5. PATH="$HOME/bin:$PATH" cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build" -DENABLE_SHARED=off ../../source && \
  6. PATH="$HOME/bin:$PATH" make && \
  7. make install
Copy the Code
libvpx
  1. cd ~/ffmpeg_sources && \
  2. git -C libvpx pull 2> /dev/null || git clone --depth 1 https://chromium.googlesource.com/webm/libvpx.git && \
  3. cd libvpx && \
  4. PATH="$HOME/bin:$PATH" ./configure --prefix="$HOME/ffmpeg_build" --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=yasm && \
  5. PATH="$HOME/bin:$PATH" make && \
  6. make install
Copy the Code
libfdk-aac
  1. cd ~/ffmpeg_sources && \
  2. git -C fdk-aac pull 2> /dev/null || git clone --depth 1 https://github.com/mstorsjo/fdk-aac && \
  3. cd fdk-aac && \
  4. autoreconf -fiv && \
  5. ./configure --prefix="$HOME/ffmpeg_build" --disable-shared && \
  6. make && \
  7. make install
Copy the Code
libmp3lame
  1. cd ~/ffmpeg_sources && \
  2. wget -O lame-3.100.tar.gz https://downloads.sourceforge.net/project/lame/lame/3.100/lame-3.100.tar.gz && \
  3. tar xzvf lame-3.100.tar.gz && \
  4. cd lame-3.100 && \
  5. PATH="$HOME/bin:$PATH" ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --disable-shared --enable-nasm && \
  6. PATH="$HOME/bin:$PATH" make && \
  7. make install
Copy the Code
libopus
  1. cd ~/ffmpeg_sources && \
  2. git -C opus pull 2> /dev/null || git clone --depth 1 https://github.com/xiph/opus.git && \
  3. cd opus && \
  4. ./autogen.sh && \
  5. ./configure --prefix="$HOME/ffmpeg_build" --disable-shared && \
  6. make && \
  7. make install
Copy the Code
libaom
  1. cd ~/ffmpeg_sources && \
  2. git -C aom pull 2> /dev/null || git clone --depth 1 https://aomedia.googlesource.com/aom && \
  3. mkdir aom_build && \
  4. cd aom_build && \
  5. PATH="$HOME/bin:$PATH" cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build" -DENABLE_SHARED=off -DENABLE_NASM=on ../aom && \
  6. PATH="$HOME/bin:$PATH" make && \
  7. make install
Copy the Code
最后:FFmpeg
  1. cd ~/ffmpeg_sources && \
  2. wget -O ffmpeg-snapshot.tar.bz2 https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2 && \
  3. tar xjvf ffmpeg-snapshot.tar.bz2 && \
  4. cd ffmpeg && \
  5. PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \
  6.   --prefix="$HOME/ffmpeg_build" \
  7.   --pkg-config-flags="--static" \
  8.   --extra-cflags="-I$HOME/ffmpeg_build/include" \
  9.   --extra-ldflags="-L$HOME/ffmpeg_build/lib" \
  10.   --extra-libs="-lpthread -lm" \
  11.   --bindir="$HOME/bin" \
  12.   --enable-gpl \
  13.   --enable-libaom \
  14.   --enable-libass \
  15.   --enable-libfdk-aac \
  16.   --enable-libfreetype \
  17.   --enable-libmp3lame \
  18.   --enable-libopus \
  19.   --enable-libvorbis \
  20.   --enable-libvpx \
  21.   --enable-libx264 \
  22.   --enable-libx265 \
  23.   --enable-nonfree && \
  24. PATH="$HOME/bin:$PATH" make && \
  25. make install && \
  26. hash -r
Copy the Code
  1. source ~/.profile
Copy the Code
如果要启用man帮助则:
  1. echo "MANPATH_MAP $HOME/bin $HOME/ffmpeg_build/share/man" >> ~/.manpath
Copy the Code
Updating FFmpeg(删除它重新上面的步骤)
  1. rm -rf ~/ffmpeg_build ~/bin/{ffmpeg,ffprobe,ffplay,x264,x265}
Copy the Code
还原本指南所做的更改
  1. rm -rf ~/ffmpeg_build ~/ffmpeg_sources ~/bin/{ffmpeg,ffprobe,ffplay,x264,x265,nasm,vsyasm,yasm,ytasm}
  2. sed -i '/ffmpeg_build/d' ~/.manpath
  3. hash -r
Copy the Code


3。安装obs
  1. git clone --recursive https://github.com/obsproject/obs-studio.git
  2.   cd obs-studio
  3.   mkdir build && cd build
  4.   cmake -DUNIX_STRUCTURE=1 -DCMAKE_INSTALL_PREFIX=/usr ..
  5.   make -j4
  6.   sudo checkinstall --pkgname=obs-studio --fstrans=no --backup=no \
  7.          --pkgversion="$(date +%Y%m%d)-git" --deldoc=yes
Copy the Code




Reply Favorite View the author
All Replies
avatar
pikachuhy
deepin
2018-11-27 11:12
#1
用flatpak安装obs 好用还简单 可以试试
Reply View the author