Skip to content

Instantly share code, notes, and snippets.

View mrayy's full-sized avatar

Yamen Saraiji mrayy

View GitHub Profile
@mrayy
mrayy / videoconvertor.sh
Created June 5, 2017 05:17
Script to reduce video file size
#install gstreamer: gstreamer.freedesktop.org/data/pkg/
#Usage: ./videoconvertor.sh input.mp4 output.mp4 bitrate speedpreset
#bitrate: in bps, for example 2000 (2Mbps)
#speedpreset: veryslow/slower/slow/medium/fast/faster/veryfast/superfast/ultrafast
FileIn=$1
FileOut=$2
Bitrate=$3
#!/bin/bash
# play YUV444 FULL HD file
gst-launch-1.0 -v filesrc location=size_1920x1080.yuv ! \
videoparse width=1920 height=1080 framerate=25/1 format=GST_VIDEO_FORMAT_Y444 ! \
videoconvert ! \
autovideosink
# play YUV422 FULL HD file
gst-launch-1.0 -v filesrc location=size_1920x1080.yuv ! \