관리 메뉴

피터의 개발이야기

[Docker] Ubuntu:22.04에 ffmpeg 설치 방법 본문

DevOps/Docker

[Docker] Ubuntu:22.04에 ffmpeg 설치 방법

기록하는 백앤드개발자 2025. 1. 8. 02:55
반응형

ㅁ 들어가며

ㅇ ubuntu:22.04에 ffmpeg을 설치하는 방법을 정리하였다.

 

ㅁ 컨테이너 생성

docker run -it --name=ubuntu22-basic --platform linux/amd64  ubuntu:22.04 bash

 ㅇ 테스트를 위한 ubuntu 컨테이너를 생성한다.

 ㅇ 맥북 M3이어서 platform 옵션을 추가하였다.

 

ㅁ 기본 APT 설치 방법

apt update 
apt -y install ffmpeg

 

ㅁ 설치 확인

root@efe93bd51271:/$ ffmpeg -version
ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil      56. 70.100 / 56. 70.100
libavcodec     58.134.100 / 58.134.100
libavformat    58. 76.100 / 58. 76.100
libavdevice    58. 13.100 / 58. 13.100
libavfilter     7.110.100 /  7.110.100
libswscale      5.  9.100 /  5.  9.100
libswresample   3.  9.100 /  3.  9.100
libpostproc    55.  9.100 / 55.  9.100

ㅇ 기본 설치 시 ffmpeg 버젼이 4.4.2가 최신이었다.

 

ㅇ ubuntu 22.04.1의 공식 ffmpeg 버젼은 4.4.2이다.


ㅁ ffmpeg:5.1.2 설치 방법(빌드배포)

docker run -it --name=ubuntu22-ffmpeg5 --platform linux/amd64  ubuntu:22.04 bash

ㅇ 테스트를 위한 컨테이너 생성

 

ㅁ 설치 과정

# 기본 업데이트
apt update && apt upgrade -y

# 필요한 의존성 설치
apt install -y autoconf automake build-essential cmake git-core libass-dev libfreetype6-dev libgnutls28-dev libsdl2-dev libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev pkg-config texinfo wget yasm zlib1g-dev

# FFmpeg 5.1.2 소스 코드 다운로드
wget --no-check-certificate https://ffmpeg.org/releases/ffmpeg-5.1.2.tar.bz2
tar xjvf ffmpeg-5.1.2.tar.bz2
cd ffmpeg-5.1.2

 

ㅁ 컴파일 및 설치

./configure --enable-gpl --enable-libass --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree

make -j$(nproc)

make install

 

 


ㅁ ubuntu:22에 ffmpeg:6 설치

docker run -it --name=ubuntu22-ffmpeg6 --platform linux/amd64  ubuntu:22.04 bash

 

ㅁ 기본업데이트

apt-get update && apt-get -y upgrade

 

ㅁ PPA 추가

apt-get -y install software-properties-common && add-apt-repository ppa:ubuntuhandbook1/ffmpeg6

 

ㅁ 패키지 목록 업데이트

apt-get update

 

ㅁ ffmpeg 설치

apt -y install ffmpeg

 

ㅁ 버젼확인

root@bd38e53ced58:/# ffmpeg -version
ffmpeg version 6.1-1build2~22.04 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
configuration: --prefix=/usr --extra-version='1build2~22.04' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --disable-librav1e --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librist --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --disable-sndio --enable-libjxl --enable-pocketsphinx --enable-librsvg --enable-libvpl --disable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libsvtav1 --enable-libx264 --enable-libplacebo --disable-librav1e --enable-shared
libavutil      58. 29.100 / 58. 29.100
libavcodec     60. 31.102 / 60. 31.102
libavformat    60. 16.100 / 60. 16.100
libavdevice    60.  3.100 / 60.  3.100
libavfilter     9. 12.100 /  9. 12.100
libswscale      7.  5.100 /  7.  5.100
libswresample   4. 12.100 /  4. 12.100
libpostproc    57.  3.100 / 57.  3.100 

 

ㅁ 함께 보면 좋은 사이트

Ubuntu 22.04에 FFmpeg를 설치하는 방법은 무엇입니까?

Ubuntu > ffmpeg package

Ubuntu 22.04에서 FFmpeg 6.1 설치를 위해 PPA가 업데이트되었습니다.

 

반응형
Comments