summaryrefslogtreecommitdiff
path: root/bin/decode+edit
blob: 16c3155c07e61c738f65302f04071eaba0006d94 (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. # + scale to square pixels as needed
  11. ffmpeg -hide_banner -threads auto -y \
  12. -i "$INPUT" \
  13. -i "$LOGO"
  14. -filter_complex \
  15. "[0:v]scale=iw*sar*$HEIGHT/ih:$HEIGHT,setsar=1[bg];
  16. [bg][1:v]overlay=main_w-overlay_w-20:main_h-overlay_h-20[v]" \
  17. -map '[v]' \
  18. -f yuv4mpegpipe "$OUTPUT"