Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Xavier Belanche Alonso xbelanch

🏠
Working from home
View GitHub Profile
@xbelanch
xbelanch / ffmpeg.md
Last active Jan 2, 2020
ffmpeg windows 10 streaming udp
View ffmpeg.md
ffmpeg -f dshow -i video="Logitech HD Pro Webcam C920" -f dshow -i audio="Micrófono (5- Samson Meteor Mic)" -r 60 -vcodec libx264 -preset ultrafast -tune zerolatency -crf 18 -b:v 500k -bufsize 300k -f rtp_mpegts udp://192.168.1.121:1234

Streaming with dropping frames

ffmpeg -f dshow -i video="Logitech HD Pro Webcam C920" -f dshow -i audio="Micrófono (5- Samson Meteor Mic)" -r 30 -vcodec libx264 -preset ultrafast -tune zerolatency -crf 18 -b:v 1500k -bufsize 2500k -pix_fmt yuv420p -async 1 -vsync 1 -f flv rtmp://live.twitch.tv/app/{code}
View media_embed.rb
#!/usr/bin/env ruby
## Deal with media embed output format
require "paru/filter"
require 'addressable/uri'
require "youtube_id"
format = if ARGV.first.nil? then "unknown" else ARGV.first end
warn "Filter :: Rewrite media embed code for output format: #{format}"
Paru::Filter.run do
View arduino_demo.c
/*
----------------------------------------------------------------
Captació de mesures de temperatura i presentació a través d'un
servidor web amb Arduino, amb adreça IP obtinguda mitjançant
una connexió DHCP.
Santiago CEREZO SALCEDO
Belén REVERT ABRIL
Institut Obert de Catalunya, 2015
View gist:e7b317b8aeb70ed9ca63
# Quirkaglitch
## This is the complete solution.
1) With the key you can switch on the elevators
2) Get the pickaxe and the block
3) Swap the block for the piece of gold
4) Swap the gold for the coin
5) Swap the coin for the CD ROM
6) Swap the CD ROM for the puzzle object
@xbelanch
xbelanch / ld48_guide
Last active Aug 29, 2015
Ludum Dare 48. Guía de supervivencia. Guión de la sesión
View ld48_guide
![ludum dare detournement](http://i59.tinypic.com/2vwu2cg.jpg)
## Qué es Ludum Dare 48? Por qué resulta tan especial?
## Showcase
## Competition (Compo)/Jam
## Calendario
@xbelanch
xbelanch / demo.hx
Last active Dec 21, 2015
Fixed width screen centered on Android
View demo.hx
@:bitmap("hero.png")
class HeroPNG extends flash.display.BitmapData {
}
@:publicFields class Const {
inline static var TILESIZE = 32;
inline static var WIDTH = 608;
inline static var HEIGHT = 576;
@xbelanch
xbelanch / Main.hx
Last active Dec 21, 2015
How to handle text in OpenFL
View Main.hx
class Main {
static function main () {
test = new Test(flash.Lib.current);
test.init();
}
}
@xbelanch
xbelanch / Hero.hx
Created Aug 3, 2013
Problem Keyboard events + Spritsheet
View Hero.hx
import flash.display.BitmapData;
import openfl.Assets;
import spritesheet.AnimatedSprite;
import spritesheet.data.BehaviorData;
import spritesheet.importers.BitmapImporter;
import spritesheet.Spritesheet;
import flash.text.TextField;
import flash.events.Event;
import flash.Lib;