Coder Social home page Coder Social logo

gstreamer's Introduction

gstreamer

Dependencies


To install Install GStreamer on Debian/Ubuntu
sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio
To install GStreamer on Fedora
sudo dnf install gstreamer1-devel gstreamer1-plugins-base-tools gstreamer1-doc gstreamer1-plugins-base-devel gstreamer1-plugins-good gstreamer1-plugins-good-extras gstreamer1-plugins-ugly gstreamer1-plugins-bad-free gstreamer1-plugins-bad-free-devel gstreamer1-plugins-bad-free-extras
For ArchLinux and Manjaro
sudo pacman -S gstreamer gst-plugins-{base,good,bad,ugly} python python-gobject
For windows

Follow the official docs But i woud recommend following this docs.rocos.io/prod/docs/gstreamer-on-windows

Usage


How to run:

git clone https://github.com/Ujjwal-Shekhawat/gstreamer
cd gstreamer
python3 main.py --help

CLI


python3 main.py -h gives information about avalable cli options

usage: main.py [-h] -f  -o  [-fl ] [-r ] [-px ] [-py ] [-sx ] [-sy ]

Gstreamer pipeline

options:
  -h, --help            show this help message and exit
  -f , --inputfile      Input file path
  -o , --overlay        Overlay file path
  -fl [], --filter []   Filter to apply
  -r [], --rotation []  Rotatioon of the file. Range (0 - 1) is in Radians
  -px [], --positionx []
                        X Position of the overlay releative to the input file (range 0 - 1)
  -py [], --positiony []
                        Y Position of the overlay releative to the input file (range 0 - 1)
  -sx [], --scalex []   Set the scale of the overlay
  -sy [], --scaley []   Set the scale of the overlay

Examples


An example to overlay an image on top of a video and apply a filter on the video

python3 main.py -f /path/to/vid.ogg -o /path/to/overlay.jpg -fl frei0r-filter-emboss

The above command takes an ogg video format input file and an image format overlay file. It overlays the image on the video and applies the frei0r-filter-emboss filter and then it writes the output as an video.mp4.

Another example which takes two image format imputs and overlays one on top of the other and writes the output on image.{jpg,png}

python3 main.py -f /path/to/image -o /path/to/overlayimage -sx 0.5 -sy 0.5

The above command takes two image format inputs and overlays one on top of the other.

-sx 0.5 sets the x-position of the overlay to the center position releative to the imput image width.

-sy 0.5 sets the y-position of the overlay to the center position releative to the input image height.

Sample output


Image example

command: python3 main.py -f 1.jpg -o 1.png

Image 1 Image 2
alt text alt text

Output Image alt text

gstreamer's People

Contributors

ujjwal-shekhawat avatar

Watchers

 avatar

Forkers

svk014

gstreamer's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.