Mkv

From Omnia
Jump to navigation Jump to search

Convert MKV to MP4

Change container:

ffmpeg -i input.mkv -codec copy output.mp4

To MP3

ffmpeg -i in_video_file.mp4 out_audio_file.mp3
ffmpeg -i videofile.mp4 -vn -acodec libmp3lame audiofile.mp3

Extra AAC

ffmpeg -i infile.mkv -vn -acodec copy out.aac  # or out.m4a

Cut

Then run your command. Note the ./ before the ffmpeg. This will make sure you use your new ffmpeg instead of the fake one in the repository.

./ffmpeg -ss 00:39:05 -i input.mkv -codec copy -t 00:03:03 out.mkv

Alternatively you could use the full path:

/path/to/ffmpeg -ss 00:39:05 -i input.mkv -codec copy -t 00:03:03 out.mkv

ref: https://superuser.com/questions/742434/use-ffmpeg-to-cut-mkv-file