Skip to content

Instantly share code, notes, and snippets.

View chenkaie's full-sized avatar
:octocat:
Build Something...

Kent Chen chenkaie

:octocat:
Build Something...
View GitHub Profile
@chenkaie
chenkaie / ffserver.conf
Created July 8, 2016 10:26
How to transcoding RTSP H264 to HTTP MJPEG by FFMPEG/FFSERVER along with UBNT UVC
HTTPPort 8888
HTTPBindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 1000000
CustomLog -
<Feed feed1.ffm>
File /tmp/feed1.ffm
FileMaxSize 20M
@chenkaie
chenkaie / rtmp_player.html
Last active August 5, 2016 01:57
UVC RTMP Player
<head>
<!--
Enable RTMP feature by
Step 1. ssh into camera
Step 2. paste below command into terminal
echo createService ip=0.0.0.0 port=1935 protocol=inboundRtmp | nc 127.0.0.1 1112 -w 1 -i 1
Then replace it with corresponding IP address of your UVC
<source src="rtmp://192.168.1.20:1935/live/s0" type='rtmp/mp4'>
-->
@chenkaie
chenkaie / uvc-watchdog.expect
Last active September 19, 2018 03:30
UVC Watchdog
#!/usr/bin/env expect
# Description:
# This tool aims to achieve the "auto-start script" upon device reboot or power lost,
# since there's no ready auto-start hook at post-init stage for UVC
# Installation:
# Install "expect", "netcat" and "sshpass" first if your Linux distribution don't have it ready
# $ sudo apt-get install expect sshpass netcat
@chenkaie
chenkaie / uvc-rtmp-service-watchdog.expect
Created August 30, 2016 14:50
UVC RTMP Service Watchdog
#!/usr/bin/env expect
# Description:
# This tool aims to achieve the "auto-start script" upon device reboot or power lost,
# since there's no ready auto-start hook at post-init stage for UVC
# Installation:
# Install "expect", "netcat" and "sshpass" first if your Linux distribution don't have it ready
# $ sudo apt-get install expect sshpass netcat
@chenkaie
chenkaie / results.txt
Created May 5, 2018 07:19 — forked from bnoordhuis/results.txt
show difference between mmap() and malloc()
$ gcc -DUSE_MMAP=0 tmp/rss.c && ./a.out
rss 360448
==============
rss 360448
rss 1429504
rss 552960
==============
rss 552960
rss 1359872
rss 1359872