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.
| MD5 checksum | |
| In order to find the MD5 checksum value of a file using the following command in the terminal. | |
| $ md5 /path/to/file | |
| To find the SHA1 checksum value use the following command in the terminal. | |
| $ shasum -a 1 /path/to/file | |
| To find the SHA256 checksum use the following command in the terminal. | |
| $ shasum -a 256 /path/to/file |
| FROM alpine:3.4 | |
| ENV TZ 'Asia/Shanghai' | |
| RUN apk upgrade --no-cache && \ | |
| apk add --no-cache bash tzdata && \ | |
| mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2 && \ | |
| ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \ | |
| echo "Asia/Shanghai" > /etc/timezone && \ |
| #!/bin/sh | |
| version="0.1.0" | |
| UNAME=$(uname) | |
| # Check to see if it starts with MINGW. | |
| if [ "$UNAME" ">" "MINGW" -a "$UNAME" "<" "MINGX" ] ; then | |
| echo "current release do not support windows" | |
| exit 1 |
| // 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(''); |
| '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'); |
| package main | |
| import ( | |
| "bufio" | |
| "crypto/md5" | |
| "crypto/sha1" | |
| "crypto/sha256" | |
| "crypto/sha512" | |
| "encoding/hex" | |
| "fmt" |
| // 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 |
| 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++) { |
| 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) |