Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sdk, rebroadcast: support specifying custom ffmpeg path #1535

Merged
merged 1 commit into from
Jul 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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