Skip to content
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
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@
- [SegiH](https://github.com/SegiH)
- [SenorSmartyPants](https://github.com/SenorSmartyPants)
- [shemanaev](https://github.com/shemanaev)
- [SimonvBez](https://github.com/SimonvBez)
- [skaro13](https://github.com/skaro13)
- [sl1288](https://github.com/sl1288)
- [Smith00101010](https://github.com/Smith00101010)
Expand Down
8 changes: 3 additions & 5 deletions MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,6 @@ public partial class EncoderValidator

private readonly string _encoderPath;

private readonly Version _minFFmpegMultiThreadedCli = new Version(7, 0);

public EncoderValidator(ILogger logger, string encoderPath)
{
_logger = logger;
Expand Down Expand Up @@ -552,9 +550,9 @@ public bool CheckSupportedRuntimeKey(string keyDesc, Version? ffmpegVersion)
string output;
try
{
// With multi-threaded cli support, FFmpeg 7 is less sensitive to keyboard input
var duration = ffmpegVersion >= _minFFmpegMultiThreadedCli ? 10000 : 1000;
output = GetProcessOutput(_encoderPath, $"-hide_banner -f lavfi -i nullsrc=s=1x1:d={duration} -f null -", true, "?");
// Start a dummy encode of 1x1@1fps. Send '?' to stdin to get the help/keybind text, followed by 'q' to stop the job immediately
// As a safeguard in case 'q' doesn't stop the job, the dummy input has a max duration of 5 (realtime) seconds
output = GetProcessOutput(_encoderPath, $"-hide_banner -re -f lavfi -i nullsrc=s=1x1:r=1:d=5 -f null -", true, "?q");
}
catch (Exception ex)
{
Expand Down