Skip to content

Instantly share code, notes, and snippets.

View mariotpc's full-sized avatar
🎯
Focusing

Mario Enrique Lopez Guzman mariotpc

🎯
Focusing
View GitHub Profile
@mariotpc
mariotpc / Matroska - VAAPI H265 with AC3 Audio and VAAPI H264 with AAC Audio encoders
Last active October 26, 2020 17:33
Matroska - VAAPI H265 with AC3 Audio and VAAPI H264 with AAC Audio encoders
gst-launch-1.0 ximagesrc use-damage=0 xid=$(xwininfo -tree | egrep 'Window id:' | cut -d ' ' -f4) ! queue ! videoconvert ! video/x-raw, format=I420 ! vaapih265enc ! matroskamux name=mux ! filesink location=/mnt/ramdisk/reunion2610.mkv pulsesrc device=alsa_output.pci-0000_00_1f.3.hdmi-stereo-extra1.monitor ! queue max-size-time=5000000000 max-size-buffers=10000 ! audio/x-raw, rate=32000, channels=2 ! avenc_ac3 bitrate=32000 ! mux.
gst-launch-1.0 ximagesrc use-damage=0 xid=$(xwininfo -tree | egrep 'Window id:' | cut -d ' ' -f4) ! queue ! videoconvert ! video/x-raw, format=I420 ! vaapih264enc ! matroskamux name=mux ! filesink location=/mnt/ramdisk/reunion2610.mkv pulsesrc device=alsa_output.pci-0000_00_1f.3.hdmi-stereo-extra1.monitor ! queue max-size-time=5000000000 max-size-buffers=10000 ! audio/x-raw, rate=32000, channels=2 ! avenc_aac bitrate=32000 ! mux.
First:
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.or
@mariotpc
mariotpc / H265 Video Encoder
Created October 23, 2020 00:44
H265 Video Encoder
gst-launch-1.0 ximagesrc use-damage=0 xid=$(xwininfo -tree | egrep 'Window id:' | cut -d ' ' -f4) ! videoconvert ! video/x-raw, format=I420 ! queue ! x265enc ! queue ! h265parse ! queue ! mpegtsmux name=mux ! filesink location=/mnt/ramdisk/custom27.21.10.20.h265
@mariotpc
mariotpc / Play Matroska Container - MPEG H.264 + AC3 ( Mic + HDMI Monitor )
Created October 22, 2020 17:42
Play Matroska Container - MPEG H.264 + AC3 ( Mic + HDMI Monitor )
gst-launch-1.0 filesrc location=revision.20.10.20.mkv ! matroskademux name=demux demux. ! queue ! h264parse ! avdec_h264 ! videoconvert ! glimagesink demux. ! queue ! ac3parse ! avdec_ac3 ! audioconvert ! alsasink
/*****************************/
/ ClockOverlay
/*****************************/
gst-launch-1.0 filesrc location=revision.20.10.20.mkv ! matroskademux name=demux demux. ! queue ! h264parse ! avdec_h264 ! videoconvert ! clockoverlay ! glimagesink demux. ! queue ! ac3parse ! avdec_ac3 ! audioconvert ! alsasink
@mariotpc
mariotpc / Matroska Container - MPEG H.264 + AC3 ( Mic + HDMI Monitor )
Last active October 19, 2020 22:38
Matroska Container - MPEG H.264 + AC3 ( Mic + HDMI Monitor )
Video ----- SOUND + HDMI Monitor
******************************************************************
gst-launch-1.0 ximagesrc use-damage=0 xid=$(xwininfo -tree | egrep 'Window id:' | cut -d ' ' -f4) ! queue ! videoconvert ! x264enc b-adapt="true" ! matroskamux name=mux ! filesink location=/mnt/ramdisk/terminal.mkv pulsesrc device=alsa_output.pci-0000_00_1f.3.analog-stereo.monitor ! queue max-size-time=5000000000 max-size-buffers=10000 ! audio/x-raw, rate=32000, channels=2 ! avenc_ac3 bitrate=32000 ! mux.
Video -----AUDIO MIX ---- Microphone + HDMI Monitor
******************************************************************
gst-launch-1.0 ximagesrc use-damage=0 xid=$(xwininfo -tree | egrep 'Window id:' | cut -d ' ' -f4) ! queue ! videoconvert ! x264enc b-adapt="true" ! matroskamux name=mux ! filesink location=/mnt/ramdisk/test01.19.10.20.mkv pulsesrc device=alsa_output.pci-0000_00_1f.3.analog-stereo.monitor ! queue max-size-time=5000000000 max-size-buffers=10000 ! audio/x-raw, rate=32000, channels=2 ! avenc_ac
@mariotpc
mariotpc / Container Matroska - Movie Desktop Window + Alsa Source Audio
Created October 19, 2020 05:47
Container Matroska - Movie Desktop Window + Alsa Source Audio
gst-launch-1.0 ximagesrc use-damage=0 xid=$(xwininfo -tree | egrep 'Window id:' | cut -d ' ' -f4) ! queue ! videoconvert ! x264enc b-adapt="true" ! matroskamux name=mux ! filesink location=/mnt/ramdisk/terminal.mkv pulsesrc device=alsa_output.pci-0000_00_1f.3.analog-stereo.monitor ! queue max-size-time=5000000000 max-size-buffers=10000 ! audio/x-raw, rate=32000, channels=2 ! avenc_ac3 bitrate=32000 ! mux.
@mariotpc
mariotpc / gstreamer tests
Last active October 15, 2020 16:53
gstreamer tests
gst-launch-1.0 -v videotestsrc ! queue ! ximagesink
gst-launch-1.0 -v videotestsrc ! navigationtest ! videoconvert ! ximagesink
gst-launch-1.0 ximagesrc ! video/x-raw,framerate=5/1 ! videoconvert ! theoraenc ! oggmux ! filesink location=desktop.ogg
#streaming file.ogg to UDP
gst-launch-1.0 filesrc location=big_buck_bunny_720p_stereo.ogg ! oggdemux name=demux mpegtsmux name=mux alignment=7 ! udpsink host=192.168.1.12 port=5000 buffer-size=10000000 demux. ! theoradec ! x264enc ! mux. demux. ! queue max-size-time=5000000000 max-size-buffers=10000 ! vorbisdec ! avenc_aac compliance=-2 ! mux.
gst-launch-1.0 filesrc location=big_buck_bunny_720p_stereo.ogg ! oggdemux name=demux mpegtsmux name=mux alignment=7 ! udpsink host=192.168.1.12 port=5000 buffer-size=10000000 demux. ! theoradec ! x264enc ! mux. demux. ! queue max-size-time=5000000000 max-size-buffers=10000 ! vorbisdec ! avenc_aac ! mux.
#Audio
@mariotpc
mariotpc / Creating the root file system to use with Kernel 4.9.13-MarioTPC
Last active August 28, 2020 02:06
Creating the root file system to use with Kernel 4.9.13-MarioTPC
[mariotpc@fedora31 boot]$ ls
bootp compressed dts Image install.sh Makefile zImage
1.- Create the rootfs
*********************************************************************************
[mariotpc@fedora31 boot]$ mkdir ~/rootfs
[mariotpc@fedora31 boot]$ cd ~/rootfs
[mariotpc@fedora31 rootfs]$ mkdir bin dev etc home lib proc sbin sys tmp usr var
[mariotpc@fedora31 rootfs]$ mkdir usr/bin usr/lib usr/sbin
[mariotpc@fedora31 rootfs]$ mkdir -p var/log
@mariotpc
mariotpc / Creating the root file system to use with Kernel 4.19.13-MarioTPC
Last active August 25, 2020 00:50
Creating the root file system to use with Kernel 4.9.13-MarioTPC
[mariotpc@fedora31 boot]$ ls
bootp compressed dts Image install.sh Makefile zImage
[mariotpc@fedora31 boot]$ mkdir ~/rootfs
[mariotpc@fedora31 boot]$ cd ~/rootfs
[mariotpc@fedora31 rootfs]$ mkdir bin dev etc home lib proc sbin sys tmp usr var
[mariotpc@fedora31 rootfs]$ mkdir usr/bin usr/lib usr/sbin
[mariotpc@fedora31 rootfs]$ mkdir -p var/log
[mariotpc@fedora31 rootfs]$ ls
bin dev etc home lib proc sbin sys tmp usr var
@mariotpc
mariotpc / Building my own filesystem to use with embedded kernel
Last active August 23, 2020 01:43
Building my own filesystem to use with embedded kernel
This is the 4th and final step to build a working embedded system
1.- Toolchain
2.- Bootloader
3.- Kernel
4.- Root filesystem
Root Filesystem
**************************
@mariotpc
mariotpc / Booting the Kernel 4.9.13-MarioTPC on QEmu
Last active August 23, 2020 01:20
Booting the Kernel 4.9.13-MarioTPC on QEmu
At this point I've the Kernel and the DTBS for ARM Boards and QEmu previously created
********************************************************************************************
qemu-system-arm -m 256M -nographic -M vexpress-a9 -kernel zImage -append "console=ttyAMA0,115200" -dtb ./dts/vexpress-v2p-ca9.dtb
Here we go !!!!
********************************
mariotpc@fedora31 boot]$ qemu-system-arm -m 256M -nographic -M vexpress-a9 -kernel zImage -append "console=ttyAMA0,115200" -dtb ./dts/vexpress-v2p-ca9.dtb
pulseaudio: set_sink_input_volume() failed
pulseaudio: Reason: Invalid argument
pulseaudio: set_sink_input_mute() failed