DEV Community

Cover image for Video Uploads, HLS and Image Optimization in Lioran S3
Swaraj Puppalwar
Swaraj Puppalwar

Posted on

Video Uploads, HLS and Image Optimization in Lioran S3

Video Uploads, HLS and Image Optimization in Lioran S3

Lioran S3 is primarily an object store, but V1 Pre-Alpha also includes an experimental media pipeline.

It can orchestrate FFmpeg for video ingestion, transcoding, HLS packaging, poster generation, playback URLs, downloads, share links, and image transformations.

The project is built by Lioran Developer Solutions under Lioran Group, led by Swaraj Puppalwar.

The media pipeline is experimental. Treat storage correctness and media processing maturity as separate concerns.

Host requirement

Install:

ffmpeg
ffprobe
Enter fullscreen mode Exit fullscreen mode

Both binaries need to be available in the host PATH.

Upload video

const result =
  await client.uploadVideo(
    "./input.mp4",
    {
      bucket: "media",
      key:
        "videos/presentation.mp4",
      concurrency: 4,

      onProgress(progress) {
        console.log(
          `${progress.percent}%`
        );
      },
    }
  );

console.log(result.video_id);
Enter fullscreen mode Exit fullscreen mode

The upload path uses multipart-style ingestion rather than assuming a video fits comfortably in memory.

Poll processing status

const status =
  await client.getVideoStatus(
    result.video_id
  );

console.log({
  status: status.status,
  progress:
    status.progress_percent,
});
Enter fullscreen mode Exit fullscreen mode

Typical state progression conceptually looks like:

Queued
  ↓
Processing
  ↓
Ready
Enter fullscreen mode Exit fullscreen mode

or:

Processing
  ↓
Failed
Enter fullscreen mode Exit fullscreen mode

Playback URLs

const video =
  await client.getVideo(
    result.video_id
  );

console.log({
  hls: video.stream_url,
  mp4: video.fallback_url,
  poster: video.poster_url,
});
Enter fullscreen mode Exit fullscreen mode

The HLS master playlist is intended for adaptive playback.

The fallback URL provides direct MP4 delivery.

Public share

const share =
  await client.createVideoShare(
    result.video_id,
    {
      title:
        "Lioran S3 Demo",
      access_mode:
        "public",
    }
  );

console.log(share.share_url);
Enter fullscreen mode Exit fullscreen mode

Download video

await client.downloadVideo(
  result.video_id,
  {
    destinationPath:
      "./downloaded.mp4",

    onProgress(progress) {
      console.log(
        `${progress.percent}%`
      );
    },
  }
);
Enter fullscreen mode Exit fullscreen mode

CLI upload

liorans3 video upload   media   raw/sample.mp4   ./sample.mp4   --concurrency 4
Enter fullscreen mode Exit fullscreen mode

Status:

liorans3 video status   <video-id>
Enter fullscreen mode Exit fullscreen mode

Metadata:

liorans3 video get   <video-id>
Enter fullscreen mode Exit fullscreen mode

Manifest:

liorans3 video manifest   <video-id>
Enter fullscreen mode Exit fullscreen mode

Download:

liorans3 video download   <video-id>   ./transcoded.mp4
Enter fullscreen mode Exit fullscreen mode

Jobs:

liorans3 video jobs
Enter fullscreen mode Exit fullscreen mode

Reprocess:

liorans3 video reprocess   <video-id>
Enter fullscreen mode Exit fullscreen mode

Share links

Create:

liorans3 video share create   <video-id>   --title "Product Demo"   --mode public
Enter fullscreen mode Exit fullscreen mode

List:

liorans3 video share ls   <video-id>
Enter fullscreen mode Exit fullscreen mode

Revoke:

liorans3 video share revoke   <video-id>   <share-id>
Enter fullscreen mode Exit fullscreen mode

Image optimization

The object API can also create transformed image variants.

const bucket =
  client.bucket("media");

const result =
  await bucket.optimize(
    "photos/source.png",
    {
      width: 800,
      height: 450,
      fit: "cover",
      format: "webp",
      quality: 85,
      targetKey:
        "photos/source-800.webp",
    }
  );

console.log(
  result.variant.target_key
);
Enter fullscreen mode Exit fullscreen mode

CLI:

liorans3 image optimize   media   photos/banner.png   --destination   photos/banner-thumb.webp   --width 800   --height 450   --format webp   --fit cover   --quality 85
Enter fullscreen mode Exit fullscreen mode

Why keep this inside storage?

A media workflow naturally touches:

  • source objects
  • temporary processing artifacts
  • generated renditions
  • manifests
  • posters
  • metadata
  • public delivery URLs

Keeping orchestration close to the object layer can reduce glue code for teams that want a compact self-hosted system.

The tradeoff is complexity.

Media processing consumes CPU, disk bandwidth, and temporary storage, so operators need to treat it as a real workload rather than a free side effect.

Do not confuse feature presence with production maturity

V1 Pre-Alpha exists to expose these paths for testing.

Applications should be prepared for API refinement before stable releases.

The next planned Lioran S3 version is November 17, 2026.

Docs: https://docs.liorans3.sbs

Top comments (0)