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

能否提供Encode保存video的一些建议 #49

Open
yuhan159 opened this issue Aug 27, 2024 · 3 comments
Open

能否提供Encode保存video的一些建议 #49

yuhan159 opened this issue Aug 27, 2024 · 3 comments

Comments

@yuhan159
Copy link

我看Encode中支持保存流成视频的选项,我也测试过的确OK,但是框架中,是一直往后保存。比如我现在要在触发报警时,保存报警前2~3秒和后2秒,形成一个完整的视频,有什么好的建议吗?

@yuhan159
Copy link
Author

我们有个粗浅的想法,就是先保存每帧的bm_image对象在一个固定长度的队列中,报警后,再去合成,但我想这样,就需要对bm_image进行压缩,确保不会占用太多内存空间,可是不知道该如何对bm_image进行压缩

@Yi-sir
Copy link

Yi-sir commented Aug 27, 2024

目前没想到什么特别好的方法,不过保存的对象可以是AVPacket,会小一些

@yuhan159
Copy link
Author

好的,感谢

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