mirror of
https://github.com/AlexxIT/go2rtc.git
synced 2026-04-22 23:57:20 +08:00
Add framerate parameter option to HTTPs
Some HTTP (a.g. JPEG or MJPEG) needs set the input framerate explicitly.
This commit is contained in:
@@ -144,6 +144,11 @@ func parseArgs(s string) *ffmpeg.Args {
|
||||
switch s[:i] {
|
||||
case "http", "https", "rtmp":
|
||||
args.Input = inputTemplate("http", s, query)
|
||||
// Some HTTP-JPEG, HTTP-MJPEG needs the input framerate explicitly
|
||||
if query["framerate"] != nil {
|
||||
args.Input = "-framerate " + query["framerate"][0] + " " + args.Input
|
||||
query.Del("framerate")
|
||||
}
|
||||
case "rtsp", "rtsps":
|
||||
// https://ffmpeg.org/ffmpeg-protocols.html#rtsp
|
||||
// skip unnecessary input tracks
|
||||
|
||||
Reference in New Issue
Block a user