summaryrefslogtreecommitdiff
path: root/bin/decode+edit
blob: 6061d6bd51f416f790876a2de1d050cb81cad55d (plain)
  1. #!/bin/sh
  2. set -e
  3. ITERATIONS=${1-1}
  4. HEIGHT=360
  5. MOVIE=../src/omni/show0/earth.mp4
  6. LOGO=../../content/icon_small.png
  7. TMPMOVIE=../tmp/omni/show0/earth.yuv
  8. mkdir -p $(dirname "$TMPMOVIE")
  9. # based on http://video.stackexchange.com/a/16933
  10. ffmpeg -threads auto -y \
  11. -f lavfi -i "movie=filename=$MOVIE:loop=$ITERATIONS, setpts=N/(FRAME_RATE*TB), scale=-1:$HEIGHT" \
  12. -i "$LOGO" -filter_complex 'overlay=main_w-overlay_w-20:main_h-overlay_h-20' \
  13. -an -f yuv4mpegpipe "$TMPMOVIE"