Skip to content

Instantly share code, notes, and snippets.

@gvoze32
gvoze32 / ffmpeg GIF to MP4.MD
Last active November 11, 2024 03:37
Convert animated GIF to MP4 using ffmpeg in terminal.

To convert animation GIF to MP4 by ffmpeg, use the following command

ffmpeg -i animated.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" video.mp4

Description

movflags – This option optimizes the structure of the MP4 file so the browser can load it as quickly as possible.

pix_fmt – MP4 videos store pixels in different formats. We include this option to specify a specific format which has maximum compatibility across all browsers.

@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active November 17, 2024 03:07
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized
var CryptoJS = require('crypto-js')
var request = require('request-promise')
/*
* npm install crypto-js request-promise request
* node wx_t1t_hack.js
*/
// export function testEncription(msg, fullKey) {
// var fullKey = fullKey.slice(0, 16)
@cloudwu
cloudwu / pimpl.cpp
Last active July 3, 2017 10:51
My version of pimpl
// My version of pimpl ([email protected])
// See http://en.cppreference.com/w/cpp/language/pimpl
#include <iostream>
// interface (widget.h)
class widget {
struct impl;
public:
static widget* create(int); // replacement of new
@cloudwu
cloudwu / testtun.lua
Last active September 23, 2017 09:58
A timeout tunnel service (skynet)
local skynet = require "skynet"
require "skynet.manager"
local mode = ...
if mode == "slave" then
skynet.start(function()
skynet.dispatch("lua", function(session, address, ti, ...)
if session == 0 then