<commit_before>#!/bin/bash

FFMPEG_VERSION=4.3.3

FFMPEG_FLAGS=(
    --disable-programs
    --disable-doc
    --disable-static
    --disable-debug
    --disable-ffplay
    --disable-ffprobe
    --disable-avdevice
    --disable-swresample
    --disable-librtmp
    --enable-shared
)

function build_ffmpeg() {
    if [ ! -d "ffmpeg-$FFMPEG_VERSION" ]; then
        echo "-> Downloading source..."
        curl https://ffmpeg.org/releases/ffmpeg-$FFMPEG_VERSION.tar.gz | tar zxf -
    else
        echo "-> ffmpeg-$FFMPEG_VERSION already exists, not re-downloading."
    fi

    echo "-> Configuring..."

    cd ffmpeg-$FFMPEG_VERSION
    ./configure "${FFMPEG_FLAGS[@]}"

    CORES=0
    if [[ "$OSTYPE" == "darwin"* ]]; then
        CORES=$(sysctl -n hw.ncpu)
    else
        CORES=$(nproc)
    fi

    echo "-> Building using $CORES threads..."

    make -j$CORES<commit_msg>Disable more ffmpeg external libs<commit_after>#!/bin/bash

FFMPEG_VERSION=4.3.3

FFMPEG_FLAGS=(
    --disable-programs
    --disable-doc
    --disable-static
    --disable-debug
    --disable-ffplay
    --disable-ffprobe
    --disable-avdevice
    --disable-swresample
    --disable-librtmp
    --disable-alsa
    --disable-iconv
    --disable-libxcb
    --disable-libxcb-shm
    --disable-libxcb-xfixes
    --disable-libxcb-shape
    --disable-sdl2
    --disable-zlib
    --disable-bzlib
    --disable-lzma
    --disable-xlib
    --disable-schannel
    --enable-shared
)

function build_ffmpeg() {
    if [ ! -d "ffmpeg-$FFMPEG_VERSION" ]; then
        echo "-> Downloading source..."
        curl https://ffmpeg.org/releases/ffmpeg-$FFMPEG_VERSION.tar.gz | tar zxf -
    else
        echo "-> ffmpeg-$FFMPEG_VERSION already exists, not re-downloading."
    fi

    echo "-> Configuring..."

    cd ffmpeg-$FFMPEG_VERSION
    ./configure "${FFMPEG_FLAGS[@]}"

    CORES=0
    if [[ "$OSTYPE" == "darwin"* ]]; then
        CORES=$(sysctl -n hw.ncpu)
    else
        CORES=$(nproc)
    fi

    echo "-> Building using $CORES threads..."

    make -j$CORES
{'fraction_non_alphanumeric': 0.1529758976881456, 'fraction_numerical': 0.004426955238563699, 'mean_word_length': 2.1196319018404908, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4885644', 'n_tokens_mistral': 740, 'n_tokens_neox': 718, 'n_words': 131}