Skip to content

Instantly share code, notes, and snippets.

@autch
Last active February 17, 2017 09:59
Show Gist options
  • Save autch/1807c314048e0ca9e89c24631051d97e to your computer and use it in GitHub Desktop.
Save autch/1807c314048e0ca9e89c24631051d97e to your computer and use it in GitHub Desktop.
Recording webcam video by Raspberry Pi, using HW-accel. H.264 encoder
#!/bin/sh
gst-launch-1.0 -qe v4l2src ! \
videorate ! \
video/x-raw,width=320,height=240,framerate=30/1 ! \
clockoverlay time-format="%m/%d %H:%M:%S" shaded-background=true font-desc="Sans 24px" ! \
omxh264enc target-bitrate=320000 control-rate=variable ! \
video/x-h264,profile=baseline ! \
h264parse ! \
mp4mux ! \
filesink location=out.m4v
#!/bin/sh
gst-launch-1.0 -e v4l2src ! \
videorate ! \
video/x-raw,width=1280,height=720,framerate=30/1 ! \
omxh264enc target-bitrate=8000000 control-rate=variable ! \
video/x-h264,profile=high ! \
h264parse ! \
mpegtsmux ! \
filesink location=out.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment