hl-capture is deprecated. bxt-rs provides new video recording tools which use Vulkan and support Windows.
hl-capture is a tool for recording Half-Life videos on Linux, written in Rust. It's similar to Half-Life Advanced Effects, but focuses on video capturing rather than advanced movie-making functionality.
hl-capture is designed to be fast and convenient. Video and sound are encoded with FFMpeg right away into any desirable format like mp4
, mkv
or webm
. This, together with utilizing multiple threads and GPU-accelerated processing, makes hl-capture way faster than HLAE or Source's startmovie.
- Fast video and sound capturing and encoding into almost any of the formats supported by FFMpeg.
- GPU-accelerated resampling.
- TAS compatibility out of the box, including engine restarts.
- 32-bit FFMpeg libraries. FFMpeg 3.4 is known to work; FFMpeg 4 will not work. You can download pre-built working libraries with the main codecs here.
- 32-bit OpenCL (look for something like ocl-icd).
Check the wiki for installation and usage instructions.
- High capturing speed.
- Compatibility with TASes, including those utilizing engine restarts and RNG manipulation.
- Get Rust 1.38.0 with the
i686-unknown-linux-gnu
target.- This can be done using rustup with:
rustup toolchain add 1.38.0 rustup run 1.38.0 rustup target add i686-unknown-linux-gnu
- Rust 1.38.0 is used due to building issues with the
ffmpeg
crate which, unfortunately, went unmaintained several years ago.
- This can be done using rustup with:
- Install 32-bit FFMpeg libraries. FFMpeg 3.4 is known to work; FFMpeg 4 will not work.
- Use the following commands for a minimal build of FFMpeg known to work for building hl-capture:
git clone --depth=1 --branch=release/3.4 https://github.com/FFMpeg/FFMpeg.git ffmpeg cd ffmpeg ./configure --disable-programs --disable-doc --enable-cross-compile --arch=x86_32 --target_os=linux --prefix="$PWD/install" --cc="gcc -m32" --disable-static --enable-shared make && make install
- Use the following commands for a minimal build of FFMpeg known to work for building hl-capture:
- Install 32-bit SDL2.
- Install 32-bit OpenCL.
PKG_CONFIG_ALLOW_CROSS=1 cargo +1.38.0 build --release
- If you built FFMpeg manually, use the following command:
PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_PATH=/path/to/ffmpeg/install/lib/pkgconfig LD_LIBRARY_PATH=/path/to/ffmpeg/install/lib cargo +1.38.0 build --release
- If you built FFMpeg manually, use the following command:
Look at how the Travis build is set up for minimal build of the dependencies.