WOS

Content Platform – Video – Video processing progress indicator

J
João NevesinWOS
9 months ago

Goal
Show users a clear processing progress for uploaded videos (e.g., encoding, thumbnailing), including % complete and “time left” when possible.


UX (where it appears)

  • In the editor (Video Post / Article media block):

    • Progress bar + Processing: 42%

    • Status text: Uploading → Processing → Ready

  • In a global uploads panel (optional):

    • list of recent uploads + progress

  • On published content:

    • if still processing, show placeholder + “Video is processing”


Status model

Use a single state machine:

  • uploading (0–100 client-side)

  • queued (0%)

  • processing (1–99%)

  • ready (100%)

  • failed


Backend requirements

1) Job tracking table

video_jobs

  • id

  • user_id

  • video_id

  • status

  • progress (0–100 integer)

  • stage (upload, transcode, thumbnail, finalize)

  • error

  • updated_at

2) Progress updates from processor

Wherever you process video (Cloud Run/Functions/worker):

  • emit progress events periodically:

    • by stage boundaries (simple)

    • or real encode progress (best)

Minimum viable (stage-based):

  • queued 0

  • transcode 20–90

  • thumbnail 90–95

  • finalize 95–100

Best (true %):

  • parse ffmpeg progress and map to 0–100.

3) Client realtime updates

Choose one:

  • Firestore document per job (easy realtime)

  • SSE endpoint /api/video/jobs/:id/stream

  • WebSocket (if you already have)

  • Polling fallback every 2–5s


Display “% left”

  • Show 100 - progress as “X% remaining”

  • Optional ETA:

    • compute from progress velocity (last 3 updates)


Failures + retries

  • If failed, show:

    • error message

    • “Retry processing” button (requeue job)

  • If stuck (no updates for N minutes):

    • mark as stalled and offer retry


Dev steps

  1. Add video_jobs tracking + status/progress fields.

  2. Update processing pipeline to publish progress updates.

  3. Implement realtime subscription in Svelte UI with polling fallback.

  4. Add placeholder behavior for content not yet ready.

  5. QA: large files, slow networks, background tab, mobile.

Outcome: users stop guessing and can see exactly how much processing is left before their video is ready.

  1. In Review
  2. Planned
  3. In Progress
  4. Completed
Loading content, please wait...
Loading content, please wait...
Loading content, please wait...
Loading content, please wait...
Loading content, please wait...
Loading content, please wait...
Loading content, please wait...
Loading content, please wait...
Loading content, please wait...
Loading content, please wait...
Loading content, please wait...
Loading content, please wait...