diff --git a/server/plugin/plg_video_transcoder/index.go b/server/plugin/plg_video_transcoder/index.go index e461155c..34404cfa 100644 --- a/server/plugin/plg_video_transcoder/index.go +++ b/server/plugin/plg_video_transcoder/index.go @@ -19,7 +19,7 @@ import ( ) const ( - HLS_SEGMENT_LENGTH = 10 + HLS_SEGMENT_LENGTH = 25 CLEAR_CACHE_AFTER = 12 VideoCachePath = "data/cache/video/" ) @@ -192,6 +192,7 @@ func hls_transcode(ctx *App, res http.ResponseWriter, req *http.Request) { "-vcodec", "libx264", "-preset", "veryfast", "-acodec", "aac", + "-ac", "2", "-pix_fmt", "yuv420p", "-x264opts:0", "subme=0:me_range=4:rc_lookahead=10:me=dia:no_chroma_me:8x8dct=0:partitions=none", "-force_key_frames", fmt.Sprintf("expr:gte(t,n_forced*%d.000)", HLS_SEGMENT_LENGTH),