fix unsane etc
This commit is contained in:
parent
825a6ede2b
commit
c3b9224694
1 changed files with 15 additions and 0 deletions
|
|
@ -123,3 +123,18 @@ diff --git a/transcoder/stream.go b/transcoder/stream.go
|
|||
scaler = "scale_vaapi"
|
||||
scalerArgs = append(scalerArgs, "format=nv12")
|
||||
} else if CV == ENCODER_NVENC {
|
||||
@@ -509,6 +517,13 @@ func (s *Stream) transcodeArgs(startAt float64, isHls bool) []string {
|
||||
// Audio output specs
|
||||
args = append(args, []string{
|
||||
"-map", "0:a:0?",
|
||||
"-c:a", "aac",
|
||||
+ // ffmpeg decodes AC-3/DTS 5.1 as layout "5.1(side)", which the AAC
|
||||
+ // encoder cannot express as a standard channel_configuration, so it
|
||||
+ // emits a PCE and sets channel_configuration=0. hls.js does not parse
|
||||
+ // the PCE, writes channelCount=0 into the fMP4 init segment, and every
|
||||
+ // browser then rejects the audio SourceBuffer. Restricting to standard
|
||||
+ // layouts maps 5.1(side) -> 5.1 and leaves mono/stereo untouched.
|
||||
+ "-af", "aformat=channel_layouts=mono|stereo|5.1",
|
||||
}...)
|
||||
|
||||
return args
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue