[FFmpeg-user] Add soft subtitles to YouTube Stream Now?

Moritz Barsnick barsnick at gmx.net
Wed Nov 20 15:11:54 EET 2019


On Tue, Nov 19, 2019 at 22:45:44 -0600, Steven Kan wrote:
> First time poster, so please be kind if I ask anything stupid!

Not at all!

> I have a live BeeCam feed on YouTube:
> https://www.youtube.com/channel/UCE0jx2Z6qbc5Co8x8Kyisag/live <https://www.youtube.com/channel/UCE0jx2Z6qbc5Co8x8Kyisag/live>

Cure mice, if I may say so. (You're actually trying to show bees,
right? I caught a glimpse of a mouse though.)

> The -t and playlist.txt are because my camera lacks and audio feed,
> and YT requires an audio stream, so I have a collection of
> royalty-free mp3s in the playlist, and I’m wrapping this command in a
> loop.

In my experience, you can also provide an empty audio stream. It only
needs to be of a certain rate, and stereo, IIRC. But your solution
seems fine.

> What I want to do is add some captions to the video as soft
> subtitles, e.g. my location, the present temperature, and the weather
> forecast. I don’t have enough CPU on the Pi to burn these into the
> video stream.
>
> Is this possible in ffmpeg and with YouTube’s “stream now” feature?

Check this page:
https://support.google.com/youtube/answer/3068031?hl=en

YouTube currently only accepts FLV streams, and subtitles only as EIA
608/708 captions. As far as I can tell, ffmpeg is currently not capable
of creating or embedding these captions.

There's an enhancement request for muxing support:
https://trac.ffmpeg.org/ticket/1778#comment:10

> Subtitle codec 'ass' for stream 2 is not compatible with FLV

ffmpeg's FLV muxer only accepts "id_text" ("Raw text subtitle") subs,
whatever that is.

I see some indications that Open Broadcast Encoder can create 608
captions, but I haven't found more info.

Hope this helps,
Moritz


More information about the ffmpeg-user mailing list