|
|
|
@ -20,8 +20,9 @@ func startFfmpeg(configuration Config) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
log.Printf("Starting transcoder saving to /%s.", outputDir) |
|
|
|
log.Printf("Starting transcoder saving to /%s.", outputDir) |
|
|
|
|
|
|
|
pipePath := getTempPipePath() |
|
|
|
|
|
|
|
|
|
|
|
ffmpegCmd := "cat streampipe.flv | " + configuration.FFMpegPath + |
|
|
|
ffmpegCmd := "cat " + pipePath + " | " + configuration.FFMpegPath + |
|
|
|
" -hide_banner -i pipe: -vf scale=" + strconv.Itoa(configuration.VideoSettings.ResolutionWidth) + ":-2 -g 48 -keyint_min 48 -preset ultrafast -f hls -hls_list_size 30 -hls_time " + |
|
|
|
" -hide_banner -i pipe: -vf scale=" + strconv.Itoa(configuration.VideoSettings.ResolutionWidth) + ":-2 -g 48 -keyint_min 48 -preset ultrafast -f hls -hls_list_size 30 -hls_time " + |
|
|
|
strconv.Itoa(configuration.VideoSettings.ChunkLengthInSeconds) + " -strftime 1 -use_localtime 1 -hls_segment_filename '" + |
|
|
|
strconv.Itoa(configuration.VideoSettings.ChunkLengthInSeconds) + " -strftime 1 -use_localtime 1 -hls_segment_filename '" + |
|
|
|
outputDir + "/stream-%Y%m%d-%s.ts' -hls_flags delete_segments -segment_wrap 100 " + hlsPlaylistName |
|
|
|
outputDir + "/stream-%Y%m%d-%s.ts' -hls_flags delete_segments -segment_wrap 100 " + hlsPlaylistName |
|
|
|
|