#!/bin/sh
# autopkgtest check: Use ffmpeg to produce a 10s test image,
# and use vpxenc to encode to VP9

set -e

cd "$ADTTMP"

ffmpeg -y -filter_complex testsrc -t 10 -pix_fmt yuv420p in.y4m
vpxenc --codec=vp9 -o out.raw in.y4m
ffprobe -of ini -show_streams out.raw | tee avprobe.txt
grep "^codec_name=vp9" avprobe.txt
grep "^codec_long_name=Google VP9" avprobe.txt
