Skip to content

Stream a Static Image as Live Video with FFmpeg

In this example we will create a video stream that continuously streams a static file (for example, a calibration image).

  1. Start adding a new profile and specify its name.

  2. Next, in the profile command use:

    Terminal window
    ffmpeg -re -stream_loop -1 -i ${i} -vcodec mpeg4 -aspect 16:9 -f mpegts ${o}

    Add profile for streaming static images

  3. Save the profile

You will see the new profile in the profiles list. Profile should be added to the list

Next, you can add this profile to the stream. Set input and output parameters. In this example, we download a ts-file to the server and specify the path in the input field (see working with files to detales), then set udp-stream as the output.

Use new profile in stream

You can now see result in VLC!

  • -re reads the file at its own speed instead of as fast as possible, so the output behaves like a live source.
  • -stream_loop -1 starts the file over every time it ends, forever.
  • -vcodec mpeg4 -aspect 16:9 encodes the video as MPEG-4 with a 16:9 aspect ratio, and -f mpegts wraps it in MPEG-TS for ${o}.

In the Streams table the stream has a green status indicator (a stream that isn’t running has a grey one). Click the log link in its row: the full ffmpeg log of the current session is at the bottom of the page, and the progress lines (frame=, fps=, bitrate=) keep growing while the stream runs. If the stream stops, the session report shows the last 100 log lines. See Stream logs.

  • A wrong or unreachable input path. The file browser works only after Display file system is turned on in Settings, and the user that runs Senta must be able to read the file. See Working with Files.
  • The destination port is already used by another process. Open the stream log to see ffmpeg’s error.