Skip to content

Commit

Permalink
some small adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
DawinYurtseven committed Nov 29, 2024
1 parent 7ff1898 commit e197fb9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
23 changes: 13 additions & 10 deletions api/runner_grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ func (g GrpcRunnerServer) NotifyStreamStarted(ctx context.Context, request *prot
logger.Error("Can't set StreamLiveNowTimestamp", "err", err)
}

hlsUrl := fmt.Sprintf("%v:%v/%v", tools.Cfg.Edge.Domain, tools.Cfg.Edge.Port, request.HLSUrl)
hlsUrl := fmt.Sprintf("%v/%v", tools.Cfg.Edge.Domain, request.HLSUrl)

time.Sleep(time.Second * 5)
if !isHLSUrlOk(hlsUrl) {
Expand Down Expand Up @@ -510,6 +510,7 @@ func NotifyRunnerAssignments(dao dao.DaoWrapper) func() {
for _, action := range activeAction {
if action.End.Before(time.Now().Add(5 * time.Minute)) {
action.SetToIgnored()
err = dao.ActionDao.UpdateAction(ctx, &action)
log.Info("Action ignored, check for progress manually", "action", action.ID)
continue
}
Expand Down Expand Up @@ -556,6 +557,9 @@ func NotifyRunnerAssignments(dao dao.DaoWrapper) func() {
return
}
for _, job := range jobs {
if job.Actions[0].Status != 3 {
continue
}
action, err := job.GetNextAction()
if err != nil {
logger.Error("Can't get next action", err)
Expand Down Expand Up @@ -636,15 +640,14 @@ func CreateJob(dao dao.DaoWrapper, ctx context.Context, values map[string]interf
Status: 3,
Type: "stream",
Values: string(value),
}, model.Action{
Status: 3,
Type: "transcode",
Values: string(value),
}, model.Action{
Status: 3,
Type: "upload",
Values: string(value),
})
},
/*
model.Action{
Status: 3,
Type: "upload",
Values: string(value),
}
*/)
job.Actions = append(job.Actions, actions...)
}
err = dao.CreateJob(ctx, job)
Expand Down
3 changes: 1 addition & 2 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ db:
password: example
user: root
edge:
domain: http://localhost
port: 8089
domain: http://localhost:8089
ingestbase: rtmp://ingest.tum.live/
jwtkey: # This is an example key, delete and restart to generate a proper one
|
Expand Down
2 changes: 1 addition & 1 deletion runner/config/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
type CmdList struct {
//this is for adding extra parameters

Stream string `Default:"-y -hide_banner -nostats %x -t &.0f -i %s -c:v copy -c:a copy -f mpegts %x -c:v libx264 -preset veryfast -tune zerolatency -maxrate 2500k -bufsize 3000k -g 60 -r 30 -x264-params keyint=60:scenecut=0 -c:a aac -ar 44100 -b:a 128k -f hls -hls_time 2 -hls_list_size 3600 -hls_playlist_type event -hls_flags append_list -hls_segment_filename %x %x"`
Stream string `Default:"-y -hide_banner -loglevel quiet -nostats %v -t %.0f -i %v -c:v copy -c:a copy -f mpegts %v -c:v libx264 -preset veryfast -tune zerolatency -maxrate 2500k -bufsize 3000k -g 60 -r 30 -x264-params keyint=60:scenecut=0 -c:a aac -ar 44100 -b:a 128k -f hls -hls_time 2 -hls_list_size 3600 -hls_playlist_type event -hls_flags append_list -hls_segment_filename %v/%%05d.ts %v"`
SeparateAudioFast string `Default:"-i %v -vn -c:a copy %v"`
SeparateAudio string `Default:"-i %v -vn %v"`
AudioNormalize1 string `Default:"-i %v -nostats -y -af loudnorm=I=-23:TP=-2:LRA=7:print_format=json -f null -"`
Expand Down

0 comments on commit e197fb9

Please sign in to comment.