Separate HLS audio and video streams

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
This commit is contained in:
Chocobozzz
2024-07-23 16:38:51 +02:00
committed by Chocobozzz
parent e77ba2dfbc
commit 816f346a60
186 changed files with 5748 additions and 2807 deletions

View File

@@ -56,6 +56,11 @@ rates_limit:
# 500 attempts in 10 seconds (to not break crawlers)
window: 10 seconds
max: 500
download_generate_video: # A light FFmpeg process is used to generate videos (to merge audio and video streams for example)
# 5 attempts in 5 seconds
window: 5 seconds
max: 5
oauth2:
token_lifetime:
@@ -588,7 +593,7 @@ transcoding:
profile: 'default'
resolutions: # Only created if the original video has a higher resolution, uses more storage!
0p: false # audio-only (creates mp4 without video stream, always created when enabled)
0p: false # audio-only (creates mp4 without video stream)
144p: false
240p: false
360p: false
@@ -616,6 +621,11 @@ transcoding:
hls:
enabled: true
# Store the audio stream in a separate file from the video
# This option adds the ability for the HLS player to propose the "Audio only" quality to users
# It also saves disk space by not duplicating the audio stream in each resolution file
split_audio_and_video: false
live:
enabled: false
@@ -693,6 +703,7 @@ live:
profile: 'default'
resolutions:
0p: false # Audio only
144p: false
240p: false
360p: false

View File

@@ -54,6 +54,11 @@ rates_limit:
# 500 attempts in 10 seconds (to not break crawlers)
window: 10 seconds
max: 500
download_generate_video: # A light FFmpeg process is used to generate videos (to merge audio and video streams for example)
# 5 attempts in 5 seconds
window: 5 seconds
max: 5
oauth2:
token_lifetime:
@@ -598,7 +603,7 @@ transcoding:
profile: 'default'
resolutions: # Only created if the original video has a higher resolution, uses more storage!
0p: false # audio-only (creates mp4 without video stream, always created when enabled)
0p: false # audio-only (creates mp4 without video stream)
144p: false
240p: false
360p: false
@@ -626,6 +631,11 @@ transcoding:
hls:
enabled: true
# Store the audio stream in a separate file from the video
# This option adds the ability for the HLS player to propose the "Audio only" quality to users
# It also saves disk space by not duplicating the audio stream in each resolution file
split_audio_and_video: false
live:
enabled: false
@@ -703,6 +713,7 @@ live:
profile: 'default'
resolutions:
0p: false # Audio only
144p: false
240p: false
360p: false