Skip to content

Instantly share code, notes, and snippets.

@manueldev
manueldev / gist:6037308
Created July 19, 2013 07:21
ffmpeg webcam streaming
ffmpeg -f dshow -i video="HP Webcam [2 MP Fixed]" -s 640x480 -r 20 -tune zerolatency -b:v 2000k -c:v libx264 -preset ultrafast -pix_fmt yuv420p -g 1 -f mpegts -t 180 udp://127.0.0.1:80?pktsize=188&buffer_size=65535
@manueldev
manueldev / gist:6047712
Created July 21, 2013 06:32
ffmpeg Mkv mp4 dts to Mp4 ac3 Some Sony TV models don't read DTS.
ffmpeg -i inputfile.mp4 -vcodec copy -acodec ac3 -ac 6 -ab 448k outputfile.mp4
@manueldev
manueldev / gist:6050316
Created July 21, 2013 22:51
Agregando audio ac3 (latino) a vídeo mkv, y transformándolo a mp4. Sin conversión. Google translate: Adding audio ac3 (Latin) to mkv video, and transforming to mp4. Without conversion.
ffmpeg -i inputvideofile.mkv -i inputaudiofile.ac3 -map 0:[number of video stream] -map 1[number of audio stream] -c copy outputfile.mp4
@manueldev
manueldev / gist:6168573
Created August 6, 2013 20:58
Convertir F4V a MP4 sin conversión.
Descomprimir http://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-latest-win32-static.7z
Ir a la carpeta descomprimida, subcarpeta bin.
Dejar en esa carpeta el video f4v
Abrir una consola (cmd)
cd a/la/ruta/donde/esta/la/carpeta/bin
escribir:
ffmpeg.exe -i archivo-para-convertir.f4v -codec copy archivo-resultado.mp4
Listo.
@manueldev
manueldev / gist:6330707
Created August 24, 2013 22:12
Agregando audio AC3 latino con un retardo de 1 segundo, dejando solamente el audio latino.
ffmpeg -i inputvideofile.mkv -itsoffset 00:00:01.000 -i inputaudiofile.ac3 -map 0:[number of video stream] -map 1:0 -c copy outputfile.mp4
@manueldev
manueldev / gist:7244625
Created October 31, 2013 05:08
borrar directorios problematicos en Windows. Nombres demasiado extensos.
rmdir /s /q D:\Foldername
@manueldev
manueldev / gist:7262724
Created November 1, 2013 09:01
Borra caracteres raros (non-ascii) del nombre del archivo que se esta subiendo a Wordpress para evitar problemas con sistemas que no los soportan.
function filename_sin_non_ascii($filename) {
return preg_replace('/[[:^print:]]/', '', $filename);
}
add_filter('sanitize_file_name', 'filename_sin_non_ascii', 10);
@manueldev
manueldev / gist:d676a62afcefd81a3cb8
Created October 7, 2014 02:36
Fix Ubuntu - Microsoft Virtual PC 2007 "Error!! No Windows hypervisor detected!!" (24-bit color depth problem)
HvInit() ERROR!! No Windows hypervisor detected!!
VmbusInitialize() ERROR!! Unable to initlialize the hypervisor - 0xffffffff
vmbus_bus_init() ERROR!! Unable to initialize vmbus (-1)
Video artifacts (green, black).
Unable to login.
Reason: 24-bit color depth no support by Microsft Virtual PC 2007.
@manueldev
manueldev / gist:06e35cbf07e97b5ae082
Created October 7, 2014 04:49
GRUB for Ubuntu (server) 10.04 on Microsoft Virtual PC 2007
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT=" quiet vga=769"
GRUB_CMDLINE_LINUX=""
@manueldev
manueldev / gist:61e1474b73cd06db9dba
Last active August 29, 2015 14:07
Ver Twitch.tv en VLC (windows)
Para ver Twitch.tv en VLC y asi aprovechar la aceleracion grafica del pc.
Bajar https://github.com/chrippa/livestreamer/releases/download/v1.10.2/livestreamer-v1.10.2-win32-setup.exe
Instalar ;)
Abrir cmd (ejecutar -> cmd.exe)
escribir: livestreamer twitch.tv/colemonotv [calidad]