-
Notifications
You must be signed in to change notification settings - Fork 29
Description
Hello Andy,
Hope you can point me in the right direction with this..
I'm trying to accomplish two things at the same time with the raspberry pi camera;
- creating an HLS live stream
- take regular interval jpg snapshots
Running the HLS stream on its self works great with raspivid, psips and ffmpeg, thanks!
So, because accessing the camera with raspistill is not possible while HLS is streaming, I first copy the real device to a virtual one using v4l2loopback by running:
ffmpeg -f video4linux2 -video_size 1280x720 -r 24 -input_format h264 -i /dev/video0 -vcodec rawvideo -f v4l2 /dev/video1
In a new terminal I'm then trying to create the HLS stream from the virtual device like this:
ffmpeg -i /dev/video1 -r 24 -f h264 - | /root/psips | ffmpeg -loglevel 2 -y -analyzeduration 10M -i - -c:v copy -hls_time 5 -hls_list_size 10 -hls_wrap 20 "var/www/stream.m3u8"
This results in ffmpeg producing a bunch of 'Past duration 0.xxxxx too large" errors and psips exiting with a 'SPS/PPS overrun!' warning.
I don't suspect it's an psips issue, so sorry to ask here, but hopefully you can shine a light on what I might be doing wrong?
I really appreciate any help you can provide,
Erik