Skip to content

Commit

Permalink
Add warning for onlyRemux
Browse files Browse the repository at this point in the history
  • Loading branch information
chiefMarlin committed Aug 18, 2023
1 parent bfcfdef commit 8941157
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions firescrew.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ type StreamInfo struct {
Width int `json:"width"`
Height int `json:"height"`
CodecType string `json:"codec_type"`
CodecName string `json:"codec_name"`
RFrameRate float64 `json:"-"`
} `json:"streams"`
}
Expand Down Expand Up @@ -428,6 +429,7 @@ func getStreamInfo(rtspURL string) (StreamInfo, error) {
Width int `json:"width"`
Height int `json:"height"`
CodecType string `json:"codec_type"`
CodecName string `json:"codec_name"`
RFrameRate string `json:"r_frame_rate"`
} `json:"streams"`
}
Expand All @@ -453,11 +455,13 @@ func getStreamInfo(rtspURL string) (StreamInfo, error) {
Width int `json:"width"`
Height int `json:"height"`
CodecType string `json:"codec_type"`
CodecName string `json:"codec_name"`
RFrameRate float64 `json:"-"`
}{
Width: stream.Width,
Height: stream.Height,
CodecType: stream.CodecType,
CodecName: stream.CodecName,
RFrameRate: frameRate,
})
}
Expand Down Expand Up @@ -744,6 +748,11 @@ func main() {
for index, stream := range hiResStreamInfo.Streams {
if stream.CodecType == "video" {
streamIndex = index
if globalConfig.Video.OnlyRemuxMp4 {
if stream.CodecName != "h264" && stream.CodecName != "h265" {
Log("warning", fmt.Sprintf("OnlyRemuxMp4 is enabled but the stream codec is not h264 or h265. Your videos may not play in WebUI. Codec: %s", stream.CodecName))
}
}
break
}
}
Expand Down

0 comments on commit 8941157

Please sign in to comment.