← Back to all articles
Blog

2020-1-10 practical update: preview generation, custom segment extensions and user uploads with live review

To challenge my coding skills, I chose several highly useful but difficult features for this update.

Updates

  • One: Registered users can upload videos from the frontend. Administrators preview them live before transcoding to decide whether to approve, avoiding wasted resources.
  • Two: Video management combines status, count and category filters.
  • Three: Added a second poster-upload endpoint. Each video supports two posters, with the second retaining its original dimensions.
  • Four: Added automatic preview-video generation. Configure a duration in administration; the system extracts several sections, transcodes and combines them, and removes audio. A tested 350*180 preview of 5 seconds is only 170KB, smaller than a GIF. With hover-to-preview frontend plugins, this can improve clicks, retention and user experience.
  • Five: Segment files support arbitrary extensions, defaulting to TS. Use jpg, png, gif or any other extension.

Key features

Preview generation is common on large high-traffic video websites. Hovering over a poster plays a preview. Set 5 seconds to produce 5 one-second clips covering highlights from beginning to end. At 350*180, it is only 170KB, much smaller than GIF while showing more useful content, improving experience, clicks and retention.

The second feature is user uploads with live administration preview. Administrators inspect uploaded content before transcoding to decide approval and save resources.