DCAS handbook

CDN

  • Path: server/{channel}/{attach}
  • Preview path: server/{channel}/{attach}.preview.png

Videos:

  1. During upload:
    • write video to a path;
    • use ffprobe to get video width and height;
    • use ffmpeg to extract preview frame and write it to preview path;
    • add record to DB (with non-zero width and height);
  2. If client requests video w/o query args:
    • serve file as-is;
  3. If client requests video w/ query args:
    • read file from preview path;
    • apply required changes;
    • serve that file;