Skip to content

Commit

Permalink
Add output/aac for ffmpeg source
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed May 23, 2024
1 parent 8a7712a commit 6d9c701
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/ffmpeg/ffmpeg.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ var defaults = map[string]string{
// output
"output": "-user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp {output}",
"output/mjpeg": "-f mjpeg -",
"output/aac": "-f adts -",
"output/wav": "-f wav -",

// `-preset superfast` - we can't use ultrafast because it doesn't support `-profile main -level 4.1`
Expand Down Expand Up @@ -336,6 +337,8 @@ func parseArgs(s string) *ffmpeg.Args {
case args.Video == 0 && args.Audio == 1:
codec, _, _ := strings.Cut(query.Get("audio"), "/")
switch codec {
case "aac":
args.Output = defaults["output/aac"]
case "pcma", "pcmu", "pcml":
args.Output = defaults["output/wav"]
}
Expand Down

0 comments on commit 6d9c701

Please sign in to comment.