Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

godspeed1989 godspeed1989

🎯
Focusing
View GitHub Profile
@godspeed1989
godspeed1989 / pi_streaming_video.md
Last active Jun 19, 2018
raspberry pi ffmepg streaming video
View pi_streaming_video.md
/opt/vc/bin/raspivid -o - -t 0 -n -w 600 -h 400 -fps 12 | cvlc -vvv stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554/}' :demux=h264 -no-audio --clock-jitter=0 --sout-transcode-hurry-up --drop-late-frames --avcodec-hw=any
rtsp://###.###.###.###:8554/

/etc/ffserver.conf

Port 80
BindAddress 0.0.0.0
@godspeed1989
godspeed1989 / fstab
Created May 16, 2013
/etc/fstab example
View fstab
#<file system> <mount-point> <type> <options> <dump> <pass>
/dev/root / auto defaults,errors=remount-ro 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
tmpfs /tmp tmpfs defaults 0 0
sysfs /sys sysfs auto 0 0
@godspeed1989
godspeed1989 / gist:5590281
Last active Dec 17, 2015
/etc/init.d/rcS
View gist:5590281
#!/bin/sh
echo "Starting rcS..."
echo "++ Mounting filesystem"
mount tmpfs /dev -t tmpfs
mount proc /proc -t proc
mount sysfs /sys -t sysfs
mkdir -p /dev/pts
mkdir -p /dev/i2c
View colours.txt
BEIGE 米黄色
Red 248
Green 243
Blue 209
#F8F3D1
Green bean
Red 199
Green 237
Blue 204
View digilent-zed.dts
/dts-v1/;
/ {
model = "Xilinx Zynq ZED";
compatible = "xlnx,zynq-zed";
#address-cells = <0x1>;
#size-cells = <0x1>;
interrupt-parent = <&gic>;
ps7_ddr_0: memory@0 {
@godspeed1989
godspeed1989 / xilinx.rules
Created May 2, 2013
xilinx zynq udev rules file
View xilinx.rules
SUBSYSTEM=="usb", ACTION=="add", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6014", GROUP="user", MODE="0777"
SUBSYSTEM=="usb", ACTION=="add", ATTRS{idVendor}=="04b4", ATTRS{idProduct}=="0008", GROUP="user", MODE="0777"
@godspeed1989
godspeed1989 / FPS.cpp
Last active Dec 15, 2015
printf FPS in opencv
View FPS.cpp
cv::VideoCapture cap(0); // open the default camera
if(!cap.isOpened()) // check if we succeeded
{
printf("Camera open error.\n");
return -1;
}
char strfps[64] = "0 fps";
clock_t start = clock();
unsigned int fps = 0;
for(;;)
You can’t perform that action at this time.