-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
67 lines (51 loc) · 3.09 KB
/
Makefile
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# https://ryanparman.com/posts/2019/using-gnu-command-line-tools-in-macos-instead-of-freebsd-tools/
AWK="$(shell brew --prefix gawk)/libexec/gnubin/awk"
GREP="$(shell brew --prefix grep)/libexec/gnubin/grep"
NPROC="$(shell brew --prefix coreutils)/libexec/gnubin/nproc"
SED="$(shell brew --prefix gnu-sed)/libexec/gnubin/sed"
SORT="$(shell brew --prefix coreutils)/libexec/gnubin/sort"
TEE="$(shell brew --prefix coreutils)/libexec/gnubin/tee"
UNIQ="$(shell brew --prefix coreutils)/libexec/gnubin/uniq"
XARGS="$(shell brew --prefix findutils)/libexec/gnubin/xargs"
#-------------------------------------------------------------------------------
all:
@cat Makefile | $(GREP) "^[a-z]" | $(SED) 's/://' | $(AWK) '{print $$1}'
.PHONY: clean
clean:
rm -Rf ./docs/*
#-------------------------------------------------------------------------------
.PHONY: config
config:
ffmpeg -hide_banner -buildconf | $(GREP) --color=never "^ --" | $(AWK) '{print $$1}' | $(UNIQ) | $(TEE) docs/buildconf.txt
.PHONY: muxers
muxers:
ffmpeg -hide_banner -muxers | $(GREP) --color=never "^ E " | $(AWK) '{print $$2}' | $(XARGS) -I% bash -c 'echo "\`%\`"' _ % | $(UNIQ) | $(TEE) docs/muxers.txt
.PHONY: demuxers
demuxers:
ffmpeg -hide_banner -demuxers | $(GREP) --color=never "^ D " | $(AWK) '{print $$2}' | $(XARGS) -I% bash -c 'echo "\`%\`"' _ % | $(UNIQ) | $(TEE) docs/demuxers.txt
.PHONY: codecs-decode
codecs-decode:
ffmpeg -hide_banner -codecs | $(GREP) --color=never "^ D" | $(GREP) --color=never -v "=" | $(AWK) '{print $$2}' | $(XARGS) -I% bash -c 'echo "\`%\`"' _ % | $(UNIQ) | $(SORT) | $(TEE) docs/codecs-decode.txt
.PHONY: codecs-encode
codecs-encode:
ffmpeg -hide_banner -codecs | $(GREP) --color=never "^ .E" | $(GREP) --color=never -v "=" | $(AWK) '{print $$2}' | $(XARGS) -I% bash -c 'echo "\`%\`"' _ % | $(UNIQ) | $(SORT) | $(TEE) docs/codecs-encode.txt
.PHONY: decoders
decoders:
ffmpeg -hide_banner -decoders | $(GREP) --color=never -E "^ (V|A|S)" | $(GREP) --color=never -v "=" | $(AWK) '{print $$2}' | $(XARGS) -I% bash -c 'echo "\`%\`"' _ % | $(UNIQ) | $(SORT) | $(TEE) docs/decoders.txt
.PHONY: encoders
encoders:
ffmpeg -hide_banner -encoders | $(GREP) --color=never -E "^ (V|A|S)" | $(GREP) --color=never -v "=" | $(AWK) '{print $$2}' | $(XARGS) -I% bash -c 'echo "\`%\`"' _ % | $(UNIQ) | $(SORT) | $(TEE) docs/encoders.txt
.PHONY: bsfs
bsfs:
ffmpeg -hide_banner -bsfs | $(GREP) --color=never -v "Bitstream filters:" | $(AWK) '{print $$1}' | $(XARGS) -I% bash -c 'echo "\`%\`"' _ % | $(UNIQ) | $(SORT) | $(TEE) docs/bsfs.txt
.PHONY: pix
pix:
ffmpeg -hide_banner -pix_fmts | $(GREP) --color=never -E "^(I|\.)" | $(GREP) --color=never -v "=" | $(AWK) '{print $$2}' | $(XARGS) -I% bash -c 'echo "\`%\`"' _ % | $(UNIQ) | $(SORT) | $(TEE) docs/pix_fmts.txt
.PHONY: hwaccels
hwaccels:
ffmpeg -hide_banner -hwaccels| $(GREP) --color=never -v "Hardware acceleration methods:" | $(AWK) '{print $$1}' | $(XARGS) -I% bash -c 'echo "\`%\`"' _ % | $(UNIQ) | $(SORT) | $(TEE) docs/hwaccels.txt
.PHONY: readme
readme:
./README.sh
.PHONY: docs
docs: bsfs codecs-decode codecs-encode config decoders demuxers encoders hwaccels muxers pix readme