-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Support audio only videos with HLS player #3281
Comments
hls.js is filtering out levels without video codec; https://github.com/video-dev/hls.js/blob/b3ed0028e0e7d6e98f5b9d611487540a60e2fc6b/src/controller/level-controller.js#L111 As I understand hls.js it's looking in the master playlist for an explicit audio track, which PeerTube doesn't have. So the solution may be to add "EXT-X-MEDIA:TYPE=AUDIO" to the audio track? https://github.com/video-dev/hls.js/blob/b3ed0028e0e7d6e98f5b9d611487540a60e2fc6b/src/loader/playlist-loader.ts#L298 Current playlist structure:
Update: It seems that this isn't supported by hls.js. video-dev/hls.js#2654 (comment) How is this handled with the WebTorrent player? Can it downgrade from video to audio because of bandwidth? |
Hello. Does this means we should currently disable "audio only" transcoding in peertube 2.4? |
As far as I've experienced the audio only file is created but not provided to the user in the GUI, so it won't do any harm more than eat some disk space. But this only applies to HLS, if you're using WebTorrents it should work. |
I have a similar issue. But: for some videos, the audio-only option IS available in the player, for some videos not. I confirmed, that in all cases, the pure audio file was created, is in the folder and is available for download. |
@Chocobozzz since the 0 resolution file is still being generated for the audio-only output format, would you be open to considering using a different player for the 0 resolution file? We'd be willing to help out integrate this different player as it would be really useful to us 😊 Also, is it already possible to access the 0 resolution files directly through the Peertube REST API? |
Hi,
No sorry it's too complicated.
It still can be read/downloaded so even if our player is not able to read it, it could still be useful to generate the 0 resolution.
Yes, or using the download modal. |
Got it! Thanks a lot for taking the time to answer 👏 |
We plan to implement this feature in 2024. Read the detailed blog post on https://joinpeertube.org/news/peertube-future-2024 |
Implemented in #6521 |
Does this theoretically mean that a PeerTube instance could now be used as a music distribution site, and use less bandwidth than if it were streaming video? |
Yes for lives (in the next minor/major version). For VOD we still need an additional configuration so admins can choose between generating a video or just serve the audio when the user uploads an audio file only (don't hesitate to create an issue for that use case). |
@Chocobozzz, I don't know enough about PeerTube to create an issue for that use case, but I'll certainly support it if I see an issue for it appear. Thanks for the explanation. |
I did not manage to make our hls.js player work with a mp4 container that does not contain a video stream.
The text was updated successfully, but these errors were encountered: