This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

MKV Cutter x264 level argument error
#1
Dear Selur,
your MKV Cutter looks great; however, it fails on my computer.

The x264 complains about the level argument which is 31@Main in my case. I tried to check "keep intermediate" and run the command on cmd while changed the argument to 31 instead of 31@Main and it seems to work. I assume it is not possible to force MKV Cutter to use other level argument for x264, is it? Could you please suggest what to try or what can be wrong?

Reset
MkvInfoAnalyszer call: mkvinfo.exe --ui-language en  -s "C:\Users\Administrator\Downloads\trz\001ac3.mkv"
profile@Level:  Main @L3.1
video track numer: 1
video stream frame rate: 50

Track 1: video, codec ID: V_MPEGH/ISO/HEVC (HEVC profile: Main @L3.1), mkvmerge/mkvextract track ID: 0, language: und, default duration: 20.000ms (50.000 frames/fields per second for a video track), pixel width: 960, pixel height: 540, Colour range: 1
Track 2: audio, codec ID: A_AC3, mkvmerge/mkvextract track ID: 1, language: cze, channels: 2, sampling freq: 48000, bits per sample: 32
frame count: 155116
MkvvInfo detected 155116 frames 3986 of them are key frames
video stream key frame count: 3986, average distance: 38
MediaInfo call: "C:\Users\Administrator\Downloads\trz\MkvCutter2019\MediaInfo.exe" --Full "C:\Users\Administrator\Downloads\trz\001ac3.mkv"
profile@Level: Main@L3.1@Main
aspect ratio of input: 1
frame rate mode: cfr
audio format: AC-3
video scan order: progressive
FFIndexCaller(C:\Users\Administrator\Downloads\trz\001ac3.mkv, C:\Users\ADMINI~1\DOWNLO~1\trz\001ac3.ffindex)
FFIndex call: "C:\Users\Administrator\Downloads\trz\MkvCutter2019\ffmsindex.exe" "C:\Users\Administrator\Downloads\trz\001ac3.mkv" "C:\Users\ADMINI~1\DOWNLO~1\trz\001ac3.ffindex"
indexerFinished,..
initializing the avisynth script environment,..
Loading avisynth.dll
loaded CreateScriptEnvironment definition from dll,..
looking for avisynth version,..
current avisynth version: AviSynth 2.60, build:Feb 20 2015 [03:16:45]
Saved temp avs file to C:\Users\ADMINI~1\DOWNLO~1\trz\001ac3_tmp.avs
Importing C:\Users\ADMINI~1\DOWNLO~1\trz\001ac3_tmp.avs into environment,..
grabbing clip infos,..
  checking colorspace,..
  current color space is Yv12
invoking ConvertToRGB
initializating the clip anew,..
grabbing clip infos,..
adjusting slider to frame count,..
showing first frame,..
set cut-start to: 33051
collecting cut list and audio cuts,..
current cut: 033051-043004
-> time cut: 00:11:01.019-00:14:20.080
   B1: adding startCut to cuts: 33037 33051-33084 33085
   B2: adding middleCut to cuts: 33085 33085-42983 42984
   B4: adding endCut to cuts: 42984 42984-43004 43029
-> calculated audio length: 00:03:19.061, in seconds: 199.061
-> calculated video length: 00:03:19.060, in seconds: 199.06
building trim and video parts,...
  adding(4) 001ac3_cut_001.mkv <> Trim(14,length=33) for 33051-33084
  adding(6) 001ac3_cut_002.mkv <> KEEP for 33085-42983
  adding(2) 001ac3_cut_003.mkv <> Trim(0,length=20) for 42984-43004
New temp folder: C:\Temp
mkvParts count: 3
33037-33085
  33085-42984
  42984-43029
Calling video cutter,..
m_mkvVideoParts:
33037-33085
33085-42984
42984-43029
Saving options:
---------------------------
-o
C:\\Temp\\edit.mkv
--split
parts-frames:33037-33085,33085-42984,42984-43029
--no-audio
--no-subtitles
--no-buttons
--no-track-tags
--no-chapters
--no-attachments
--no-global-tags
C:\\Users\\Administrator\\Downloads\\trz\\001ac3.mkv
---------------------------
to:  C:\Temp\edit_mkvOptions.txt
Saved C:\Temp\edit_mkvOptions.txt.
Video split call: "C:\Users\Administrator\Downloads\trz\MkvCutter2019\mkvmerge.exe" @"C:\Temp\EDIT_M~1.TXT"
MkvMerge output: mkvmerge v12.0.0 ('Trust / Lust') 32bit
MkvMerge output: 'C:\Users\Administrator\Downloads\trz\001ac3.mkv': Using the demultiplexer for the format 'Matroska'.
MkvMerge output: 'C:\Users\Administrator\Downloads\trz\001ac3.mkv' track 0: Using the output module for the format 'HEVC/h.265'.
MkvMerge output: Progress: 0%
MkvMerge output: The file 'C:\Temp\edit-001.mkv' has been opened for writing.
-> new temp file: C:\Temp\edit-001.mkv
MkvMerge output: The cue entries (the index) are being written...
MkvMerge output: The file 'C:\Temp\edit-002.mkv' has been opened for writing.
-> new temp file: C:\Temp\edit-002.mkv
MkvMerge output: The cue entries (the index) are being written...
MkvMerge output: The file 'C:\Temp\edit-003.mkv' has been opened for writing.
-> new temp file: C:\Temp\edit-003.mkv
MkvMerge output: The cue entries (the index) are being written...
MkvMerge output: Progress: 100%
MkvMerge output: Multiplexing took 0 seconds.
only one output file: C:\Temp\edit.mkv
video splitter created the following files:
  1: C:\Temp\edit-001.mkv
  2: C:\Temp\edit-002.mkv
  3: C:\Temp\edit-003.mkv
