Skip to main content
deleted 64 characters in body
Source Link
slhck
  • 230.1k
  • 71
  • 621
  • 603

Check the sites for downloads for either Windows or Linux. On OS X, you only need to brew install mkvtoolnix mp4box if you have HomebrewHomebrew.

If mkvtomp4 does not work for you, a simple FFmpeg batch file could also do. For Windows, you can download the

Install ffmpeg Zeranoe builds(e. In Linux, check FFmpeg from package sourcesg. In OS X, usevia brew install ffmpegHomebrew or options from https://ffmpeg.org/download.html).

  Then, just call:

Check the sites for downloads for either Windows or Linux. On OS X, you only need to brew install mkvtoolnix mp4box if you have Homebrew.

If mkvtomp4 does not work for you, a simple FFmpeg batch file could also do. For Windows, you can download the Zeranoe builds. In Linux, check FFmpeg from package sources. In OS X, use brew install ffmpeg.

  Then, just call:

Check the sites for downloads for either Windows or Linux. On OS X, you only need to brew install mkvtoolnix mp4box if you have Homebrew.

If mkvtomp4 does not work for you, a simple FFmpeg batch file could also do.

Install ffmpeg (e.g. via Homebrew or options from https://ffmpeg.org/download.html). Then, just call:

deleted 11 characters in body
Source Link
slhck
  • 230.1k
  • 71
  • 621
  • 603

If you want to add the subtitles, this is going to be hard. Since ISO MP4 does not support subtitles as far as I'm concerned, and FFmpeg won't copy them, you might need a manual procedure. if the following doesn't work for you:

ffmpeg -i input.mkv -c:a copy -c:v copy -map 0 output.mp4

If you want to add the subtitles, this is going to be hard. Since ISO MP4 does not support subtitles as far as I'm concerned, and FFmpeg won't copy them, you need a manual procedure.

If you want to add the subtitles, you might need a manual procedure if the following doesn't work for you:

ffmpeg -i input.mkv -c:a copy -c:v copy -map 0 output.mp4
added 703 characters in body; added 114 characters in body
Source Link
slhck
  • 230.1k
  • 71
  • 621
  • 603

In *nix, you could do the following. Just create a file convert.sh:

#!/bin/bash
find /path/to/input/folder -iname '*.mkv' -print0 | while read -d '' -r file; do
    ffmpeg -i "$file" -c:v copy -c:a copy ${file%%.mkv}.mp4
done

Replace the path to your video folder here. Make it executable with chmod +x convert.sh, then run it with ./convert.sh.

In Windows, you probably need two Batch files (shameless plug from here), one being startconvert.bat:

for %%i IN (*.mkv) DO (convert-to-mp4.bat "%%i") 
pause

And one that performs the conversion:

IF EXIST "%1.mp4" GOTO exit

@echo Conversion for %1 started on %DATE% %TIME% 
ffmpeg -i %1 -c:v copy -c:a copy %1.mp4

:exit 
@echo %1.mp4 already exists

Save both in the video folder. Simply run startconvert.bat from the folder you want to start the conversion from.

In *nix, you could do:

find /path/to/input/folder -iname '*.mkv' -print0 | while read -d '' -r file; do
    ffmpeg -i "$file" -c:v copy -c:a copy ${file%%.mkv}.mp4
done

In *nix, you could do the following. Just create a file convert.sh:

#!/bin/bash
find /path/to/input/folder -iname '*.mkv' -print0 | while read -d '' -r file; do
    ffmpeg -i "$file" -c:v copy -c:a copy ${file%%.mkv}.mp4
done

Replace the path to your video folder here. Make it executable with chmod +x convert.sh, then run it with ./convert.sh.

In Windows, you probably need two Batch files (shameless plug from here), one being startconvert.bat:

for %%i IN (*.mkv) DO (convert-to-mp4.bat "%%i") 
pause

And one that performs the conversion:

IF EXIST "%1.mp4" GOTO exit

@echo Conversion for %1 started on %DATE% %TIME% 
ffmpeg -i %1 -c:v copy -c:a copy %1.mp4

:exit 
@echo %1.mp4 already exists

Save both in the video folder. Simply run startconvert.bat from the folder you want to start the conversion from.

Source Link
slhck
  • 230.1k
  • 71
  • 621
  • 603
Loading