不断向视频添加图片
每隔 x 分钟我就会从网络摄像头抓取一张图像。现在我想将此图片即时添加到现有视频文件中。
我不想保留大量图像文件,然后偶尔使用例如
mencoder mf://@${LIST} -mf type=jpg:fps=${FPS} ...
视频格式/编解码器对其进行编码,只要标准工具(mplayer,ffmpeg,vlc,...)可以处理它即可。
有什么想法或建议吗? 提前致谢!
Every x minutes I grab an image from a network-cam. Now i want to add this picture to an existing video file - on the fly.
I don't want to keep numerous image files and then encode them once in a while with e.g.
mencoder mf://@${LIST} -mf type=jpg:fps=${FPS} ...
The video format/codec doesn't really matter, as long as standard tools (mplayer, ffmpeg, vlc, ...) can handle it.
Any ides or suggestions?
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一个明显的可行方法(至少根据我的第一次测试)是将新的 jpeg 图像写入视频文件的末尾 - 因此视频是 mjpeg 流。
猫${PIC}>> ${VIDEO}
这是我问题的答案,但是我正在寻找比单独存储的图片占用的空间更少的东西。
其他提示?
One obvious way which should work (at least according to my first tests) is to just write the new jpeg image to the end of the video file - so the video is a mjpeg stream.
cat ${PIC} >> ${VIDEO}
This is an answer to my question, however i was looking for something consuming less space than the pictures stored each by its own would take up.
Other hints?