기본 콘텐츠로 건너뛰기

4월, 2019의 게시물 표시

라즈베리파이 조금더 쾌적한 트랜스코딩방법..

- ffmpeg 다운로드 $ git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg $ cd ffmpeg $ mkdir dependencies $ cd dependencies/ $ mkdir output - ffmpeg 컴파일 $ git clone http://git.videolan.org/git/x264.git $ cd x264/ $ ./configure --enable-static --prefix=/home/pi/ffmpeg/dependencies/output/ $ make -j4 (컴파일 문제 혹은 코어4개 사용 안할땐 make -j) $ make install $ cd .. -  ALSA 다운로드 $ wget ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.1.1.tar.bz2 -  ALSA 컴파일 $ tar xjf alsa-lib-1.1.1.tar.bz2 $ cd alsa-lib-1.1.1/ $ ./configure --prefix=/home/pi/ffmpeg/dependencies/output $ make -j4 $ make install $ cd .. - FDK-AAC 다운로드 $ sudo apt-get install pkg-config autoconf automake libtool $ git clone https://github.com/mstorsjo/fdk-aac.git - FDK-AAC 컴파일 $ cd fdk-aac $ ./autogen.sh $ ./configure --enable-shared --enable-static $ make -j4 $ sudo make install $ sudo ldconfig $ cd .. - OMX_core.h 설치 sudo apt-get install libomxil-bellagio-dev - FFMPEG 컴파일 $ cd .. $ ./configure --pref

라즈베리파이로 h264 - ffmpeg 인코딩 (h264 to mp4)

h264 라이브러리 설치 ssh접속 h264 라이브러리 다운로드 :  git clone --depth 1 http://git.videolan.org/git/x264 디렉토리를 x264 폴더로 변경:  cd x264 설치 :  ./configure --host=arm-unknown-linux-gnueabi --enable-static --disable-opencl 설치2:  make -j4 h264 라이브러리 설치 :  sudo make install h264로 ffmpeg 설치 홈 디렉토리로 변경 :  cd ~ ffmpeg 다운로드 :  git clone git://source.ffmpeg.org/ffmpeg --depth=1 ffmpeg 디렉토리로 변경 :  cd ffmpeg 설치:  ./configure --arch=armel --target-os=linux --enable-gpl --enable-libx264 --enable-nonfree 설치2:  make -j4 시간 엄청 걸리고 CPU온오 엄청 올라 갑니다. 설치3:  sudo make install 참고 : 라즈베리파이 3B+ 이하로 작업하는 경우 4 개의 코어를 사용할 수 없을 수도 있음.  이 경우 make -j로 테스트.. 변환할때 top 혹은 htop등으로 코어 사용여부 확인해볼것. h264 변환 아래와 같은 명령어로 h264 변환이 가능 ffmpeg -i USER_VIDEO.h264 -vcodec copy USER_VIDEO.mp4 위와 같은 방법으로 트랜스 코딩도 가능함. 아래 포스팅 링크 참조 https://nbspcrop.blogspot.com/2018/04/3b-ffmpeg.html