是否可以从连续创建的jpeg图像创建视频流(mpeg或mjpeg)? [英] Is it possible to create a video stream (mpeg or mjpeg) from jpeg images that are continuously created?

查看:341
本文介绍了是否可以从连续创建的jpeg图像创建视频流(mpeg或mjpeg)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要创建显示低功耗嵌入式设备的屏幕抓取视频流.它没有能力运行实时VNC桌面共享服务.但是它可以通过API向运行在其他地方的单独的HTTP客户端每秒提供2-3个屏幕截图.

I need to create a screen grab video stream of the display low powered embedded device. It does not have the capacity to run a desktop sharing service live VNC. But it can give 2-3 screenshots every second through an API to a separate HTTP client running elsewhere.

有没有一种方法可以通过连续运行Screenshot API来从检索到的图像中创建视频流.

Is there a way I can create a video stream from the images retrieved by running the Screenshot API continuously.

推荐答案

您可以使用ffmpeg使用连续的jp​​eg文件创建实时视频流,它将使用图像创建mpeg格式的视频.

You can use ffmpeg to create a real time video stream using continues jpeg files and it will create mpeg format video using images.

Ffmpeg是一个软件项目,可处理视频,音频和其他多媒体文件.您可以使用ffmpeg类库项目或命令行exe应用程序来使用ffmpeg. 如果图像是本地存储在计算机中的,则可以以2或3帧速率直接馈送这些图像以创建视频.例如,您可以使用以下ffmpeg命令来使用多个图像创建视频文件.

Ffmpeg is a software project to work with videos, audios and other multimedia files. You can use ffmpeg class library project or command line exe application to work with ffmpeg. If images are locally stored in computer, you can directly feed those images in 2 or 3 framerate to create the video. For example you can use following ffmpeg command to create a video file using multiple images.

ffmpeg -framerate 24 -i %d.jpg output.mp4

在上面的命令中-i是输入路径,它生成output.mp4文件.同样,您可以使用以下命令创建实时mpegts udp流.

In above command -i is the input path and it produce output.mp4 file. Similarly you can use following command to create a real time mpegts udp stream.

ffmpeg -loop 1 -i %d.jpg -r 10 -vcodec mpeg4 -f mpegts udp://127.0.0.1:1234

这篇关于是否可以从连续创建的jpeg图像创建视频流(mpeg或mjpeg)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