breaking change: remove default ffmpeg args
This commit is contained in:
@@ -20,21 +20,11 @@ func buildFFmpegArgs(videoItem config.InputItem) []string {
|
||||
|
||||
args = append(args,
|
||||
"-i", videoPath,
|
||||
"-c:v", config.GlobalConfig.Play.VideoCodec,
|
||||
"-preset", config.GlobalConfig.Play.Preset,
|
||||
"-crf", fmt.Sprintf("%d", config.GlobalConfig.Play.CRF),
|
||||
"-maxrate", config.GlobalConfig.Play.MaxRate,
|
||||
"-bufsize", config.GlobalConfig.Play.BufSize,
|
||||
"-vf", fmt.Sprintf("scale=%s", config.GlobalConfig.Play.Scale),
|
||||
"-r", fmt.Sprintf("%d", config.GlobalConfig.Play.FrameRate),
|
||||
"-c:a", config.GlobalConfig.Play.AudioCodec,
|
||||
"-b:a", config.GlobalConfig.Play.AudioBitrate,
|
||||
"-ar", fmt.Sprintf("%d", config.GlobalConfig.Play.AudioSampleRate),
|
||||
"-f", config.GlobalConfig.Play.OutputFormat,
|
||||
)
|
||||
|
||||
if len(config.GlobalConfig.Play.CustomArgs) != 0 {
|
||||
args = append(args, config.GlobalConfig.Play.CustomArgs...)
|
||||
for k, v := range config.GlobalConfig.Play {
|
||||
args = append(args, k)
|
||||
args = append(args, fmt.Sprint(v))
|
||||
}
|
||||
|
||||
args = append(args, fmt.Sprintf("%s/%s", config.GlobalConfig.Output.RTMPServer, config.GlobalConfig.Output.StreamKey))
|
||||
|
||||
@@ -56,11 +56,9 @@ func NewStreamer(videoList []config.InputItem) *Streamer {
|
||||
func (s *Streamer) actorLoop() {
|
||||
for msg := range s.mailbox {
|
||||
if msg.messageType() != CloseMessage.messageType(CloseMessage{}) {
|
||||
log.Printf("handle %s start\n", msg.messageType())
|
||||
s.wg.Add(1)
|
||||
s.handleMessage(msg)
|
||||
s.wg.Done()
|
||||
log.Printf("handle %s end\n", msg.messageType())
|
||||
} else {
|
||||
s.handleMessage(msg)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user