summaryrefslogtreecommitdiff
path: root/bin/decode+edit
blob: 088243896dbc60a4aede70ea9af11d4e97ae3580 (plain)
  1. #!/bin/sh
  2. # FIXME: Handle audio
  3. set -e
  4. INPUT=../src/omni/show0/earth.mp4
  5. LOGO=../../content/icon_small.png
  6. OUTPUT=../tmp/omni/show0/earth.yuv
  7. HEIGHT=360
  8. mkdir -p $(dirname "$OUTPUT")
  9. # + loop-in-filter trick based on http://video.stackexchange.com/a/16933
  10. ffmpeg -hide_banner -threads auto -y \
  11. -i "$INPUT" \
  12. -i "$LOGO"
  13. -filter_complex \
  14. "[0:v]scale=-1:$HEIGHT[bg];
  15. [bg][1:v]overlay=main_w-overlay_w-20:main_h-overlay_h-20[v]" \
  16. -map '[v]' \
  17. -f yuv4mpegpipe "$OUTPUT"