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

Local LL-HLS Files #7

Open
PanicKk opened this issue May 4, 2023 · 9 comments
Open

Local LL-HLS Files #7

PanicKk opened this issue May 4, 2023 · 9 comments

Comments

@PanicKk
Copy link

PanicKk commented May 4, 2023

Is there a way to generate the files locally instead of pushing them to localhost:8080 ?

I thought of this, because when I run the script inside a docker container, I get an error such as "Broken pipe" and I couldn't find a solution for that.

So, is there a fix for that or can I generate the files locally? (meaning inside the container)

@monyone
Copy link
Owner

monyone commented May 4, 2023

@PanicKk Generate files locally is able to implement.
But, PRELOAD-HINT with chunked transfer (per frame) require on-memory serving.
I consider local file generating seems not solve your problem.

I try run in container, it seems good and does not occured "Broken pipe".
Please tell your settings for convinience.

FROM alpine:latest
RUN apk --update add ffmpeg python3 py3-pip && rm -rf /var/cache/apk/*
COPY requirements.txt requirements.txt
RUN pip3 install -r requirements.txt
COPY biim biim
COPY fmp4.py fmp4.py
EXPOSE 8080
CMD ["sh", "-c", "ffmpeg -re -f lavfi -i testsrc=700x180:r=30000/1001 -f lavfi -i sine=frequency=1000:r=48000 -c:v libx264 -tune zerolatency -preset ultrafast -r 30 -g 15 -pix_fmt yuv420p -c:a aac -ac 2 -ar 48000 -f mpegts -  | ./fmp4.py"]

@PanicKk
Copy link
Author

PanicKk commented May 4, 2023

Thank you! @monyone

I was trying with an ubuntu image and tried cloning the repo and then starting the push, I also missed the port exposing part.

I tried the provided Dockerfile and it works fine, thank you. But, I generating the files locally is a better approach for my intention, since I need to upload the files to a CDN.

Could you please instruct me on how to generate the files locally?

@PanicKk
Copy link
Author

PanicKk commented May 4, 2023

I have another concern!

Is the role of the playlist.m3u8 that of a master file? Also, if the ffmpeg command includes multiple output resolutions, will those be included in the playlist?

@monyone
Copy link
Owner

monyone commented May 4, 2023

biim can serve LL-HLS origin (HTTP 1.1).
I think m3u8 and media segment don't have to upload storage.
CDN refer biim's origin and cache them.

@monyone
Copy link
Owner

monyone commented May 4, 2023

Currently not support multiple resolution (multi-variant playlist).
If there is a need, I implement sepelately.

@PanicKk
Copy link
Author

PanicKk commented May 4, 2023

It would be amazing if you added support for multiple resolutions !

Maybe something like: localhost:8080/1080p.m3u8, localhost:8080/720p.m3u8 ... based on the given ffmpeg command, so the user can decide the encoding configurations for each resolution.

Also what do you mean with CDN refer biim's origin and cache them and segments don't have to upload to storage?

Can I upload them either way ?

@monyone
Copy link
Owner

monyone commented May 4, 2023

CDN (almost) pull file from existing origin server.
And biim is serve m3u8 as origin server.
So, simply setting CDN's origin to biim's origin url.

@PanicKk
Copy link
Author

PanicKk commented May 5, 2023

Hey @monyone ! I apologize for the mention and disturbing you, but I was wondering if you could inform me about supporting multiple resolution outputs.

Could you do something about that, or could you please instruct me how to achieve it. Thank you !

@PanicKk
Copy link
Author

PanicKk commented May 8, 2023

Any updates @monyone ?

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