howto:merge-video
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
howto:merge-video [2024/03/04 21:29] – Wulf Rajek | howto:merge-video [2025/04/03 23:58] (current) – Wulf Rajek | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Merge/ | ====== Merge/ | ||
+ | |||
+ | GUI tool for mkv files. Older version is in default debian/ | ||
+ | < | ||
+ | sudo wget -O / | ||
+ | cat <<EOF | sudo tee / | ||
+ | deb [arch=amd64 signed-by=/ | ||
+ | deb-src [arch=amd64 signed-by=/ | ||
+ | EOF | ||
+ | sudo apt update | ||
+ | sudo apt install mkvtoolnix mkvtoolnix-gui | ||
+ | </ | ||
+ | |||
+ | {{: | ||
+ | |||
MPG/MPEG files: | MPG/MPEG files: | ||
Line 204: | Line 218: | ||
echo;read -rsn1 -p "Press any key to continue . . ."; | echo;read -rsn1 -p "Press any key to continue . . ."; | ||
</ | </ | ||
+ | |||
+ | Notes re subtitles: | ||
+ | note: mp4 format does not support ass or srt subtitles, but mov_text subtitles. ffmpeg can convert them. formatting from ass subtitles will be lost. | ||
+ | |||
+ | Embed srt subtitle file into mp4 as additional user-controllable track: | ||
+ | < | ||
+ | |||
+ | set metadata of first subtitle stream to english: | ||
+ | < | ||
+ | ffmpeg -i infile.mp4 -i infile.ass -c copy -c:s mov_text -metadata: | ||
+ | </ | ||
+ | |||
+ | extract subtitle from video: | ||
+ | < | ||
+ | |||
+ | Multiple subs require mapping, otherwise first sub will be overwritten | ||
+ | First add another input: -i input2.srt. Second, map that as 2nd stream: -map 2:0. Finally, select encoder for 2nd subtitle stream (the same as the first one): -c:s srt. The complete example\ < | ||
+ | |||
+ | convert srt to ass or ass to srt: | ||
+ | < | ||
+ | ffmpeg -i input.ass input.srt | ||
+ | </ | ||
+ | |||
+ | Remove audio from a video file: | ||
+ | < | ||
+ | ffmpeg -i input_file -c copy -an output_file | ||
+ | |||
+ | # remove all but a specific language audio streams | ||
+ | ffmpeg -i input_file -map 0 -map -0:a -map 0: | ||
+ | </ | ||
+ | |||
+ |
howto/merge-video.1709587741.txt.gz · Last modified: 2024/03/04 21:29 by Wulf Rajek