Is it possible to record the video to an SD Card on Pi computer. Desire is to use as drop camera recording video without tether / live streaming to Ground Control Computer?
This is possible, but not trivial to get right. you can change the gstreamer pipeline to add a filesink. It should look like something like this:
! h264parse
! queue
! "video/x-h264, format=byte-stream"
! filesink location=/home/pi/test.h264
This way it will always write to the same file, overwriting it. And this may not be playable in every player.
There is also this alternative, which packs the video into an mp4 container:
! h264parse
! queue
! mp4mux ! filesink location=/home/pi/test.mp4
Let me know if this works for you.
Thanks for the quick reply at least confirming it can be done assuming one with skill required to modify code can help me on this if we go down this road. Differnt options for drop cameras are being investigated so this will be added for consideration. One other quick question. Is there a limit to the capacity of SD card we can use in the pi computer?
You can take a look here. Some 128gb sd cards seem to work.
But I would just add an external USB flash drive instead. This is also a more practical way to get the video later.
Yes much easier to rerieve USB drive. Thanks again.
Hi Doug,
Just pointing to take a look in the tee gstreamer plugin, that will allow you to split data to multiple pads, like in your case, saving the video to a file while streaming via UDP.
hai willian
this is saving a file as test.mp4 . i just transfered that file to a pendrive and found it is not playable in VLC
what would be the problem?
Hi,
That is hard to tell without knowing exactly what is your camera and gstreamer pipeline, you can use ffprobe
(part of ffmpeg) to have an idea of what is wrong with the file.
Alternatively, you can try to convert it using ffmpeg with ffmpeg -i test.mp4 -crf 23 output.mp4
(where the crf parameter is the quality, 0 = lossless, 51 = worst).