Skip to content

Instantly share code, notes, and snippets.

@DevStefIt
Last active October 12, 2024 22:48
Show Gist options
  • Save DevStefIt/cb5e7b00bcfac1f5d3c09a450b9c5bef to your computer and use it in GitHub Desktop.
Save DevStefIt/cb5e7b00bcfac1f5d3c09a450b9c5bef to your computer and use it in GitHub Desktop.
libx264 compiling on Windows
# Make sure you opened the x64 Native Tools Command Prompt for VS 2022 and then opened MSYS2 shell command
git clone https://code.videolan.org/videolan/x264.git
cd x264
cd ../../build
mkdir x264
cd x264
CC=cl ../../sources/x264/configure --prefix=../../installed/x264 --enable-static --disable-cli --enable-debug --extra-cflags="-MTd -Od -Zi -RTC1 -W4" --extra-ldflags="-DEBUG"
make
make install
# Test script
cd ../../installed/x264/bin
./x264 --crf 18 --preset slow --output output_file.mkv input_file
# Make sure you opened the x64 Native Tools Command Prompt for VS 2022 and then opened MSYS2 shell command
git clone https://code.videolan.org/videolan/x264.git
cd x264
cd ../../build
mkdir x264
cd x264
CC=cl ../../sources/x264/configure --prefix=../../installed/x264 --enable-static --disable-cli --extra-cflags="-MT"
make
make install
# Test script
cd ../../installed/x264/bin
./x264 --crf 18 --preset slow --output output_file.mkv input_file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment