livepeer / livepeer/catalyst-api

Media tracks with start_time not handled correctly

Open
#403 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
4
Forks
1
PR merge metrics
No merged PRs in 30d

Description

All the VOD pipelines that we have built today (including the old non-catalyst one) fail consistently when the video has tracks with offset start_times.

These params can happen naturally when clipping the video, as ffmpeg for example will prefer to keep the whole segment intact and just shift playback through start_time than to actually re-transcode the segment. Even though, it is not _that_ common for videos to have a start_time. There's an alert everytime someone uploads a video with a considerable one (>250ms i think) and it doesn't happen that often.

These videos play fine on any player I tried, but get (consistent) glitches anytime they're uploaded to our platform. The current behaviors are:
- on old pipeline (worst): video and audio get off-sync unless they have the exact same start_time. Doesn't matter tho, only FTR
- on catalyst mist pipeline: an error like this:
`error="input video duration (63800ms) does not match segmented video duration (66944ms)"`
- on catalyst mediaconvert pipeline: mediaconvert adds a blank video in the beginning until video and audio can be in sync. E.g.: https://lvpr.tv/?v=63d0be6pfau46m1s&muted=false

A test file is: https://lp-playback.com/hls/63d0be6pfau46m1s/video

I don't think this is a super urgent bug, but we should keep this in mind when we change to mediaconvert fallback logic. We should process the start_time property of the videos and skip directly to MediaConvert pipeline if the video does have one.

The fix in MediaConvert is likely trivial tho, probably just some additional config. For mist pipeline not sure, as I believe that error comes from the only way we have to check whether segmenting worked or not (as per Thom).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the VOD pipeline failure with the provided test file and compare the old, Catalyst Mist, and Catalyst MediaConvert pipeline behavior for tracks with nonzero start_time. Done means uploads with offset tracks no longer desynchronize or gain a blank-video prefix, and the appropriate MediaConvert fallback behavior is selected.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, go
Domain
audio-video-rtc, backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.