cmd/vidforward: write functionality to send slate as h264 down revid for an RTMP endpoint

Issue #379 resolved
Saxon Milton created an issue

To enable persistent broadcasts, we’d like to be able to send h264 still images to RTMP endpoints for cameras that are down, either because it’s nighttime or for maintenance/problems etc. Initially for prototyping, we’ll provide a raw .h264 file representation of the image in our binary directory that we’ll load and continually write to the pipeline (eventually we can use the control API to send the image through vidgrind; this will be nice for non engineers that want to update the slate). We’ll have to modify how we configure vidforward with “active broadcast” information as there’ll now be 3 possible states i.e. active, slate or inactive. It might be worth sorting the control API before we do this; over using the current variable based configuration mechanism.

Side note, we can use ffmpeg to generate our h264 from an image.

No audio (-t 10 means 10 second duration):

ffmpeg -loop 1 -framerate 24 -i input.jpg -c:v libx264 -preset slow -tune stillimage -crf 24 -vf format=yuv420p -t 10 -movflags +faststart output.mp4

With audio (I think the “-shortest” flag makes this as long as the audio is):

ffmpeg -loop 1 -framerate 24 -i input.jpg -i audio.mp3 -c:v libx264 -preset slow -tune stillimage -crf 24 -vf format=yuv420p -c:a aac -shortest -movflags +faststart output.mp4

Vidforward Design Doc

Comments (2)

  1. Log in to comment