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

VOD profile for original source file? #54

Open
metal450 opened this issue Jun 15, 2024 · 4 comments
Open

VOD profile for original source file? #54

metal450 opened this issue Jun 15, 2024 · 4 comments

Comments

@metal450
Copy link

In config.yaml, we can define video-profiles like i.e.

video-profiles:
    360p:
      width: 640
      height: 360
      bitrate: 800
    540p:
      width: 960
      height: 540
      bitrate: 1800

Is there a way to have an "original file" profile? i.e. to optionally just serve up the source .mp4, without any transcoding?

If not, would love it as a feature request :)

@m1k1o
Copy link
Owner

m1k1o commented Jun 15, 2024

without any transcoding

That would be only possible if the original file is already transcoded in the correct format (correct video/audio codec, acceptable GOP length, etc.). So we would need to verify first if the source is compatible and then allow direct passthrough with only segmenting. Otherwise we would need to either fallback to transcoding anyway or throw an error.

@metal450
Copy link
Author

That would be only possible if the original file is already transcoded in the correct format

You mean if the original file is in some format that supports streaming (i.e. h264, not h265)?

Basically, I have a video library on a Synology NAS. Through their UI, I'm actually able to browse the files, and play them directly (not with transcoding). So when I'm "close to the NAS" (i.e. on the same LAN or with fast internet), I can watch directly; when I'm on slow Internet, I can watch transcoded via go-transcode. It'd be great if go-transcode could provide the original file as an option, that way I could use it as the sole access point for the videos - use the "direct stream" when internet is fast enough, switch to transcoding otherwise. Does that make sense?

@m1k1o
Copy link
Owner

m1k1o commented Jun 16, 2024

It would only be needed if you want to play it on the web. If only using VLC, you can basically just serve the file using a webserver. Depends on the codec, VLC should be able to just request the byte ranges of the file that are actually needed.

An idea, to basically just serve the files as they are, you can try out: master...vod-serve-files

So if you would play http://127.0.0.1:8080/vod/MyFile.mp4 in VLC, it should work. And if you need transcoding, you can still request using the old format.

@metal450
Copy link
Author

An idea, to basically just serve the files as they are, you can try out: master...vod-serve-files

Yup, that works great :)

The only thing I'd possibly add is, it would be awesome to actually have it as an option in the index - that way it could also be selected from the quality selector (i.e. in the web player or some desktop players). Granted that, as you said, if the file is the wrong format it might not be able play, but that's fine. i.e. maybe some special-case profile, like:

video-profiles:
    360p:
      width: 640
      height: 360
      bitrate: 800
    540p:
      width: 960
      height: 540
      bitrate: 1800
    original:
      original: true // or however to best denote it

Just an idea. What you did so far is already great tho :)

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

No branches or pull requests

2 participants