diff --git a/platform/containers/data/srs-s3-bucket/.gitkeep b/platform/containers/data/srs-s3-bucket/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/platform/dvr-local-disk.go b/platform/dvr-local-disk.go index 5797dcce..cb436f21 100644 --- a/platform/dvr-local-disk.go +++ b/platform/dvr-local-disk.go @@ -75,7 +75,7 @@ func (v *RecordWorker) Handle(ctx context.Context, handler *http.ServeMux) error } else if globs, err := rdb.HGet(ctx, SRS_RECORD_PATTERNS, "globs").Result(); err != nil && err != redis.Nil { return errors.Wrapf(err, "hget %v globs", SRS_RECORD_PATTERNS) } else if processCpDir, err := rdb.HGet(ctx, SRS_RECORD_PATTERNS, string(RecordPostProcessCpFile)).Result(); err != nil && err != redis.Nil { - return errors.Wrapf(err, "hget %v %v", string(RecordPostProcessCpFile)) + return errors.Wrapf(err, "hget %v %v", SRS_RECORD_PATTERNS, string(RecordPostProcessCpFile)) } else { globFilters := []string{} if globs != "" { @@ -1072,7 +1072,7 @@ func (v *RecordM3u8Stream) finishM3u8(ctx context.Context) error { func (v *RecordM3u8Stream) postProcessing(ctx context.Context) error { processCpDir, err := rdb.HGet(ctx, SRS_RECORD_PATTERNS, string(RecordPostProcessCpFile)).Result() if err != nil && err != redis.Nil { - return errors.Wrapf(err, "hget %v %v", string(RecordPostProcessCpFile)) + return errors.Wrapf(err, "hget %v %v", SRS_RECORD_PATTERNS, string(RecordPostProcessCpFile)) } if processCpDir == "" { diff --git a/platform/main.go b/platform/main.go index ff516a9f..655fc79c 100644 --- a/platform/main.go +++ b/platform/main.go @@ -387,6 +387,8 @@ func initPlatform(ctx context.Context) error { } // Create directories for data, allow user to link it. + // Keep in mind that we must not create the containers/data/srs-s3-bucket, as the user should generate + // and mount it if they wish to save recordings to cloud storage. for _, dir := range []string{ "containers/data/dvr", "containers/data/record", "containers/data/vod", "containers/data/upload", "containers/data/vlive", "containers/data/signals", diff --git a/ui/src/pages/ScenarioRecord.js b/ui/src/pages/ScenarioRecord.js index 6600281c..1d11179d 100644 --- a/ui/src/pages/ScenarioRecord.js +++ b/ui/src/pages/ScenarioRecord.js @@ -61,7 +61,7 @@ function ScenarioRecordImpl({activeKeys, defaultApplyAll, defaultGlobs, defaultP const [targetUrl, setTargetUrl] = React.useState(); const [postProcess, setPostProcess] = React.useState(defaultPostProcess); - const [postCpDir, setPostCpDir] = React.useState(defaultPostProcessValue || '/media/srs-bucket'); + const [postCpDir, setPostCpDir] = React.useState(defaultPostProcessValue || '/data/srs-s3-bucket'); const testGlobFilters = React.useCallback(() => { if (!targetUrl) return alert(t('record.urlEmpty')); @@ -300,7 +300,7 @@ function ScenarioRecordImpl({activeKeys, defaultApplyAll, defaultGlobs, defaultP {t('record.postCp2')} * {t('record.postCp3')} setPostCpDir(e.target.value)}/> }