summaryrefslogtreecommitdiff
path: root/misc/ffmpeg_config.sh
blob: 9266a76a310562e55281bbb5a4b421919b21c2cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash

# The config flags for the minimal ffmpeg build used in the program, reducing
# compile time and filesize by a decent amount.

# Surprisingly we don't need to compile and link any other external libaries to
# be able to decode most of the commonly-used file formats. We'll only start
# needing them if we want the user to be able to export mp4s or webms directly
# from the program.

# All bitstream filters and are enabled.
# All filters, devices, and HW acceleration are disabled.
# All protocols aside from 'file' are disabled.
# Encoders and muxers are TBD.

VIDEO_DECODERS="av1,h263,h264,hevc,vp8,vp9"
AUDIO_DECODERS="aac,ac3,flac,mp3,opus,pcm_s16le,pcm_dvd,pcm_bluray,wmalossless,wmav1"
VIDEO_DEMUXERS="h261,h263,h264,hevc,matroska,mov,mpc,mpegps,mpegts,webm_dash_manifest"
AUDIO_DEMUXERS="aac,avi,flac,mp3,ogg,pcm_s16le,wav"
VIDEO_PARSERS="h261,h263,h264,hevc,mpeg4video,mpegvideo,vc1,vp8,vp9,webp"
AUDIO_PARSERS="aac,flac,mpegaudio,opus,vorbis"

./configure \
    --disable-encoders \
    --disable-decoders \
    --disable-hwaccels \
    --disable-muxers \
    --disable-demuxers \
    --disable-parsers \
    --disable-protocols \
    --disable-devices \
    --disable-filters \
    \
    --enable-decoder=$VIDEO_DECODERS,$AUDIO_DECODERS \
    --enable-parser=$VIDEO_PARSERS,$AUDIO_PARSERS \
    --enable-demuxer=$VIDEO_DEMUXERS,$AUDIO_DEMUXERS \
    --enable-protocol=file \
    \
    --enable-avcodec \
    --enable-avformat \
    --enable-avutil \
    --enable-swscale \
    --disable-avdevice \
    --disable-network \
    \
    --enable-gpl \
    --enable-static \
    --disable-shared \
    --disable-doc \