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 |
On Sun, 2016-10-02 at 09:12 -0700, Maximilian wrote:
> 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. that every hour or other time interval, and also ensures that synchronization stays correct. It's exactly for use cases like yours It's only available since GStreamer 1.8 though. -- Sebastian Dröge, Centricular Ltd · http://www.centricular.com _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel signature.asc (949 bytes) Download Attachment |
Free forum by Nabble | Edit this page |