Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

P3 - Make sure LPMS works without video #349

Open
MikeIndiaAlpha opened this issue Jul 15, 2022 · 4 comments
Open

P3 - Make sure LPMS works without video #349

MikeIndiaAlpha opened this issue Jul 15, 2022 · 4 comments
Assignees

Comments

@MikeIndiaAlpha
Copy link
Contributor

MikeIndiaAlpha commented Jul 15, 2022

support audio-only streams for transcoding Why? These will just be rejected right now. Since we already don’t support this, low priority, but would be nice to get to.

Right now LPMS will not work when there is no video data. For example, lpms/cmd/transcoding go will panic with TranscoderInvalidVideo error. This is because of the following code in ffmpeg.go:880

if videoMissing {
    // Audio-only segment, fail fast right here as we cannot handle them nicely
    return nil, ErrTranscoderVid
}

When statement above gets commented out, transcoding will crash with SIGSEGV, most likely reference to some kind of video-related pointer that isn't checking against NULL.

Since the idea is to separate video and audio processing at some point during the refactoring process, and since there are no fundamental reasons not to support video-less streams, it could make sense to change LPMS so that it would also work without video.

BTW, to obtain audio-only .ts container one can do something like this:
ffmpeg -i file_that_contains_video_and_audio.format" -map 0:a just_audio.ts

@MikeIndiaAlpha MikeIndiaAlpha self-assigned this Jul 15, 2022
@MikeIndiaAlpha MikeIndiaAlpha changed the title Make sure LPMS work without video Make sure LPMS works without video Jul 15, 2022
@MikeIndiaAlpha
Copy link
Contributor Author

MikeIndiaAlpha commented Jul 22, 2022

BTW, after recent fixes from ma_refactoring_second branch it may be easier to fix, as some issues with "audio-only" segments were ironed out. But it is still crashing.

@MikeIndiaAlpha
Copy link
Contributor Author

MikeIndiaAlpha commented Jul 23, 2022

So it was a matter of a few trivial changes in this PR #348
Basically all that had to be done is removal of the (not very nice anyway) assumption that the video stream is always there. Once the mentioned branch will get merged, this issue can be closed.

@MikeIndiaAlpha MikeIndiaAlpha linked a pull request Jul 23, 2022 that will close this issue
@Quintendos Quintendos changed the title Make sure LPMS works without video P3 - Make sure LPMS works without video Dec 7, 2022
@chrishobcroft
Copy link

Hi @MikeIndiaAlpha thank you for this contribution. Do you know where this got stuck? I am keen to enable "video-less" streams.

@cyberj0g
Copy link
Contributor

cyberj0g commented Jun 6, 2023

@chrishobcroft once this is merged, streams without video should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants