Awesome works really well! video is a huge topic to get to grips with.Hi, generally my advice is that raw H.264 bitstreams are not very well supported. Because there's no explicit encapsulation it's hard for applications to know exactly what's there. I have had much more luck using a better supported format, like an MPEG2 Transport Stream.
So I would try this:Code:
rpicam-vid -t 10000 --codec libav --libav-format mpegts -o - | ffmpeg -f mpegts -i - -movflags faststart -f mp4 output.mp4
As a follow up I had previously been trying "-t 0" and "--signal" for recording video with unknown length when starting the process, killing it (with "SIGUSR2") after a duration if motion is no longer detected.
If I am killing the initial process that is piped to ffmpeg will this break the pipe or just pass whatever has been recorded so far to ffmpeg? Will try and test myself but am away currently.
Statistics: Posted by huggyb — Sun Mar 02, 2025 4:39 pm