clean (plg_video_transcode): more readable ffmpeg command

The idea is to play with the params in ffmpeg until we find the
perfect setup for HLS and have everything version control by git
This commit is contained in:
Mickael Kerjean
2022-11-29 20:47:38 +11:00
parent ec575d68b1
commit 849b00ba36

View File

@ -194,7 +194,15 @@ func hls_transcode(ctx *App, res http.ResponseWriter, req *http.Request) {
"-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",
"-x264opts", strings.Join([]string{
"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),
"-f", "ssegment",
"-segment_time", fmt.Sprintf("%d.00", HLS_SEGMENT_LENGTH),