Skip to content

Instantly share code, notes, and snippets.


Sushant sushantdhiman

View GitHub Profile
View html5-video-streamer.js
* Inspired by:
var http = require('http'),
fs = require('fs'),
util = require('util');
http.createServer(function (req, res) {
var path = 'video.mp4';
sushantdhiman / livestream.js
Last active Dec 4, 2018 — forked from deandob/livestream
Node.JS function to remux mp4/h.264 video from an IP camera to a HTML5 video tag using FFMPEG
View livestream.js
// Live video stream management for HTML5 video. Uses FFMPEG to connect to H.264 camera stream,
// Camera stream is remuxed to a MP4 stream for HTML5 video compatibility and segments are recorded for later playback
var liveStream = function (req, resp) { // handle each client request by instantiating a new FFMPEG instance
// For live streaming, create a fragmented MP4 file with empty moov (no seeking possible).
var reqUrl = url.parse(req.url, true)
var cameraName = typeof reqUrl.pathname === "string" ? reqUrl.pathname.substring(1) : undefined;
if (cameraName) {
try {
cameraName = decodeURIComponent(cameraName);
sushantdhiman / Aria-Addon.js
Created Jun 4, 2015
Bootstrap.UI Date Picker Angular Addon
View Aria-Addon.js
Just Add this addon on parent or same level of datepicker-ui.
current-date will automatically be updated with date selected by keyboard
/** Enhance the ui.datepicker to able to read the selected date from ui.datepicker **/
return {
You can’t perform that action at this time.