mkvSplit finished,..
handling split files,...
trim value for 001ac3_cut_001.mkv: Trim(14,length=33)
createAvisynthSkript(C:\Temp\edit-001.mkv, Trim(14,length=33))
  Avisynth file name: C:\Temp\edit-001.avs
  Saved avisynth script:
   ----------------------------

LoadPlugin("C:\Users\Administrator\Downloads\trz\MkvCutter2019\ffms2.dll")
FFVideoSource("C:\Temp\edit-001.mkv", threads=1)

Trim(14,length=33)
   ----------------------------
  to: C:\Temp\edit-001.avs
trim value for 001ac3_cut_002.mkv: KEEP
trim value for 001ac3_cut_003.mkv: Trim(0,length=20)
createAvisynthSkript(C:\Temp\edit-003.mkv, Trim(0,length=20))
  Avisynth file name: C:\Temp\edit-003.avs
  Saved avisynth script:
   ----------------------------

LoadPlugin("C:\Users\Administrator\Downloads\trz\MkvCutter2019\ffms2.dll")
FFVideoSource("C:\Temp\edit-003.mkv", threads=1)

Trim(0,length=20)
   ----------------------------
  to: C:\Temp\edit-003.avs
FFmpeg extractor call: "C:\Users\Administrator\Downloads\trz\MkvCutter2019\ffmpeg.exe" -y -i "C:\Temp\edit-002.mkv" -vcodec copy -an -sn -vsync 0 -bsf:v h264_mp4toannexb "C:\Temp\edit-002.264"
ffmpegFinished: 1, status 0
video extraction finished,..
Analyzing C:\Temp\edit-002.264 with h264_parse,..
h264_parse finished(-1073741819, 1).
weigthed p-frames: 0
weigthed b-frames: 0
qpMin: 72
chroma offset: 9
weigthed p-frames: 0
weigthed b-frames: 0
qpMin: -1130516
chroma offset: 17
h264_parse finished analysing the input,..
  Detected settings:
    AVCProfileLevel: Main@L3.1@Main
    Interlaced: progressive
    Cabac: true
    AVCRefFrames: 1
    Chroma offset: 17
    BFrames: 0
    WeightedB: 0
    WeightP: 0
    Min Keyint:
    Max Keyint:
    QPMin: -1130516
    AspectRatio: 1
     SPS: 0
     FPS: 50
creating x264 reencode call for: C:\Temp\edit-001.avs
-> x264 call: "C:\Users\Administrator\Downloads\trz\MkvCutter2019\x264.exe" --profile main --level 31@Main --sps-id 0 --ref 1 --bframes 0 --weightp 0 --keyint 38 --chroma-qp-offset 17 --stitchable --non-deterministic --thread-input --crf 19 --demuxer avs --fps 5000000/100000 -o "C:\Temp\edit-001_reencode.264" "C:\Temp\edit-001.avs"
creating x264 reencode call for: C:\Temp\edit-003.avs
-> x264 call: "C:\Users\Administrator\Downloads\trz\MkvCutter2019\x264.exe" --profile main --level 31@Main --sps-id 0 --ref 1 --bframes 0 --weightp 0 --keyint 38 --chroma-qp-offset 17 --stitchable --non-deterministic --thread-input --crf 19 --demuxer avs --fps 5000000/100000 -o "C:\Temp\edit-003_reencode.264" "C:\Temp\edit-003.avs"
encoding next file,... (2 left)
x264 call: "C:\Users\Administrator\Downloads\trz\MkvCutter2019\x264.exe" --profile main --level 31@Main --sps-id 0 --ref 1 --bframes 0 --weightp 0 --keyint 38 --chroma-qp-offset 17 --stitchable --non-deterministic --thread-input --crf 19 --demuxer avs --fps 5000000/100000 -o "C:\Temp\edit-001_reencode.264" "C:\Temp\edit-001.avs"
x264 [error]: invalid argument: level = 31@Main

ExitCode: -1, ExitStatus: 0
x264 encoding finished,..
Resetting since x264 crashed,..
Reset

I tried both 2017 and 2019 version of MKV Cutter from your Google Drive and the behaviour is the same.

Thank you,
Vojtech
Reply
#2
Problem is that you are not trying to cut H.264, but H.265 content frame accurate.
(MKV Cutter, can be 'misused' to cut H.265 content but only key-frame not frame accurate.)
x264 can only create H.264 content and H.265 has Profile@Level@Tier while H.264 only has Profile@Level, which is why the extraction of the level fails. Smile

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#3
Oh, thank you for the explanation. I was convinced it is H.264, now I see it is not true.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)