[FFmpeg-user] Add soft subtitles to YouTube Stream Now?
mikeshaffer at gmail.com
Wed Nov 20 18:11:57 EET 2019
I noticed your Youtube streams only last a day or so. I have a Python
script I made that keeps the ffmpeg process sending to Youtube. I have 5 IP
cameras going to youtube and they have been going about 9 months without
the stream ending. Anyways, if you want I could show you how the script
works. You would just have to change the stream keys and the bitrate that
each camera uses, so it knows when to restart the stream.
On Wed, Nov 20, 2019 at 12:17 AM Steven Kan <steven at kan.org> wrote:
> First time poster, so please be kind if I ask anything stupid!
> I have a live BeeCam feed on YouTube:
> https://www.youtube.com/channel/UCE0jx2Z6qbc5Co8x8Kyisag/live <
> using YouTube’s “Stream Now” feature, which is distinct from a streaming
> “event” because I don’t have to schedule it. Whenever I’m pushing video to
> YouTube, the channel goes live.
> The stream is supplied by a Raspberry Pi running as an ffmpeg “relay
> server,” e.g. it’s not doing any transcoding; it’s just repacking an RTSP
> stream from an off-the-shelf camera:
> ./ffmpeg -re -thread_queue_size 512 -rtsp_transport tcp -i "rtsp://
> anonymous:password at 192.168.1.11:554" -f concat -safe 0 -i playlist.txt
> -vcodec copy -acodec copy -t 01:47:02 -f flv "rtmp://
> 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.
> When I run this on my RPi 2, CPU utilization for ffmpeg is <<<<10%, which
> is what I want, because I will have up to 3 instances of ffmpeg pushing 3
> camera streams to 3 YT channels during honey bee swarm season in Spring.
> 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?
> I can get ffmpeg to put a soft subtitle into a local .mkv file:
> ./ffmpeg -i video.mp4" -i SubtitleTest.srt -acodec copy -scodec copy
> but I changing the output to .m4v, mp4, or .flv results in errors such as:
> Subtitle codec 'ass' for stream 2 is not compatible with FLV
> and pushing mkv to YouTube via:
> ./ffmpeg -i video.mp4" -acodec copy -f mkv "rtmp://
> Requested output format 'mkv' is not a suitable output format
> rtmp://a.rtmp.youtube.com/live2/my-youtube-streaming-key <rtmp://
> Am I doing this fundamentally wrong? Or is this just not possible? If it’s
> possible I will continue reading documentation until I get it working!!!
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-user