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

Separate audio and video streams in different files in HLS playlists #6521

Merged
merged 1 commit into from
Aug 5, 2024

Conversation

Chocobozzz
Copy link
Owner

@Chocobozzz Chocobozzz commented Jul 30, 2024

Allows:

  • The HLS player to propose an "Audio only" resolution
  • The live to output an "Audio only" resolution
  • The live to ingest and output an "Audio only" stream

This feature is under a config for VOD videos and is enabled by default for lives

In the future we can imagine:

  • To propose multiple audio streams for a specific video
  • To ingest an audio only VOD and just output an audio only "video"
    (the player would play the audio file and PeerTube would not
    generate additional resolutions)

This commit introduce a new way to download videos:

  • Add /download/videos/generate/:videoId endpoint where PeerTube can
    mux an audio only and a video only file to a mp4 container
  • The download client modal introduces a new default panel where the
    user can choose resolutions it wants to download

@stevespaw
Copy link

@Chocobozzz This seems like great news. So am I understanding that we may have the ability to have Non-Muxed audio in the HLS? Roku: "Fragmented MP4, CMAF (muxing audio and video not supported for CMAF)"
https://developer.roku.com/docs/specs/media/streaming-specifications.md This would be huge. :-) Currently Roku plays the videos without any sound.

@Chocobozzz
Copy link
Owner Author

So am I understanding that we may have the ability to have Non-Muxed audio in the HLS? Roku: "Fragmented MP4, CMAF (muxing audio and video not supported for CMAF)"

I'm not sure because it's not written they support fragmented mp4 in HLS column. But if you can play the video currently I think they support it 🤔 When the PR is merged and deployed on our nightly instance, I'll provide a public URL so you can test.

@stevespaw
Copy link

@Chocobozzz Happy to test a new M3U8. Yes currently Peertube HLS play very nicely on ROKU but no audio. My next questions will be about captions, I will make another separate post with my questions on that 😄

@Chocobozzz
Copy link
Owner Author

My next questions will be about captions

I think you can create the issue to request captions to be included in the HLS playlist :)

@Chocobozzz Chocobozzz force-pushed the feature/separate-audio branch 3 times, most recently from 7cc6051 to 2ad98d3 Compare August 2, 2024 13:51
@stevespaw
Copy link

Just want to add this reference here #5797

@stevespaw
Copy link

@Chocobozzz If you get a sample m3u8 I look forward to testing on ROKU !
Thank you so much for this work!

 Allows:
  * The HLS player to propose an "Audio only" resolution
  * The live to output an "Audio only" resolution
  * The live to ingest and output an "Audio only" stream

 This feature is under a config for VOD videos and is enabled by default for lives

 In the future we can imagine:
  * To propose multiple audio streams for a specific video
  * To ingest an audio only VOD and just output an audio only "video"
    (the player would play the audio file and PeerTube would not
    generate additional resolutions)

This commit introduce a new way to download videos:
 * Add "/download/videos/generate/:videoId" endpoint where PeerTube can
   mux an audio only and a video only file to a mp4 container
 * The download client modal introduces a new default panel where the
   user can choose resolutions it wants to download
@Chocobozzz
Copy link
Owner Author

@stevespaw Please try the master playlist of https://peertube2.cpy.re/w/oBw6LwsMWWRkmXYfuYRpJd

@stevespaw
Copy link

Wow Roku with Audio !
20240805_115352

@stevespaw
Copy link

@Chocobozzz
Do you have a VOD sample yet?

@Chocobozzz
Copy link
Owner Author

@stevespaw
Copy link

This works well also on Roku!
Looking Good, @Chocobozzz
Are you envisioning a script that will convert, or where do you see this going from here?

@Chocobozzz
Copy link
Owner Author

Chocobozzz commented Aug 6, 2024

Are you envisioning a script that will convert, or where do you see this going from here?

Admins can re-run HLS transcoding on existing videos with the "split audio and video" option enabled to convert them. We don't plan to convert all existing videos as it would consume too much CPU

@stevespaw
Copy link

And will there be a config setting to choose the "split" as default for new publishing?

@Chocobozzz
Copy link
Owner Author

And will there be a config setting to choose the "split" as default for new publishing?

Yes!

@Chocobozzz Chocobozzz deleted the feature/separate-audio branch August 13, 2024 07:38
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