[Bug]: Progress_rises_while_ffmpeg_works needs 3 intermediate progress reports and fails on a fast CPU

未关闭 适合新手
#1,886 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
62/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
csharp
领域
testing

调研方向

失败的断言是 tests/Filee.Engines.Tests/MediaTests.cs 第 2314 行、Progress_rises_while_ffmpeg_works 测试中的 values.Count(v => v is > 0.02 and < 1) >= 3。先运行 fetch-engines 脚本,再运行过滤后的 dotnet test,以复现不稳定的计数。在把剪辑加长或加重、把阈值降到 2、放宽边界条件之间做出选择,并与维护者确认。在快速的机器上测试能稳定通过即为完成。

由索引模型根据 Issue 内容生成。

描述

bug
What happened?
Filee.Engines.Tests.MediaTests.Progress_rises_while_ffmpeg_works [FAIL]
错误消息:
0.02, 0.6405184574999999, 0.99, 1
   at Filee.Engines.Tests.MediaTests.Progress_rises_while_ffmpeg_works()
   in tests\Filee.Engines.Tests\MediaTests.cs:line 2314
What did you expect?

At least three samples strictly between 0.02 and 1 while FFmpeg works.

Steps to reproduce
  1. pwsh build/fetch-engines.ps1 -Only ffmpeg
  2. dotnet test tests/Filee.Engines.Tests -c Release --filter "FullyQualifiedName~Progress_rises_while_ffmpeg_works"
Files involved

40 s, 640×360, libx264 -preset ultrafast, MediaQuality.Small (so the video has to be encoded, not rewrapped).

Why it fails

The assertion is values.Count(v => v is > 0.02 and < 1) >= 3 (MediaTests.cs:2314). This run produced exactly 0.02, 0.6405…, 0.99, 1: the first sample sits exactly on the > 0.02 boundary and is excluded, leaving 2 qualifying samples.

FFmpeg reports -progress roughly every 0.5 s. On a fast machine (i9-14900HX, 32 threads) the whole 40 s clip encodes in about a second, so only two intermediate reports ever arrive; a slower CI runner produces more and the test passes.

Possible fixes: make the clip heavier/longer, assert >= 2, or relax the boundary to >= 0.02.

Filee version

v2.4.0-137-g5b91b379 (main @ 5b91b379)

Operating system

Windows 11 10.0.26300 (zh-CN), i9-14900HX, 32 GB

Engines page status

ffmpeg 9.0.2 (downloaded), 7zip 26.05 (downloaded).

主要语言
C#
星标
3.6k
派生
192
平均合并
14 小时 23 分钟
30 天内合并 PR
458

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

KnifeLemon/Filee 的其他 Issue

查看 KnifeLemon/Filee 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。