Browse Source

Use the built-in AAC codec

pull/53/head
Gabe Kangas 5 years ago
parent
commit
1409477dce
  1. 5
      core/ffmpeg/transcoder.go
  2. 1
      core/rtmp/rtmp.go

5
core/ffmpeg/transcoder.go

@ -296,8 +296,9 @@ func (v *HLSVariant) getAudioQualityString() string { @@ -296,8 +296,9 @@ func (v *HLSVariant) getAudioQualityString() string {
return fmt.Sprintf("-map a:0 -c:a:%d copy", v.index)
}
encoderCodec := "libfdk_aac"
return fmt.Sprintf("-map a:0 -c:a:%d %s -profile:a aac_he -b:a:%d %s", v.index, encoderCodec, v.index, v.audioBitrate)
// libfdk_aac is not a part of every ffmpeg install, so use "aac" instead
encoderCodec := "aac"
return fmt.Sprintf("-map a:0 -c:a:%d %s -b:a:%d %s", v.index, encoderCodec, v.index, v.audioBitrate)
}
// AddVariant adds a new HLS variant to include in the output

1
core/rtmp/rtmp.go

@ -90,7 +90,6 @@ func HandleConn(c *rtmp.Conn, nc net.Conn) { @@ -90,7 +90,6 @@ func HandleConn(c *rtmp.Conn, nc net.Conn) {
f, err := os.OpenFile(pipePath, os.O_RDWR, os.ModeNamedPipe)
_pipe = f
fmt.Println(pipePath)
if err != nil {
panic(err)
}

Loading…
Cancel
Save