Upload pipeline

Submission
User submits link to file through web form. New submissions and replacement submissions will use the same form. Submission gets placed into a queue.

Users have a maximum number of queued submissions at a time, scaled to their contributor rank.

Web form design

 * Display requirements for encoding submissions
 * Linked to database entry for a song appearance
 * (Optional) fields for source info
 * release group
 * source type (e.g. LD, DVD, VHS, BDRip, etc.)
 * (Optional) fields for encoding settings
 * ffmpeg settings
 * codec
 * processing done in AVS/VS
 * (Required if applicable) field for replacement reason
 * Field for link to the submitted file on a hosting service
 * Consider storing copy of file in temporary directory
 * Checkbox that user has read and understood guidelines

Approval
Staff reviews submission through administrator interface.


 * If approved,
 * Change submission status in queue to approved
 * Encoded by scheduled encoding job
 * Notify submitting user, with optional staff message
 * Update user's contributor rank
 * If denied,
 * Notify submitting user, with optional staff message
 * Update user's contributor rank

Submissions can be automatically denied by the system if they do not meet minimum encoding requirements, which are TBD.

Details about submission
Probed from file using  and
 * Video
 * fps
 * bitrate
 * maximum duration between keyframes
 * resolution
 * DAR, SAR (aka PAR)
 * dimensions
 * Audio
 * sample rate
 * bitrate
 * audio levels
 * mean dB
 * peak dB

Visualization

 * Video player
 * spectrogram

Encoding
Server will encode approved submission. Encodes will run either continuously as a background process or on a scheduled basis.


 * All tracks besides first audio and first video stream will be discarded. All container metadata will be discarded.
 * Encoding presets TBD
 * If a stream from a submission satisfies the encoding presets, it will be remuxed directly into a new container instead of transcoded
 * This means that if a user wanted to replace the audio stream only, they can simply mux the existing video stream with the replacement audio
 * Upon completion, move encoded file to storage and add encoded submission to database

Database

 * Add submission to database from queue
 * Include submitted metadata from web form
 * Add information to scheduled patch notes
 * Mark current version in database as replaced and set an expiry date for it
 * Remove submission from queue