Skip to content

Instantly share code, notes, and snippets.

View michaelgruner's full-sized avatar
🎯
Focusing

Michael Grüner michaelgruner

🎯
Focusing
View GitHub Profile
/*
* gcc gstoddsrc.c `pkg-config --cflags --libs gstreamer-1.0 gstreamer-base-1.0 gstreamer-video-1.0` -shared -o gstoddsrc.so
*
* GST_DEBUG=2 gst-launch-1.0 oddsrc ! video/x-raw,format=BGR,width=321,height=240 ! videoconvert ! autovideosink
*
*
*/
#include <gst/gst.h>
#include <gst/base/gstpushsrc.h>
#include <gst/video/video.h>
@michaelgruner
michaelgruner / timestamp_overlay_video.py
Created November 6, 2021 17:20
Create a video with frame number and timestamp overlayed.
#!/usr/bin/env python3
import gi
gi.require_version('Gst', '1.0')
gi.require_version('GLib', '2.0')
from gi.repository import Gst, GLib
FILE="/tmp/test.mp4"
# Copyright (C) 2018 RidgeRun, LLC (http://www.ridgerun.com)
# All Rights Reserved.
#
# The contents of this software are proprietary and confidential to RidgeRun,
# LLC. No part of this program may be photocopied, reproduced or translated
# into another programming language without prior written consent of
# RidgeRun, LLC. The user is free to modify the source code after obtaining
# a software license from RidgeRun. All source code changes must be provided
# back to RidgeRun without any encumbrance.
#