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

Include .m3u8 for video playback to enable streaming #1372

Closed
wants to merge 4 commits into from

Conversation

fishcakeday
Copy link
Contributor

This trivial change should enable HLS streaming and adaptable bit rate playback for video playback.

@fishcakeday
Copy link
Contributor Author

Although it starts m3u8 playback for VOD, the size and aspect ration is wrong and broken.

@fishcakeday fishcakeday changed the title Include .m3u8 for video playback to enable streaming [WIP] Include .m3u8 for video playback to enable streaming Jul 16, 2023
@jb55
Copy link
Collaborator

jb55 commented Jul 16, 2023 via email

@fishcakeday
Copy link
Contributor Author

On Sun, Jul 16, 2023 at 06:43:45AM -0700, Fishcake wrote: Although it starts m3u8 playback for VOD, the size and aspect ration is wrong and broken.
is there a note I could test this on?

Ok, I've done some additional modifications to fix aspect ratio and sizing for the HLS streams, but I have no idea what I am doing, so it could be very wrong.

Here is npub that has 5 HLS streams in the notes: npub1fshcake8n69420zyzv4fezx98tuhr30zy6n09gfgkl39p3haqe4qae8ktp

Here are the notes' IDs:
note1fp7wmawcpfaax6a3csm8alhupvptud2t9psfwhaelsmypaf0x7cq68wx2w
note1pkwwcysk7mdz30j5jdcms8murpk73efrc66agg0c6dprv8fc6aaqcnn20d
note1crrklc75j9042xpxl9rt6tzvyfcptz0r2r94rkgtdmsfrskmhm5sxlh550
note13pfxgukemwxf2h28tlhv9vcmu7wqkrdn667rkf2r435gp4e7g4ys5j8aky
note1w79ydf4cdwh0phwa8k73q8rppeqv6f08p4nf99w6qad97s490mlqy2fwpa

Here is the link to the video showing how it works now:
https://cdn.nostr.build/p/DEmV.mp4

@fishcakeday
Copy link
Contributor Author

Ok, I opted for a hack to handle audio detection in HLS stream, and it works now. The downside it is always assuming that audio is present. It's not a bad assumption, but not ideal.

@fishcakeday
Copy link
Contributor Author

Here is the latest use of the build with this PR applied:
https://cdn.nostr.build/p/ArDO.mp4

@fishcakeday fishcakeday changed the title [WIP] Include .m3u8 for video playback to enable streaming Include .m3u8 for video playback to enable streaming Jul 17, 2023
@fishcakeday
Copy link
Contributor Author

For more m3u8 streams, you can get them from https://videojs-http-streaming.netlify.app/

@fishcakeday
Copy link
Contributor Author

After some more research, to make this work properly, some part of the player need to be rewritten. It is impossible to get the video size correctly with the current method, and the best I could find that is current is the implementation in https://github.com/apivideo/api.video-swift-player/tree/main

@fishcakeday
Copy link
Contributor Author

Closing this one since I just don’t have expertise in Swift to reimplement video player to be able to work with stream.

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 this pull request may close these issues.

2 participants