User Tools

Site Tools


howto:mkv-edit

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
howto:mkv-edit [2017/09/05 11:36] Wulf Rajekhowto:mkv-edit [2024/10/07 00:13] (current) – [Convert DVD VIDEO_TS folder] Wulf Rajek
Line 1: Line 1:
-====== Edit MKV Files ======+====== Video Editing ====== 
 + 
 +===== Lossless Cut Cut/Trimming ===== 
 + 
 +LosslessCut aims to be the ultimate cross platform ffmpeg GUI for extremely fast and lossless operations on video, audio, subtitle and other related media files. The main feature is lossless trimming and cutting of video and audio files, which is great for saving space by rough-cutting your large video files. 
 + 
 +https://github.com/mifi/lossless-cut 
 +https://github.com/mifi/lossless-cut/releases 
 + 
 + 
 +===== Edit MKV Files =====
  
 To remove audio or subtitle tracks from mkv files, the mkvmerge command can be used. To remove audio or subtitle tracks from mkv files, the mkvmerge command can be used.
Line 37: Line 47:
 <code> <code>
 mkvextract tracks videofile.mkv 2:subtitletrack2.srt 3:subtitletrack3.srt mkvextract tracks videofile.mkv 2:subtitletrack2.srt 3:subtitletrack3.srt
 +</code>
 +
 +===== Fix broken header/index =====
 +
 +<code>
 +ffmpeg -i 'input' -map 0 -c copy 'output.mkv' 
 +</code>
 +
 +===== Flip video =====
 +
 +To Flip Video Vertically (upside down):
 +<code>
 +ffmpeg -i INPUT.mp4 -vf vflip -c:a copy OUTPUT.mp4
 +</code>
 +
 +To Flip Video Horizontally (left/right):
 +<code>
 +ffmpeg -i INPUT.mp4 -vf hflip -c:a copy OUTPUT.mp4
 +</code>
 +
 +===== Convert DVD VIDEO_TS folder =====
 +<code>
 +ffmpeg -i "concat:VTS_01_1.VOB|VTS_01_2.VOB|VTS_01_3.VOB|VTS_01_4.VOB|VTS_01_5.VOB|VTS_01_6.VOB|VTS_01_7.VOB" -filter_complex "scale=ceil(iw*min(1\,min('1080'/iw\,'720'/ih))/2)*2:-2" -c:v libx264 -crf 28 -c:a aac  -b:v '4M' -maxrate '4M' -bufsize '4M' -f mp4 output.mp4
 +
 +or 
 +
 +cat ./VIDEO_TS/VTS_01_*.VOB | ffmpeg -i - -filter_complex "scale=ceil(iw*min(1\,min('1080'/iw\,'720'/ih))/2)*2:-2" -c:v libx264 -crf 28 -c:a aac  -b:v '4M' -maxrate '4M' -bufsize '4M' -f mp4 output.mp4
 </code> </code>
howto/mkv-edit.1504607771.txt.gz · Last modified: 2023/05/29 11:53 (external edit)