Skip to content

Instantly share code, notes, and snippets.

View bonnebulle's full-sized avatar
🎯
Focusing

vincent_b bonnebulle

🎯
Focusing
View GitHub Profile
@jamesmacwhite
jamesmacwhite / ffmpeg_mkv_mp4_conversion.md
Last active September 27, 2025 00:07
Easy way to convert MKV to MP4 with ffmpeg

Converting mkv to mp4 with ffmpeg

Essentially just copy the existing video and audio stream as is into a new container, no funny business!

The easiest way to "convert" MKV to MP4, is to copy the existing video and audio streams and place them into a new container. This avoids any encoding task and hence no quality will be lost, it is also a fairly quick process and requires very little CPU power. The main factor is disk read/write speed.

With ffmpeg this can be achieved with -c copy. Older examples may use -vcodec copy -acodec copy which does the same thing.

These examples assume ffmpeg is in your PATH. If not just substitute with the full path to your ffmpeg binary.

Single file conversion example

@mostafar
mostafar / dedit.sh
Last active June 25, 2023 13:01 — forked from dmohs/dedit.sh
#!/bin/bash
IFS=$'\n\t'
set -euox pipefail
CNAME="$1"
FILE_PATH="$2"
FILE_NAME="$(basename "$FILE_PATH")"
TMPFILE="$(mktemp --suffix=_$FILE_NAME)"
@OleVik
OleVik / gulpfile.js
Last active May 15, 2024 09:36
Build responsive images with Gulp
'use strict';
var gulp = require('gulp');
var gutil = require('gulp-util');
var del = require('del');
var debug = require('gulp-debug');
var $ = require('gulp-load-plugins')();
gulp.task('clean:pages', function() {
gutil.log('Deleting /pages/**/*', gutil.colors.magenta('123'));
return del([
@alexander-arce
alexander-arce / Create user
Last active March 8, 2023 14:24
Etherpad Lite Install + Postgresql
sudo adduser --system --home=/opt/etherpad --group etherpad
@DonnchaC
DonnchaC / onion-address-calculate.py
Created August 25, 2015 14:24
Simple script to calculate the onion address from a Tor hidden service descriptor or public key
import hashlib
import base64
import argparse
import sys
from Crypto.PublicKey import RSA
def calculate_onion(pem_key):
key = RSA.importKey(pem_key)
@brad-jones
brad-jones / auto-configure-desktop.sh
Created March 25, 2015 02:57
Automating Linux Desktop with wmctrl
#!/bin/sh
# WMCTRL Desktop Automation script
# ================================
# Author: Brad Jones <[email protected]>
#
# I assume you know what wmctrl is, if not not see:
# https://sites.google.com/site/tstyblo/wmctrl/
#
# I also assume you actually read the documentation.
# I have tested this on Fedora 21 running cinnamon and it works great.
@matthewhartman
matthewhartman / install-fonts.txt
Created March 1, 2015 11:27
Install TTF Fonts in Debian
cd fonts
mv *.ttf /usr/share/fonts/truetype
cd /usr/share/fonts/truetype
mkfontscale
mkfontdir
fc-cache
xset fp rehash
@michaelmob
michaelmob / StartPage Bangs
Last active November 4, 2023 11:18
Adds !s to StartPage, like DDG
// ==UserScript==
// @name StartPage Bangs
// @namespace http://tarkus.co/
// @version 0.1
// @description Adds !s to StartPage, like DDG
// @match https://startpage.com/*
// @run-at document-start
// ==/UserScript==
// Bangs
@chrisveness
chrisveness / utf8-regex.js
Last active May 25, 2023 01:53
Utf8 string encode/decode using regular expressions
/**
* Encodes multi-byte Unicode string into utf-8 multiple single-byte characters
* (BMP / basic multilingual plane only).
*
* Chars in range U+0080 - U+07FF are encoded in 2 chars, U+0800 - U+FFFF in 3 chars.
*
* Can be achieved in JavaScript by unescape(encodeURIComponent(str)),
* but this approach may be useful in other languages.
*
* @param {string} unicodeString - Unicode string to be encoded as UTF-8.
@spotco
spotco / gist:8265971
Created January 5, 2014 08:50
bash convert files to mp3 sox bash
for f in *.m4a; do sox "$f" -C 56 "${f%.m4a}.mp3"; done