-
-
Notifications
You must be signed in to change notification settings - Fork 969
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
HLS Support for OffthreadVideo #2930
Comments
Thanks a lot for reporting! Actually, there is no explicit documentation on which codecs are supported by OffthreadVideo. I am fixing that with #2934. We'll also add a FFmpeg binary which supports HLS in the next version after which we can assess whether this file can be supported. |
The new version now throws a different error and it seems like it will take significant effort to support M3U8. Until we sort it out, I recommend to enable MP4 files on Mux and use those to render! |
@JonnyBurger sounds good, thanks again! |
@JonnyBurger we're also very keen to use HLS with |
@mjdavidson If you just need it in the preview / Remotion Player, you can probably add hls.js to get it working! For rendering, we need to parse the HLS format and download only the specific parts before feeding it to OffthreadVideo. The scariest part is the HLS spec which seems quite long. I don't see a suitable library for JS/Rust that we can get working quickly, so I don't see it happening soon. |
@JonnyBurger yep, when we render the final video we have access to a normalized mp4 video so we will use that. We already use |
@mjdavidson Sure, I added a snippet for it here: https://www.remotion.dev/docs/miscellaneous/snippets/hls Only tested some very basic cases though. |
I got this working pretty well today. I did end up adding a few optimizations to the useEffect(() => {
if (!src) {
throw new Error('src is required')
}
const hls = new Hls({
enableWorker: !isSafari(),
lowLatencyMode: true,
backBufferLength: 20,
startLevel: 4,
maxBufferLength: 5,
maxMaxBufferLength: 5,
})
if (hls) {
hls.on(Hls.Events.MANIFEST_PARSED, () => {
hls.startLoad(startFrom)
})
hls.attachMedia(videoRef.current!)
hls.loadSource(src)
}
return () => {
hls.destroy()
}
}, [src]) Also, the guide states that audio "will not render," but in my testing, audio works just fine in preview mode. |
By "will not render", I meant actually turning the video into an MP4, which I think is true. I'll clarify it as well. |
@JonnyBurger Can you give a little more detail as to what errors you're getting or what you need to feed to the component? I'd like to try my hand at getting hls to work if you can give me the context. |
@tslater I don't know the errors I got specifically, I just know that the native It is just unknown to them which is why it doesn't work right now. |
💎 $226.11 bounty • nonsense.comSteps to solve:
Thank you for contributing to remotion-dev/remotion! Add a bounty • Share on socials
|
Looks like something I can fix, I'll give it a try |
I think this is a really difficult issue to solve (at least for me 😄) Do you have a plan on how to proceed? @urbit-pilled (The bounty was not created by us nor someone we know!) |
/attempt #2930
|
@sydneypalumbo Hello can you tell me what command? Did you run for having this "> [compositor] [FFmpeg] Statistics: 2196 bytes read, 0 seeks
|
I want to reproduce the same error on my editor |
Is there a time limit to a video? There should be a time limit to the video because we can play live stream via the .m3u8 link. I tried playing a video, it gets the packets(segments) in the network tab but the video player only plays the video once it gets all the packets(segments). |
/attempt #2930 Options |
We have not put out this bounty and don't have a clear path towards solving this issue. |
Instead of usign OffthreadVideo we can use a library for react video.js and can also inspect that the m3u8 file is correct or not. If you are interested we can try this |
Hi there! I'm currently trying to use m3u8 files (from mux.com) as the
src
of<OffthreadVideo />
with remotion v4.0.19 but getting the following error during rendering. I thought this would be supported with ffmpeg, but is it not possible to use m3u8 with OffthreadVideo? Here's an example file, which doesn't seem to be corrupt. Thanks so much in advance for your help!The text was updated successfully, but these errors were encountered: