Skip to content

Instantly share code, notes, and snippets.

@16892434
16892434 / ffmpeg.md
Created May 26, 2023 01:21 — forked from steven2358/ffmpeg.md
FFmpeg cheat sheet
@16892434
16892434 / ffmpeg.md
Created May 25, 2023 09:43 — forked from v5tech/ffmpeg.md
ffmpeg视频合并、格式转换、截图

使用ffmpeg合并MP4文件

ffmpeg -i "Apache Sqoop Tutorial Part 1.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts
ffmpeg -i "Apache Sqoop Tutorial Part 2.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate2.ts
ffmpeg -i "Apache Sqoop Tutorial Part 3.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate3.ts
ffmpeg -i "Apache Sqoop Tutorial Part 4.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate4.ts
ffmpeg -i "concat:intermediate1.ts|intermediate2.ts|intermediate3.ts|intermediate4.ts" -c copy -bsf:a aac_adtstoasc "Apache Sqoop Tutorial.mp4"
@16892434
16892434 / readme.md
Created May 19, 2023 02:16 — forked from ctkjose/readme.md
JavaScriptCore for macOS and Linux

JSC

JSC is the JavaScript engine from Apple's JavaScriptCore (WebKit) as a console application that you can use to run script in the terminal.

For more info visit the JSC's webkit wiki page.

Adding a shortcut to JSC

Using jsc is simple, the one issue is that Apple keeps changing the location for jsc. To deal with this issue I just create a symbolic link to the binary:

@16892434
16892434 / ffmpeg_2.md
Created May 11, 2023 06:30 — forked from Tmn07/ffmpeg_2.md
ffmpeg命令的一些应用记录

虽然距离第一次总结ffmpeg指令与剪辑视频相关的姿势 (github.com)已经过去了三年,但是依旧是非常业余的水平。仅作个人记录,谨慎参考,表述有问题的地方欢迎讨论指正。

视频剪切

需求是尽可能无损剪切,精确时间。

根据视频关键帧的情况,分两种方案

  1. 极速方案,无损截取出视频两个关键帧之间的片段。
@16892434
16892434 / fp.py
Created May 11, 2023 06:30 — forked from Tmn07/fp.py
懒人压制脚本-linux平台
#!/usr/bin/env python3
import subprocess
import json
import argparse
from os import listdir
filename = "ML2nd-day1-2.mp4"
@16892434
16892434 / 剪辑视频.md
Created May 11, 2023 06:28 — forked from Tmn07/剪辑视频.md
ffmpeg指令与剪辑视频相关的姿势

从零开始的程序员剪辑视频(误)

更佳markdown渲染样式,推荐使用PC web端阅读,查看原文,地址:https://git.io/fhSBj 代码地址:https://github.com/qq519043202/lrc2srt

一个懒惰却在某些方面爱折腾的程序员开始剪辑视频,不想安装任何大型编辑软件(我的破surface也带不动的感觉)

本文不适合:想要正经学习视频编辑的萌新,右转去学一些大型的编辑软件的使用吧~

本文适合:有计算机背景或爱折腾的视频剪辑萌新,要尝试鄙人的lrc转srt脚本或歌词获取脚本的旁友,不愿意装大型软件的视频萌新(?)

var saveBlob = (function () {
var a = document.createElement("a");
document.body.appendChild(a);
a.style = "display: none";
return function (blob, fileName) {
var url = window.URL.createObjectURL(blob);
a.href = url;
a.download = fileName;
a.click();
window.URL.revokeObjectURL(url);
@16892434
16892434 / ChromeExtensionGulp.js
Created April 19, 2023 01:28 — forked from lykmapipo/ChromeExtensionGulp.js
Gulp file for building a Chrome Extension
'use strict';
//npm install gulp gulp-minify-css gulp-uglify gulp-clean gulp-cleanhtml gulp-jshint gulp-strip-debug gulp-zip --save-dev
var gulp = require('gulp'),
clean = require('gulp-clean'),
cleanhtml = require('gulp-cleanhtml'),
minifycss = require('gulp-minify-css'),
jshint = require('gulp-jshint'),
stripdebug = require('gulp-strip-debug'),
node_version:=$(shell node -v)
npm_version:=$(shell npm -v)
timeStamp:=$(shell date +%Y%m%d%H%M%S)
.PHONY: install build archive test clean
show:
@ echo Timestamp: "$(timeStamp)"
@ echo Node Version: $(node_version)