Yes.Does Python for Raspberry Pi support Libcamera-vid? If so, perhaps this:
And that code - apart from the conversion from .h264 to .mp4 - gives your required output.
The conversion isn't respecting the framerate - so the mp4 files, and hence the merged file, - play at a very high, undefined framerate.
I'm sure there are libcamera-vid (--save-pts ?) and/or ffmpeg incantations that will allow a faithful framerate conversion, but a possible alternative is to request libcamera-vid to output direct to mp4. (Which it can do on a Pi5).
Testing that change:- to ask libcamera-vid -o to output to *.mp4, and skipping the now unnecessary conversion step, the rest of the code works as intended.
Statistics: Posted by sandyol — Fri Sep 27, 2024 9:47 pm