Skip to content

Instantly share code, notes, and snippets.

@spirillen
spirillen / ffmpeg-add-subtitles.md
Last active June 10, 2024 23:11
Use FFmpeg to add subtitles to video

Use FFmpeg to add subtitles to video

MP4:

ffmpeg -i input.mp4 -f srt -i input.srt -map 0:0 -map 0:1 -map 1:0 -c:v copy \
    -c:a copy -c:s mov_text output.mp4

MKV:

// Gist for https://medium.com/@ebakhtarov/bidirectional-websockets-with-redux-saga
import { eventChannel } from "redux-saga";
import { all, call, put, take, select, race } from "redux-saga/effects";
import { actionTypes } from "./constants";
function watchMessages(socket) {
return eventChannel(emit => {
/* eslint-disable no-param-reassign */