mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-11-19 03:53:03 +03:00
fix stream checks missing non-aac audio
The ffprobe API never asked ffprobe for codec_type, so the stream checks could only spot audio and video by codec name. G.711, Opus, and other non-AAC audio showed as no audio, and H.265 detect streams showed an unknown resolution. ffprobe_stream now requests codec_type, and the stream check matches tracks on it alone.
This commit is contained in:
@@ -57,18 +57,8 @@ export function ffprobeToTestResult(
|
||||
}
|
||||
|
||||
const streams = entry.stdout?.streams ?? [];
|
||||
const videoStream = streams.find(
|
||||
(s) =>
|
||||
s.codec_type === "video" ||
|
||||
s.codec_name?.includes("h264") ||
|
||||
s.codec_name?.includes("h265"),
|
||||
);
|
||||
const audioStream = streams.find(
|
||||
(s) =>
|
||||
s.codec_type === "audio" ||
|
||||
s.codec_name?.includes("aac") ||
|
||||
s.codec_name?.includes("mp3"),
|
||||
);
|
||||
const videoStream = streams.find((s) => s.codec_type === "video");
|
||||
const audioStream = streams.find((s) => s.codec_type === "audio");
|
||||
|
||||
const resolution = videoStream
|
||||
? `${videoStream.width}x${videoStream.height}`
|
||||
|
||||
Reference in New Issue
Block a user