<commit_before>#!/bin/sh

# Copyright (C) 2016 ncph Authors
# This file is free software: You can redistribute it and/or modify it under the
# terms of the GNU AGPLv3 or later. See COPYING for details.

# Convert any video to a large file with near-lossless compression. These are
# kept separately to allow changing the final streaming quality without touching
# the original videos too much.
cageconvert() {
    if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ] ; then
	echo "Usage: cageconvert INFILE OUTFILE HH:MM:SS [DURATION]" >&2
	return
    fi

    ffmpeg -i "$1" -ss "$3" -t "${4:-60}" -c:v h264 -tune film -q:v 8 -c:a mp3 -b:a 320k -ac 2 "$2"
}

# Convert the intermediate near-lossless file to final form.
cagedownconvert() {
    if [ -z "$1" ] || [ -z "$2" ] ; then
	echo "Usage: cagedownconvert INFILE OUTFILE" >&2
	return
    fi

    ffmpeg -i "$1" -c:v h264 -tune film -preset slow -b:v 2000k -c:a mp3 -b:a 128k -ar 44100 "$2"
}
<commit_msg>convert: Add pix_fmt to cagedownconvert.<commit_after>#!/bin/sh

# Copyright (C) 2016 ncph Authors
# This file is free software: You can redistribute it and/or modify it under the
# terms of the GNU AGPLv3 or later. See COPYING for details.

# Convert any video to a large file with near-lossless compression. These are
# kept separately to allow changing the final streaming quality without touching
# the original videos too much.
cageconvert() {
    if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ] ; then
	echo "Usage: cageconvert INFILE OUTFILE HH:MM:SS [DURATION]" >&2
	return
    fi

    ffmpeg -i "$1" -ss "$3" -t "${4:-60}" -c:v h264 -tune film -q:v 8 -c:a mp3 -b:a 320k -ac 2 "$2"
}

# Convert the intermediate near-lossless file to final form.
cagedownconvert() {
    if [ -z "$1" ] || [ -z "$2" ] ; then
	echo "Usage: cagedownconvert INFILE OUTFILE" >&2
	return
    fi

    ffmpeg -i "$1" -c:v h264 -tune film -preset slow -pix_fmt yuv420p -b:v 2000k -c:a mp3 -b:a 128k -ar 44100 "$2"
}

{'fraction_non_alphanumeric': 0.13720452209660844, 'fraction_numerical': 0.047790339157245634, 'mean_word_length': 3.1337579617834397, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1936699', 'n_tokens_mistral': 768, 'n_tokens_neox': 704, 'n_words': 284}