Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d80f63e

Browse filesBrowse files
committed
OSX performance improvements
1 parent 7ac8379 commit d80f63e
Copy full SHA for d80f63e

File tree

Expand file treeCollapse file tree

2 files changed

+13
-4
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+13
-4
lines changed

‎README.md

Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
build-ffmpeg-mac
1+
build-ffmpeg
22
==========
33

44
This build script provides an easy way to build ffmpeg on OSX and Linux with non-free codecs included.
@@ -169,4 +169,4 @@ Building done. The binary can be found here: /Volumes/Daten/dev/mac/ffmpeg-build
169169
170170
Install the binary to your /usr/local/bin folder? [Y/n] y
171171
Password:
172-
```
172+
```

‎build-ffmpeg

Copy file name to clipboardExpand all lines: build-ffmpeg
+11-2Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/bash
22

33
# https://github.com/markus-perl/ffmpeg-build-script
4-
# Version 0.4
54

5+
VERSION=0.5
66
CWD=$(pwd)
77
PACKAGES="$CWD/packages"
88
WORKSPACE="$CWD/workspace"
@@ -17,10 +17,11 @@ if [[ -n $NUMJOBS ]]; then
1717
MJOBS=$NUMJOBS
1818
elif [[ -f /proc/cpuinfo ]]; then
1919
MJOBS=$(grep -c processor /proc/cpuinfo)
20+
elif [[ "$OSTYPE" == "darwin"* ]]; then
21+
MJOBS=$(sysctl -n machdep.cpu.thread_count)
2022
else
2123
MJOBS=4
2224
fi
23-
echo "Using $MJOBS make jobs simultaneously."
2425

2526
make_dir () {
2627
if [ ! -d $1 ]; then
@@ -98,11 +99,16 @@ build_done () {
9899
touch "$PACKAGES/$1.done"
99100
}
100101

102+
echo "ffmpeg-build-script v$VERSION"
103+
echo "========================="
104+
echo ""
105+
101106
case "$1" in
102107
"--cleanup")
103108
remove_dir $PACKAGES
104109
remove_dir $WORKSPACE
105110
echo "Cleanup done"
111+
echo ""
106112
exit 0
107113
;;
108114
"--build")
@@ -113,10 +119,13 @@ case "$1" in
113119
echo " --build: start building process"
114120
echo " --cleanup: remove all working dirs"
115121
echo " --help: show this help"
122+
echo ""
116123
exit 0
117124
;;
118125
esac
119126

127+
echo "Using $MJOBS make jobs simultaneously."
128+
120129
make_dir $PACKAGES
121130
make_dir $WORKSPACE
122131
make_dir $CMPL

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.