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

录制过程出现流异常时没有关闭文件? #35

Open
luowencai opened this issue Jun 4, 2024 · 5 comments
Open

录制过程出现流异常时没有关闭文件? #35

luowencai opened this issue Jun 4, 2024 · 5 comments

Comments

@luowencai
Copy link

luowencai commented Jun 4, 2024

10:29:16        INFO    mp4 write trailer       {"流": "storage/test", "id": 1, "类型": "MP4Recorder", "ID": "storage/test/mp4"}
10:29:16        INFO    创建文件        {"流": "storage/test", "id": 1, "类型": "MP4Recorder", "ID": "storage/test/mp4", "path": "storage\\test\\1717468156.mp4"}
10:29:41        ERROR   READSTATE_NORMAL        {"流": "storage/test", "id": 1, "类型": "MP4Recorder", "ID": "storage/test/mp4", "轨道": "h265", "error": "discard"}
10:29:41        INFO    播放停止        {"流": "storage/test", "id": 1, "类型": "MP4Recorder", "ID": "storage/test/mp4", "error": "discard"}
10:29:41        INFO    订阅者-1        {"流": "storage/test", "id": 1, "类型": "MP4Recorder", "ID": "storage/test/mp4", "remains": 0}
10:29:41        INFO    🟢->🟠  {"流": "storage/test", "id": 1, "动作": "last leave"}
10:29:51        INFO    🟠->🔴  {"流": "storage/test", "id": 1, "动作": "timeout"}

storage\test\1717468156.mp4这个文件依旧被程序占用

@langhuihui
Copy link
Member

必现?

@luowencai
Copy link
Author

image
image

必现?

是的

@langhuihui
Copy link
Member

操作步骤是什么,record 插件以及 engine 的版本号多少

@luowencai
Copy link
Author

操作步骤是什么,record 插件以及 engine 的版本号多少

engine版本是v4.14.7,record插件是最新版的,操作步骤就是录制流,按30秒分片,然后出现上面的异常,异常出现后看起来是没有调用close方法,流重新恢复后会恢复录制,但是上一个文件句柄还在,按下面这样添加后似乎可以保证mp4文件正常关闭。
image

@langhuihui
Copy link
Member

这里确实有问题,通常流关闭时会调用 close,但是这里确实没有调用,我来修复一下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants