Skip to content

Instantly share code, notes, and snippets.

View simao-silva's full-sized avatar

Simão Silva simao-silva

  • Aveiro, Portugal
View GitHub Profile
@revolunet
revolunet / apache-vhost.conf
Created January 3, 2012 13:25
sample flask+apache2+wsgi setup
<VirtualHost *:80>
ServerName flask.revolunet.com
WSGIScriptAlias / /home/git/flask_app/run.wsgi
WSGIScriptReloading On
<Directory /home/git/flask_app>
Order deny,allow
Allow from all
</Directory>
@nrk
nrk / command.txt
Created April 2, 2012 19:19
Using ffprobe to get info from a file in a nice JSON format
ffprobe -v quiet -print_format json -show_format -show_streams "lolwut.mp4" > "lolwut.mp4.json"
@rbrooks
rbrooks / ffmpeg_ffprobe.sh
Last active July 4, 2024 19:49
FFmpeg & FFprobe Cheatsheet
# Don't use FFmpeg for metadata extraction. Use FFprobe.
# Its output is geared toward parsabilty.
# Container and stream information in JSON format:
ffprobe -show_format -print_format json 'Serenity - HD Trailer.mp4'
ffprobe -show_streams -print_format json 'Serenity - HD Trailer.mp4'
# Human-readable values:
ffprobe -show_format -pretty -print_format json 'Serenity - HD Trailer.mp4'
# Trim video to first 30 seconds, without transcoding.
@liudong
liudong / gist:3993726
Created November 1, 2012 13:49
Java: Generate Public/Private Keys
import java.security.KeyPairGenerator;
import java.security.KeyPair;
import java.security.PrivateKey;
import java.security.PublicKey;
import java.security.KeyFactory;
import java.security.spec.EncodedKeySpec;
import java.security.spec.PKCS8EncodedKeySpec;
import java.security.spec.X509EncodedKeySpec;
import java.security.spec.InvalidKeySpecException;
import java.security.NoSuchAlgorithmException;
@igniteflow
igniteflow / corsdevserver.py
Created April 22, 2013 15:34
A simple CORS compliant web server in Python, useful for development (with @alex-moon)
import BaseHTTPServer
import cgi
from pprint import pformat
PORT = 6969
FILE_TO_SERVE = 'path/to/your/response/content.json'
class MyHandler(BaseHTTPServer.BaseHTTPRequestHandler):
"""
@omeinusch
omeinusch / create-mysql.bash
Created August 31, 2013 11:50
Simple bash script to create mysql db, user with generated password
#!/bin/bash
PASS=`pwgen -s 40 1`
mysql -uroot <<MYSQL_SCRIPT
CREATE DATABASE $1;
CREATE USER '$1'@'localhost' IDENTIFIED BY '$PASS';
GRANT ALL PRIVILEGES ON $1.* TO '$1'@'localhost';
FLUSH PRIVILEGES;
MYSQL_SCRIPT
@mosquito
mosquito / requirements.txt
Last active June 1, 2024 14:07
RTSP to HTTP python proxy
tornado>4
construct
@marc-hanheide
marc-hanheide / vlc-stream.sh
Last active November 15, 2023 06:53
VLC screen streaming mjpeg
DISPLAY=:0 cvlc -vvv --no-audio screen:// --screen-fps 1 --sout "#transcode{vcodec=MJPG,vb=800}:standard{access=http,mux=mpjpeg,dst=:18223/}" --sout-http-mime="multipart/x-mixed-replace;boundary=--7b3cc56e5f51db803f790dad720ed50a"

Live Transcoding

This is a collection of working commandline examples to show how one could use FFMpeg and VLC for live transcoding of video streams. All examples have been tested on OSX 10.7.5 with FFMPeg 1.1.3 and VLC 2.0.5 in early 2013.

Documentation links

@Lewiscowles1986
Lewiscowles1986 / rPi3-ap-setup.sh
Last active July 16, 2023 15:33
Raspberry Pi 3 access-point-setup
#!/bin/bash
#
# This version uses September 2017 august stretch image, please use this image
#
if [ "$EUID" -ne 0 ]
then echo "Must be root"
exit
fi