1

I have raspberry pi 3b+ with Arducam camera and Debian Bullseye, and I would like to achieve the following:

  • get video from libcamera-vid, 800x600, 15 fps
  • get audio from default audio source
  • stream video to youtube live
  • save video to folderr /mnt/smb so that the file name contains timestamp including seconds
  • start new video every 24 hours

The following command streams video to Youtube:

libcamera-vid --inline --nopreview -t 0 --width 800 --height 600 --framerate 15 --codec h264 -o - | ffmpeg -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=44100 -thread_queue_size 1024 -use_wallclock_as_timestamps 1 -i pipe:0 -c:v copy -c:a aac -preset fast -strict experimental -f flv "$YOUTUBE_SERVER_URL$YOUTUBE_KEY"

Also saving video to file is easy with ffmpeg, but I have not been able to do both at the same time. I have tried to split the streams using tee and also looked into liquid soap, but so far no success. GStreamer might also be an option but I'm not sure can it even work with libcamera-vid.

0

You must log in to answer this question.

Browse other questions tagged .