diff --git a/ui/public/fake_api/part1_240.mp4 b/ui/public/fake_api/part1_240.mp4 index 633f476..49ece72 100644 Binary files a/ui/public/fake_api/part1_240.mp4 and b/ui/public/fake_api/part1_240.mp4 differ diff --git a/ui/public/fake_api/part2_240.mp4 b/ui/public/fake_api/part2_240.mp4 index 3825919..3469eff 100644 Binary files a/ui/public/fake_api/part2_240.mp4 and b/ui/public/fake_api/part2_240.mp4 differ diff --git a/ui/public/fake_api/part2_360.mp4 b/ui/public/fake_api/part2_360.mp4 index c2f93be..37ca7b9 100644 Binary files a/ui/public/fake_api/part2_360.mp4 and b/ui/public/fake_api/part2_360.mp4 differ diff --git a/ui/public/fake_api/part2_480.mp4 b/ui/public/fake_api/part2_480.mp4 index 55a42d2..00b72fd 100644 Binary files a/ui/public/fake_api/part2_480.mp4 and b/ui/public/fake_api/part2_480.mp4 differ diff --git a/ui/public/fake_api/resize b/ui/public/fake_api/resize new file mode 100755 index 0000000..0b0e13f --- /dev/null +++ b/ui/public/fake_api/resize @@ -0,0 +1,32 @@ +#!/bin/bash + +# complain if no input file given +if [ $# -lt 1 ]; then + >&2 echo "usage: $0 " + exit 1 +fi + +# get input video name +input="${1}" +shift 1 + +# without file extension +output_base="${input%.*}" + +# common video resolutions +heights=(240 360 480) +widths=(426 640 854) + +# just a quick-and-dirty loop +for index in $(seq 0 2); do + height="${heights[$index]}" + width="${widths[$index]}" + + # actual conversion + ffmpeg -i "${input}" \ + -acodec aac -vcodec h264 \ + -vf "scale=w=${width}:h=${height}:force_original_aspect_ratio=decrease,pad=${width}:${height}:(ow-iw)/2:(oh-ih)/2" \ + "${output_base}_${height}.mp4" +done + +exit 0