Log in

View Full Version : How to check if *.mkv video is internally correctly encoded?


mike23
20th March 2015, 19:06
I have got a *.mkv video file.
At a first glance everything seems ok.

I can play the video with VLC player in full length.

However when I try to re-encode it (with various tools) the encoding stops around 1h and 20 min.

I guess there is internally a hidden coding/format error in file.

Is there a tool which is able to check the formal validity of a *.mkv video file?

StainlessS
28th March 2015, 22:37
This just remuxes to mkv, if its short then there's a problem, also keep an eye on console output.

Whatever.bat

setlocal

REM Where to Find ffmpeg
set FFMPEG="C:\BIN\ffmpeg.exe"

REM Where to get input file, No terminating Backslash, "." = current directory (ie same as bat file)
set INDIR="."

REM Where to place output file, No terminating Backslash. ".\OUTPUT" = OUTPUT folder in current directory
set OUTDIR=".\OUTPUT"

FOR %%A IN (*.MKV) DO (
%FFMPEG% -i "%INDIR%\%%A" -vcodec copy -acodec copy "%OUTDIR%\%%~nxA.MKV"

)

Pause


EDIT: Above will remux all mkv files in current directory.
You can also add other file type extensions to mux into mkv changing this line to eg
FOR %%A IN (*.MKV *.mpg *.avi *.mp4)