#!/bin/sh
# Recompress all autogenerated (under img/a/v) .mp4 files.
# 
# Usage:
#     $0
#

# Working directory for input and output files.
AUTOGENFILEDIR=img/a/v

for f in ${AUTOGENFILEDIR}/*.mp4;
    do
        if [ ! -f ${f}L ]; then
            echo "WARNING: no ${f}L currently" 1>&2;
            continue
        fi
        echo "Recompressing $f..."
        ls -al ${f}L
        script/compress_video_mp4 -force $f
        ls -al ${f}L
        echo
    done

exit 0
