Skip to content

Commit 3558ac9

Browse files
committed
add ability to have it not take all cpu on your system...
1 parent 32c9ae3 commit 3558ac9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cross_compile_ffmpeg.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2785,7 +2785,6 @@ if [ -z "$cpu_count" ]; then
27852785
cpu_count=1 # else default to just 1, instead of blank, which means infinite
27862786
fi
27872787
fi
2788-
original_cpu_count=$cpu_count # save it away for some that revert it temporarily
27892788

27902789
set_box_memory_size_bytes
27912790
if [[ $box_memory_size_bytes -lt 600000000 ]]; then
@@ -2851,7 +2850,8 @@ while true; do
28512850
--ffmpeg-source-dir=[default empty] specifiy the directory of ffmpeg source code. When specified, git will not be used.
28522851
--x265-git-checkout-version=[master] if you want to build a particular version of x265, ex: --x265-git-checkout-version=Release_3.2 or a specific git hash
28532852
--fdk-aac-git-checkout-version= if you want to build a particular version of fdk-aac, ex: --fdk-aac-git-checkout-version=v2.0.1 or another tag
2854-
--gcc-cpu-count=[number of cpu cores set it higher than 1 if you have multiple cores and > 1GB RAM, this speeds up initial cross compiler build. FFmpeg build uses number of cores no matter what]
2853+
--gcc-cpu-count=[cpu_cores_on_box if RAM > 1GB else 1] number of cpu cores this speeds up initial cross compiler build.
2854+
--build-cpu-count=[cpu_cores_on_box] set to lower than your cpu cores if the background processes eating all your cpu bugs your desktop usage
28552855
--disable-nonfree=y (set to n to include nonfree like libfdk-aac,decklink)
28562856
--build-intel-qsv=y (set to y to include the [non windows xp compat.] qsv library and ffmpeg module. NB this not not hevc_qsv...
28572857
--sandbox-ok=n [skip sandbox prompt if y]
@@ -2877,6 +2877,7 @@ while true; do
28772877
"; exit 0 ;;
28782878
--sandbox-ok=* ) sandbox_ok="${1#*=}"; shift ;;
28792879
--gcc-cpu-count=* ) gcc_cpu_count="${1#*=}"; shift ;;
2880+
--build-cpu-count=* ) cpu_count="${1#*=}"; shift ;;
28802881
--ffmpeg-git-checkout-version=* ) ffmpeg_git_checkout_version="${1#*=}"; shift ;;
28812882
--ffmpeg-git-checkout=* ) ffmpeg_git_checkout="${1#*=}"; shift ;;
28822883
--ffmpeg-source-dir=* ) ffmpeg_source_dir="${1#*=}"; shift ;;
@@ -2922,6 +2923,7 @@ while true; do
29222923
esac
29232924
done
29242925

2926+
original_cpu_count=$cpu_count # save it away for some that revert it temporarily
29252927
reset_cflags # also overrides any "native" CFLAGS, which we may need if there are some 'linux only' settings in there
29262928
reset_cppflags # Ensure CPPFLAGS are cleared and set to what is configured
29272929
check_missing_packages # do this first since it's annoying to go through prompts then be rejected

0 commit comments

Comments
 (0)