Skip to content

Instantly share code, notes, and snippets.

View atlury's full-sized avatar
💭
Working

Rahul Atlury atlury

💭
Working
View GitHub Profile
@atlury
atlury / build-orangepipc-gentoo.py
Created April 7, 2016 12:05 — forked from atx/build-orangepipc-gentoo.py
Script for building a Gentoo image for the Allwinner H3, use at your own risk
#! /bin/bash
# This script builds a Gentoo image for the Allwinner H3
# Based on http://linux-sunxi.org/H3_Manual_build_howto
# Tested on Orange Pi PC
set -e
function green {
echo -e '\033[0;32m'$@'\033[0m'
U-Boot SPL 2015.10-00058-g8034408 (Oct 21 2015 - 13:48:20)
DRAM: 1024 MiB
Failed to set core voltage! Can't set CPU frequency
U-Boot 2015.10-00058-g8034408 (Oct 21 2015 - 13:48:20 +0200) Allwinner Technology
CPU: Allwinner H3 (SUN8I)
DRAM: 1 GiB
MMC: SUNXI SD/MMC: 0
@atlury
atlury / BeagleBoneLinuxUBootFromScratch.md
Created April 9, 2016 10:57 — forked from eepp/BeagleBoneLinuxUBootFromScratch.md
Building U-Boot and Linux 3.11 from scratch for the BeagleBone, and booting

Building U-Boot and Linux 3.11 from scratch for the BeagleBone, and booting

BeagleBone image

Introduction

@atlury
atlury / sideBySide.sh
Created May 1, 2016 09:47 — forked from jetsonhacks/sideBySide.sh
Gstreamer two MJPG Webcams
#!/bin/sh
# Run two video webcam feeds in two different windows
# Script assumes that:
# Microsoft LifeCam Studio is video0
# Logitech c920 is video1
# Both cameras run max 1920x1080 MJPG, but two have both on a USB bus they can run @ 1280x720 max
# MS is made a little smaller
# text overlay and clockoverlay may be added to the pipeline, but render poorly
VELEM="v4l2src device=/dev/video0 do-timestamp=true"
VCAPS="image/jpeg, width=640, height=480, framerate=30/1"
gst-launch-1.0 \
v4l2src device=/dev/video1 ! video/x-raw,width=864,height=480 ! videoconvert ! \
clockoverlay shaded-background=true time-format="%H:%M:%S" ! vp8enc ! tee name=videoTee \
pulsesrc ! vorbisenc ! tee name=audioTee \
webmmux name=streamMux ! shout2send ip=IP port=PORT password=PASSWORD mount=/tuna.webm \
webmmux name=fileMux ! filesink location=tuna.webm \
audioTee. ! queue ! streamMux.audio_0 \
videoTee. ! queue ! streamMux.video_0 \
audioTee. ! queue ! fileMux.audio_0 \
videoTee. ! queue ! fileMux.video_0
@atlury
atlury / GStreamer-capture-to-images-with-timestamp-RAW_YUV.sh
Created May 1, 2016 09:52 — forked from pavelvpster/GStreamer-capture-to-images-with-timestamp-RAW_YUV.sh
GStreamer capture webcam to image set with timespamp; webcam does not support JPEG output format.
gst-launch-0.10 v4l2src device=/dev/video0 \
! "video/x-raw-yuv,width=640,height=480,framerate=5/1" \
! videorate \
! "video/x-raw-yuv,framerate=1/6" \
! clockoverlay time-format="%d.%m.%Y %H:%M:%S" \
! jpegenc \
! multifilesink location="./images/image-%06d.jpg"
@atlury
atlury / GStreamer-capture-to-images-with-timestamp-JPEG.sh
Created May 1, 2016 10:20 — forked from pavelvpster/GStreamer-capture-to-images-with-timestamp-JPEG.sh
GStreamer capture webcam to image set with timespamp; webcam supports JPEG output format.
gst-launch-0.10 v4l2src device=/dev/video0 \
! "image/jpeg,width=640,height=480,framerate=5/1" \
! videorate \
! "image/jpeg,framerate=1/6" \
! jpegdec \
! clockoverlay time-format="%d.%m.%Y %H:%M:%S" \
! jpegenc \
! multifilesink location="./images/image-%06d.jpg"
@atlury
atlury / ffmpeg-cedrus-264.patch
Created May 14, 2016 05:28 — forked from mklooss/ffmpeg-cedrus-264.patch
Thanks @https://github.com/stulluk/FFmpeg-Cedrus-2-sunxi/ and @https://github.com/jemk/cedrus
diff -N -u -r ffmpeg-2.8.4.orig/libavcodec/allcodecs.c ffmpeg-2.8.4/libavcodec/allcodecs.c
--- ffmpeg-2.8.4.orig/libavcodec/allcodecs.c 2015-12-20 03:07:43.000000000 +0100
+++ ffmpeg-2.8.4/libavcodec/allcodecs.c 2016-01-14 13:09:11.000000000 +0100
@@ -580,6 +580,7 @@
REGISTER_ENCODER(LIBXVID, libxvid);
REGISTER_DECODER(LIBZVBI_TELETEXT, libzvbi_teletext);
REGISTER_ENCODER(LIBAACPLUS, libaacplus);
+ REGISTER_ENCODER(CEDRUS264, cedrus264);
/* text */
@atlury
atlury / ubilinux-flashall-osx.diff
Created May 24, 2016 10:21 — forked from ximus/ubilinux-flashall-osx.diff
get flashall.sh to work on osx
--- flashall.sh
+++ (clipboard)
@@ -220,15 +220,14 @@
flash-command --alt u-boot-env0 -D "${VARIANT_FILE}"
echo "Flashing U-Boot Environment Backup"
- flash-command --alt u-boot-env1 -D "${VARIANT_FILE}" -R
+ flash-command --alt u-boot-env1 -D "${VARIANT_FILE}"
echo "Rebooting to apply partition changes"
- dfu-wait no-prompt
set timeout=10
set default=0
menuentry "Alpine Linux Mini 3.0.6" {
set iso_file="/iso/alpine/mini306.iso"
loopback loop $iso_file
set root=(loop)
linux /boot/grsec alpine_dev=usbdisk:vfat init=/sbin/init loop=/grsec.modloop.squashfs modules=loop,squashfs,sd-mod,usb-storage
initrd /boot/grsec.gz
}