ffmpeg -i "input.MP4" -vb xxxk -vcodec libx264 -ab 64k -ar 44100 -y "output_.MP4"
xxxk
: You should adjust its size according to your needs.
For example i use 2000k to compress Gopro mp4 videos.
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
.demo { | |
width: 200px; | |
height: 200px; | |
-webkit-box-shadow: 0px 0px 10px #333; | |
box-shadow: 0px 0px 10px #333; | |
color: transparent; |
/** | |
* @author Dongxu Huang, Shu Ke, Wang Lei | |
* @date 2013-07-08 | |
*/ | |
document.addEventListener("mousemove", update_mouse_pos, true); | |
document.addEventListener("mouseup", on_mouse_up, true); | |
document.addEventListener("mousedown", on_mouse_down, true); | |
document.addEventListener("dblclick", on_mouse_dbclick, true); | |
var clientX, clientY; |
var getStrDistance = function(str1, str2) { | |
var lenStr1 = str1.length; | |
var lenStr2 = str2.length; | |
if (lenStr1 === 0 || lenStr2 === 0) { | |
return lenStr1 === 0 ? lenStr2 : lenStr1; | |
} | |
var dArr = new Array(lenStr1 + 1); | |
for (var i = 0; i <= lenStr1; i++) { | |
dArr[i] = new Array(lenStr2 + 1); | |
dArr[i][0] = i; |
local redis_c = require "resty.redis" | |
local ok, new_tab = pcall(require, "table.new") | |
if not ok or type(new_tab) ~= "function" then | |
new_tab = function (narr, nrec) return {} end | |
end | |
local _M = new_tab(0, 155) |
function customRouter(originRouter, prefix) { | |
let urlArr = []; | |
let slice = [].slice; | |
let methods = ['get', 'post', 'delete', 'put']; | |
function array2ArrayLike(array) { | |
let arrayLike = { | |
length: 0 | |
} | |
for(let i = 0; i < array.length; i++) { |
// from here: http://marcio.io/2015/07/handling-1-million-requests-per-minute-with-golang/ | |
// great example !! | |
func payloadHandler(w http.ResponseWriter, r *http.Request) { | |
if r.Method != "POST" { | |
w.WriteHeader(http.StatusMethodNotAllowed) | |
return | |
} | |
// Read the body into a string for json decoding |
package main | |
import ( | |
"bufio" | |
"crypto/md5" | |
"crypto/sha1" | |
"crypto/sha256" | |
"crypto/sha512" | |
"encoding/hex" | |
"fmt" |
'use strict'; | |
const fs = require('fs'); | |
const iconv = require('iconv-lite'); | |
const path = require('path'); | |
const p = console.log; | |
function readText(path) { | |
let buf = fs.readFileSync(path); | |
return iconv.decode(buf, 'gbk'); |
// https://cnodejs.org/topic/516e0ab46d382773067a5473 | |
var http = require('http'); | |
var url = require('url'); | |
var Iconv = require('iconv').Iconv; | |
var crypto = require('crypto'); | |
var server = http.createServer(function(req, res){ | |
var path = url.parse(req.url).pathname; | |
if(path == '/favicon.ico'){ | |
res.end(''); |