Streaming "subtitles/text" using ffmpeg and ffserver

1k views Asked by At

Is it possible for FFmpeg (and ffserver) to stream text data? The use case scenario is that video and text data would be streamed separately via ffserver. The clients can then view only the video stream or they can combine both video stream and text data (as overlay) using ffmpeg.

I have tried to read the documentations and have done experimentation myself. I was able to demonstrate to a customer that overlays can be added via "drawtext" filters. However, it has been turned down. They want to have the text data streamed separately and multiplexed in the client when desired.

Has anyone done something similar to this?

1

There are 1 answers

0
QA Collective On

ffserver is shortly going to be removed from the ffmpeg suite.

It may be hard to find something 'out of the box' that streams text only, because that's such a simple thing to do by itself with many programming languages now days.

However, I understand your requirement - you want to stream text and video and allow a choice of which text to be used on the client's end.

This was my use case, and after three long hard days, I found a way to do this with VLC.

VLC has a GUI to set up a streaming server, but of course can also be used at the command line. I finally found the command that worked for me was:

cvlc -v /host/home/user/file.ts --sout-all --no-ts-split-es --sout "#duplicate{dst=udp{dst=MachineName:1234}}"

I'm sharing this in the hope that I'll save some others the time it took me to find the all important '--no-ts-split-es' option!