Skip to content

Commit

Permalink
Camera: Support replace audio if enabled extra audio. v5.13.13
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Jan 17, 2024
1 parent ba2c11c commit cbbad47
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
1 change: 1 addition & 0 deletions DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -1092,6 +1092,7 @@ The following are the update records for the SRS Stack server.
* LiveRoom: Support live room secret with stream URL. v5.13.11
* Camera: Support IP Camera streaming scenario. v5.13.12
* Camera: Support silent extra audio stream for video only device. v5.13.13
* Camera: Support replace audio if enabled extra audio. v5.13.13
* v5.12
* Refine local variable name conf to config. v5.12.1
* Add forced exit on timeout for program termination. v5.12.1
Expand Down
7 changes: 6 additions & 1 deletion platform/camera-live-stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,12 @@ func (v *CameraTask) doCameraStreaming(ctx context.Context, input *FFprobeSource
}
// Whether insert extra audio stream.
if v.config.ExtraAudio == "silent" {
args = append(args, "-f", "lavfi", "-i", "anullsrc=channel_layout=stereo:sample_rate=44100", "-c:a", "aac", "-c:v", "copy")
args = append(args,
"-f", "lavfi", "-i", "anullsrc=channel_layout=stereo:sample_rate=44100", // Silent audio stream.
"-map", "0:v", "-map", "1:a", // Ignore the original audio stream.
"-c:a", "aac", "-ac", "2", "-ar", "44100", "-b:a", "20k", // Encode audio stream.
"-c:v", "copy", // Copy video stream.
)
} else {
args = append(args, "-c", "copy")
}
Expand Down
10 changes: 5 additions & 5 deletions ui/src/resources/locale.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
"srt": "超清实时直播",
"forward": "多平台转播",
"transcode": "直播转码",
"record": "本地录制",
"dvr": "云录制",
"vod": "云点播",
"record": "录制",
"dvr": "腾讯云COS录制",
"vod": "腾讯云VoD录制",
"code": "源代码",
"other": "不推荐",
"rmFileTip1": "删除文件,会造成",
Expand Down Expand Up @@ -718,8 +718,8 @@
"forward": "Forward",
"transcode": "Transcoding",
"record": "Record",
"dvr": "DVR",
"vod": "VoD",
"dvr": "TencentCOS DVR",
"vod": "TecentVoD DVR",
"code": "Source",
"other": "Discouraged",
"rmFileTip1": "It will cause",
Expand Down

0 comments on commit cbbad47

Please sign in to comment.