Skip to content

Instantly share code, notes, and snippets.

View curegit's full-sized avatar

curegit curegit

View GitHub Profile
@baptx
baptx / webrtc_video_blob_record.js
Last active August 21, 2024 14:07
WebRTC and video blob record (compatible with DRM and any videos like Facebook / Instagram stories)
/* Customized code to allow WebRTC record on existing page or HTML5 video blob download (based on https://github.com/webrtc/samples/blob/409d5631f38f2bdc4dafb5275d1bc77738fbb1ba/src/content/getusermedia/record/js/main.js)
* Recording will start when executing this script and you will have to execute manually startDownload() function when needed in web console with or without stopRecording()
* Recording should ideally start before playing video manually and in case controls are hidden, you can record from the start with a command like document.getElementsByTagName("video")[0].currentTime = 0
* By default, the script targets the first video element document.getElementsByTagName("video")[0] but you can change the code if needed.
*/
// If there is an error due to DRM, capture the stream by executing the following 2 lines before playing / loading the video:
var video = document.getElementsByTagName("video")[0];
var stream = video.captureStream ? video.captureStream() : video.mozCaptureStream();
@euske
euske / ffmpeg.md
Last active October 3, 2024 10:35 — forked from steven2358/ffmpeg.md
FFmpeg チートシート
@kankikuchi
kankikuchi / PersistentAmongPlayModeAttribute.cs
Last active December 29, 2023 01:16
エディタ再生中に変更した値をエディタ停止後もそのまま保持する属性【Unity】【エディタ拡張】【属性】
// PersistentAmongPlayModeAttribute.cs
// http://kan-kikuchi.hatenablog.com/entry/PersistentAmongPlayModeAttribute
//
// Created by kan.kikuchi on 2019.05.14.
using UnityEngine;
using System;
/// <summary>
/// エディタ再生中に変更した値をエディタ停止後もそのまま保持する属性
@sunnyone
sunnyone / whitelevel.sh
Created September 27, 2012 14:23
White level detection script
#!/bin/sh
# White level detection script
# Copyright (c) 2012 Yoichi Imai <sunnyone41@gmail.com>
if [ -z "$1" ]; then
echo usage: $0 image
exit 1
fi
FILE="$1"