Browse Source

Restore max num of segments in playlist value

pull/5/head
Gabe Kangas 5 years ago
parent
commit
a063956660
  1. 1
      config.go
  2. 1
      config/config-example.yaml
  3. 3
      ffmpeg.go

1
config.go

@ -35,7 +35,6 @@ type StreamQuality struct {
// MaxNumberOnDisk must be at least as large as MaxNumberInPlaylist // MaxNumberOnDisk must be at least as large as MaxNumberInPlaylist
type Files struct { type Files struct {
MaxNumberInPlaylist int `yaml:"maxNumberInPlaylist"` MaxNumberInPlaylist int `yaml:"maxNumberInPlaylist"`
MaxNumberOnDisk int `yaml:"maxNumberOnDisk"`
} }
type IPFS struct { type IPFS struct {

1
config/config-example.yaml

@ -14,7 +14,6 @@ videoSettings:
files: files:
maxNumberInPlaylist: 30 maxNumberInPlaylist: 30
maxNumberOnDisk: 60
ipfs: ipfs:
enabled: false enabled: false

3
ffmpeg.go

@ -69,14 +69,13 @@ func startFfmpeg(configuration Config) {
"-sc_threshold 0", // don't create key frames on scene change - only according to -g "-sc_threshold 0", // don't create key frames on scene change - only according to -g
"-profile:v main", // Main – for standard definition (SD) to 640×480, High – for high definition (HD) to 1920×1080 "-profile:v main", // Main – for standard definition (SD) to 640×480, High – for high definition (HD) to 1920×1080
"-f hls", "-f hls",
"-hls_list_size 30", "-hls_list_size " + strconv.Itoa(configuration.Files.MaxNumberInPlaylist),
"-hls_time " + strconv.Itoa(configuration.VideoSettings.ChunkLengthInSeconds), "-hls_time " + strconv.Itoa(configuration.VideoSettings.ChunkLengthInSeconds),
"-strftime 1", "-strftime 1",
"-use_localtime 1", "-use_localtime 1",
"-hls_playlist_type event", "-hls_playlist_type event",
"-hls_segment_filename " + path.Join(outputDir, "stream-%Y%m%d-%s.ts"), "-hls_segment_filename " + path.Join(outputDir, "stream-%Y%m%d-%s.ts"),
"-hls_flags delete_segments+program_date_time+temp_file", "-hls_flags delete_segments+program_date_time+temp_file",
"-segment_wrap 100",
"-tune zerolatency", "-tune zerolatency",
streamMappingString, streamMappingString,

Loading…
Cancel
Save