This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# webm | |
ffmpeg -i IN -f webm -vcodec libvpx -acodec libvorbis -ab 128000 -crf 22 -s 640x360 OUT.webm | |
# mp4 | |
ffmpeg -i IN -acodec aac -strict experimental -ac 2 -ab 128k -vcodec libx264 -vpre slow -f mp4 -crf 22 -s 640x360 OUT.mp4 | |
# ogg (if you want to support older Firefox) | |
ffmpeg2theora IN -o OUT.ogv -x 640 -y 360 --videoquality 5 --audioquality 0 --frontend |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern "C" { | |
#include <libavformat/avformat.h> | |
#include <libavcodec/avcodec.h> | |
#include <libavutil/avutil.h> | |
} | |
int main(int argc, char* argv[]) | |
{ | |
const char * kInputFileName = "f:/Projects/Temp/testFFMPEG2/test/test_in.avi"; | |
const char * kOutputFileName = "f:/Projects/Temp/testFFMPEG2/test/text_out.avi"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var RTCPeerConnection = null; | |
var getUserMedia = null; | |
var attachMediaStream = null; | |
var reattachMediaStream = null; | |
var webrtcDetectedBrowser = null; | |
var webrtcDetectedVersion = null; | |
function trace(text) { | |
// This function is used for logging. | |
if (text[text.length - 1] == '\n') { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var server = null; | |
if(window.location.protocol === 'http:') | |
server = "http://" + window.location.hostname + ":8088/janus"; | |
else | |
server = "https://" + window.location.hostname + ":8089/janus"; | |
var bitrateTimer = null; | |
var spinner = null; | |
var simulcastStarted = false, svcStarted = false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let remoteVideo0 = document.getElementById('webrtc-remote-video-0'); | |
let remoteVideo1 = document.getElementById('webrtc-remote-video-1'); | |
let remoteVideo2 = document.getElementById('webrtc-remote-video-2'); | |
let remoteVideo3 = document.getElementById('webrtc-remote-video-3'); | |
let canvasMix = document.getElementById('canvas_mix'); | |
let ctxMix = canvasMix.getContext('2d'); | |
ctxMix.fillStyle = 'rgb(128, 192, 128)'; | |
let mixStream = null; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// NOTE: This gist uses simplewebrtc and is based on the simple example on the homepage | |
// https://simplewebrtc.com | |
var roomName = 'your-secret-room-name'; | |
console.log('roomName = ' + roomName); | |
var webrtc; | |
// need to enumerate devices if possible | |
var hasAudio = false; // default false for compatibility | |
var hasVideo = false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Shinobi (http://shinobi.video) - FFMPEG H.264 over HTTP Test | |
// How to Use raw H.264 (Simulated RTSP) | |
// 1. Start with `node ffmpegToWeb.js` | |
// 2. Get the IP address of the computer where you did step 1. Example : 127.0.0.1 | |
// 3. Open VLC and "Open Network Stream". | |
// 4. Input the following without quotes : `http://127.0.0.1:8001/h264` and start. | |
var child = require('child_process'); | |
var io = require('socket.io'); | |
var events = require('events'); |