alez
alez

Reputation: 37

How to http stream video from a frequently updated image

How can I obtain an HTTP video stream from a single image file that is frequently updated (every 50ms)?

The file is on a Windows 7 machine, I can use C# but I can also send a potential stream to a linux machine.

I would try whith vlc and the fake module, but it seems not more supported. I've tried also with a pipe from ffmpeg (also over an udp localhost stream) but it doesn't work.

Upvotes: 0

Views: 3071

Answers (1)

iangetz
iangetz

Reputation: 512

Try this FFmpeg command. It loops over a single image source and creates a live HLS stream in a directory called 'png2hls'. You can modify the rate, resolution, and quality as needed.

ffmpeg -loop 1 -r 30000/1001 -i image.png -an -s 960x540 -r 30000/1001 -c:v libx264 -crf 10 -maxrate 900k -b:v 900k -profile:v baseline -bufsize 1800k -pix_fmt yuv420p -hls_time 2 -hls_list_size 0 -hls_segment_filename 'png2hls/file%03d.ts' png2hls/index.m3u8

All option definitions should be available here. http://ffmpeg.org/ffmpeg-all.html

Hope that helps.

Ian

Upvotes: 2

Related Questions