Video surveillance using Raspberry Pi and GStreamer + omxh264enc

Maximilian maximilianXP at list.ru
Sun Oct 2 16:12:23 UTC 2016


Hi all,

I'm new to GStreamer. I'd like to record video and audio from a USB Web-cam
and a USB microphone connected to a Raspberry Pi 3. I want to get a series
of video files 1 hour long. Also I want to use hardware encoder to prevent
the Pi's CPU from overheating. For that I'm running the following pipeline
in an endless loop and use CRON to send SIGINT to it once an hour.

gst-launch-1.0 -e v4l2src !
video/x-raw,format=YV12,width=640,height=480,framerate=5/1 \
	! videoconvert ! queue ! videorate ! videoflip method=clockwise \
	! clockoverlay halignment=left valignment=bottom time-format="%Y/%m/%d
%H:%M:%S" font-desc="Sans 24" \
	! omxh264enc target-bitrate=500000 control-rate=variable !
video/x-h264,stream-format=byte-stream,framerate=5/1 ! h264parse ! queue \
	! mux. alsasrc device=plughw:0,0 ! lamemp3enc target=0 bitrate=128
mono=true \
	! queue leaky=2 max-size-buffers=0 max-size-time=0 max-size-bytes=0 \
	! mux. avimux name=mux ! queue ! filesink location=camera`date
-Iseconds`.avi

I have the following problem, the video and audio in the resulting file is
not synchronized. It feels like video is shorter than audio; on a video that
is around 59:58 long I observe the last video frame being frozen when I have
approximately 20 seconds of audio remaining.

Any suggestions on how to fix or tune the pipeline are welcome. Thank you.

PS: Raspbian Jessie, GStreamer Verison 1.4.4, libgstomx.so Version 1.0.0.1

--
Regards,
Maximilian



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Video-surveillance-using-Raspberry-Pi-and-GStreamer-omxh264enc-tp4679912.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list