Skip to content

Commit

Permalink
sdk, rebroadcast: support specifying custom ffmpeg path
Browse files Browse the repository at this point in the history
  • Loading branch information
bjia56 committed Jul 21, 2024
1 parent aa9903b commit 1f204cf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/prebuffer-mixin/src/ffmpeg-rebroadcast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export async function startParserSession<T extends string>(ffmpegInput: FFmpegIn
// start ffmpeg process with child process pipes
args.unshift('-hide_banner');
safePrintFFmpegArguments(console, args);
const cp = child_process.spawn(await mediaManager.getFFmpegPath(), args, {
const cp = child_process.spawn(ffmpegInput.ffmpegPath || await mediaManager.getFFmpegPath(), args, {
stdio,
env,
});
Expand Down
1 change: 1 addition & 0 deletions sdk/types/scrypted_python/scrypted_sdk/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,7 @@ class FFmpegInput(TypedDict):
container: str
destinationVideoBitrate: float
env: Any # Environment variables to set when launching FFmpeg.
ffmpegPath: str # Path to a custom FFmpeg binary.
h264EncoderArguments: list[str]
h264FilterArguments: list[str]
inputArguments: list[str]
Expand Down
4 changes: 4 additions & 0 deletions sdk/types/src/types.input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1707,6 +1707,10 @@ export interface FFmpegInput extends MediaContainer {
* Environment variables to set when launching FFmpeg.
*/
env?: { [key: string]: string };
/**
* Path to a custom FFmpeg binary.
*/
ffmpegPath?: string;
}
export interface DeviceInformation {
model?: string;
Expand Down

0 comments on commit 1f204cf

Please sign in to comment.