mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-06-03 05:34:23 -04:00
Fix multi channels audio issues
This commit is contained in:
parent
f49882fb0d
commit
735edf1529
@ -127,12 +127,15 @@ impl FromStr for Quality {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn get_transcode_audio_args(audio_idx: u32) -> Vec<String> {
|
fn get_transcode_audio_args(audio_idx: u32) -> Vec<String> {
|
||||||
// TODO: Support multy audio qualities.
|
// TODO: Support multi audio qualities.
|
||||||
return vec![
|
return vec![
|
||||||
"-map".to_string(),
|
"-map".to_string(),
|
||||||
format!("0:a:{}", audio_idx),
|
format!("0:a:{}", audio_idx),
|
||||||
"-c:a".to_string(),
|
"-c:a".to_string(),
|
||||||
"aac".to_string(),
|
"aac".to_string(),
|
||||||
|
// TODO: Support 5.1 audio streams.
|
||||||
|
"-ac".to_string(),
|
||||||
|
"2".to_string(),
|
||||||
"-b:a".to_string(),
|
"-b:a".to_string(),
|
||||||
"128k".to_string(),
|
"128k".to_string(),
|
||||||
];
|
];
|
||||||
@ -226,7 +229,7 @@ async fn start_transcode(
|
|||||||
// Use a .tmp file for segments (.ts files)
|
// Use a .tmp file for segments (.ts files)
|
||||||
.args(&["-hls_flags", "temp_file"])
|
.args(&["-hls_flags", "temp_file"])
|
||||||
// Cache can't be allowed since switching quality means starting a new encode for now.
|
// Cache can't be allowed since switching quality means starting a new encode for now.
|
||||||
// .args(&["-hls_allow_cache", "1"])
|
.args(&["-hls_allow_cache", "1"])
|
||||||
// Keep all segments in the list (else only last X are presents, useful for livestreams)
|
// Keep all segments in the list (else only last X are presents, useful for livestreams)
|
||||||
.args(&["-hls_list_size", "0"])
|
.args(&["-hls_list_size", "0"])
|
||||||
.args(&["-hls_time", SEGMENT_TIME.to_string().as_str()])
|
.args(&["-hls_time", SEGMENT_TIME.to_string().as_str()])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user