Reputation: 87
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.
Is there a way I can create a video stream from the images retrieved by running the Screenshot API continuously.
Upvotes: 2
Views: 8748
Reputation: 227
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 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
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
Upvotes: 6