351 (edited by CharlesS 2015-10-21 03:17:41)

Re: MKV Cutter - tool to cut h.264 mkv files frame accurate,...

MkvCutter.exe - System Error
    The program can't start because api-ms-win-crt-runtime-l1-1-0.dll is missing from your computer.

sad

Edit:
The above is the result when attempting to open MkvCutter.exe on a Win 7 box.

From Windows 10 it opens fine, but when you try to process anything it crashes with an error that it can't find LSMASHSource.dll, even though the dll does exist in the MkvCutter directory.

Avisynth error: LoadPlugin: unable to load "E:\Programs and Drivers\MkvCutter\LSMASHSource.dll", Module not found. Install missing library?

352

Re: MKV Cutter - tool to cut h.264 mkv files frame accurate,...

Ah, okay, will add the missing dlls and upload a new version.

Cu Selur

353

Re: MKV Cutter - tool to cut h.264 mkv files frame accurate,...

Reuploaded the version and added the missing dlls.
Try if that version works for you. (tested on Win 7, Win 10 and Windows XP, but one never knows)

Cu Selur

354

Re: MKV Cutter - tool to cut h.264 mkv files frame accurate,...

Initial testing looks good. I'll let you know if I run into the same problem again.

On another note, I would like to make a feature request/suggestion if I may. There needs to be a way to make the temp directory persist over program restarts.

I only use one master temp folder for all my work, and having to set it to the same thing each and every time is a pain-in-the-ass and really slows things down.

I was thinking of command-line argument, .ini, or anything really stupid-simple like that. Then one could just fill in the .ini or have a .bat file that invokes MkvCuttter with preferred Temp directory already filled in. Of course... if, when, and how you do it is up to you.

Thanks again for all this. Killer program.

355

Re: MKV Cutter - tool to cut h.264 mkv files frame accurate,...

The whole Mkv Cutter tool was meant as a proof of concept (the source code is horrible, since I thought I write it once and then throw it away wink).
So atm. I'm not really planning to add any additional features to it. (may be I'll rewrite it some time in the future, or integrate it into Hybrid, but atm. I only fix bugs I didn't anticipate when writing the program)

Cu Selur

356

Re: MKV Cutter - tool to cut h.264 mkv files frame accurate,...

And would a library like this one help identify the h265 parameters? It does seem to look out a look of info: https://github.com/agx/gst-plugins-bad/ … d27e435e65

357

Re: MKV Cutter - tool to cut h.264 mkv files frame accurate,...

If there was a command line tool which allowed to use the library and would allow to analyze a given h.265 raw stream: yes.

Cu Selur

358

Re: MKV Cutter - tool to cut h.264 mkv files frame accurate,...

The whole Mkv Cutter tool was meant as a proof of concept

Ah, I understand. Yeah, I've actually had people tell me that non-key frame cutting was impossible. So a PoC makes all the sense.

may be I'll rewrite it some time in the future, or integrate it into Hybrid

I have been wondering, does Hybrid do what MkvCutter does at all? Or is there zero overlap? If you're planning to integrate this into your more mature "flagship" suite I would probably much rather have that. Though, at the moment I really only need to clip MKV's accurately.

Either way, I'll probably check in from time to time.

359

Re: MKV Cutter - tool to cut h.264 mkv files frame accurate,...

Atm. both Hybrid and MkvCutter both use similar code to view .avs files, but thats it what they really have in common.
From time to time I think about integrating Mkv Cutter into Hybrid, but I never get around to do it since it would require me to rewrite most of the code Mkv Cutter Code and Mkv Cutter itself works reasonable well by itself. smile

Cu Selur

Ps.: The main problem with non-key frame cutting is to figure out the encoding settings needed to reencode a part of the stream in a way that it playback still works fine even once that part is used to replace another part.

360 (edited by Nick 2015-12-15 06:12:44)

Re: MKV Cutter - tool to cut h.264 mkv files frame accurate,...

Hi Selur, and thanks for MKVCutter. This looks to be the program I need to do some precision trimming of some MKV files I have because I'd like to cut some non-key frames out of some files I have.

Unfortunately, I am having trouble getting the program to process my files.  I'm running Windows 7 and have downloaded the latest version of the software from November 12, 2015.  I open a source file, and while it's processing, it stops and I get the error "Avisynth error: LoadPlugin: unable to load "C:\Users\Nick\Desktop\MkvCutter\LSMASHSource.dll", Module not found. Install missing library?"

The thing is though, the file is right there in the folder, just like CharlesS has posted above (except he was on Windows 10), so I don't know why the program says it can't load it.

Any ideas? Thank you again.

361

Re: MKV Cutter - tool to cut h.264 mkv files frame accurate,...

Might be that LSMASHSource.dll requires some runtime to be installed (thought it was compiled statically and didn't, but sadly that changes from time to time)

362

Re: MKV Cutter - tool to cut h.264 mkv files frame accurate,...

Aha, thanks for the suggestion. I found the latest LSMASHSource.dll along with some other avisynth .dlls here: https://www.dropbox.com/sh/3i81ttxf028m … asmwa?dl=0

After unzipping, I took all of the .dlls (6 total) from the AviSynth folder and just put them in my mkvCutter folder (and overwrote the LSMASHSource.dll that you included with the one from this Dropbox repository) and it worked. Not sure if I just needed an updated LSMASHSource.dll, or if I needed those other .dlls, but whatever, hey, it works!

Thanks again.

363

Re: MKV Cutter - tool to cut h.264 mkv files frame accurate,...

So, here I am, unfortunately in the need of bothering you once again.
1) Last mkvCutter version? Check! 20151112
2) mkv & h264? Check!
3) Progressive? Check!
4) Constant Frame? Check!
x264 crashes. Here is the file: http://www.mediafire.com/download/xgq84dfzxif1ofa/1.zip
Password: kor
I'm trying to cut from 0 to 3120. Thanks for any help you can provide!
Here is the log:

Reset
MkvInfoAnalyszer call: mkvinfo.exe --ui-language en  -s "M:\Videos\1.mkv"
 profile@Level:  High @L5.1
 video track numer: 1
 video stream frame rate: 29.97

Track 1: video, codec ID: V_MPEG4/ISO/AVC (h.264 profile: High @L5.1), mkvmerge/mkvextract track ID: 0, default duration: 33.367ms (29.970 frames/fields per second for a video track), language: jpn, pixel width: 640, pixel height: 480, display width: 630, display height: 480
Track 2: audio, codec ID: A_AC3, mkvmerge/mkvextract track ID: 1, default duration: 32.000ms (31.250 frames/fields per second for a video track), language: jpn, sampling freq: 48000, channels: 2
 frame count: 9257
MkvvInfo detected 9257 frames 156 of them are key frames
 video stream key frame count: 156, average distance: 59
MediaInfo call: "C:\Users\Username\Programs\MkvCutter\MediaInfo.exe" --Full "M:\Videos\1.mkv"
 video scan order: progressive
 profile@Level: High@L5.1
 cabac: 1
 cabac: 1
 reference frames: 12
 aspect ratio of input: 0.984
Found x264 encoding settings!
 frame rate mode: cfr
 audio format: AC-3
 video scan order: progressive
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]
 Importing M:\Videos\1.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,..
collecting cut list and audio cuts,..
 current cut: 0000-3120
 -> time cut: -00:01:44.103
   B1: adding startCut to cuts: 0 0-41 42
   B2: adding middleCut to cuts: 42 42-3066 3067
   B4: adding endCut to cuts: 3067 3067-3120 3124
 -> calculated audio length: 00:01:44.102, in seconds: 104.103
 -> calculated video length: 00:01:44.104, in seconds: 104.104
building trim and video parts,...
  adding(6) 1_cut_001.mkv <> KEEP for 0-41
   removed last, now adding(7) 1_cut_001.mkv <> KEEP for 0-3067
  adding(2) 1_cut_002.mkv <> Trim(0,length=53) for 3067-3120
New temp folder: M:\Videos
mkvParts count: 2
0-3067
  3067-3124
Calling video cutter,..
 m_mkvVideoParts:
0-3067
 3067-3124
Saving options:
---------------------------
-o
M:\\Videos\\2.mkv
--split
parts-frames:0-3067,3067-3124
--no-audio
--no-subtitles
--no-buttons
--no-track-tags
--no-chapters
--no-attachments
--no-global-tags
M:\\Videos\\1.mkv
---------------------------
to:  M:\Videos\2_mkvOptions.txt
Saved M:\Videos\2_mkvOptions.txt.
Video split call: "C:\Users\Username\Programs\MkvCutter\mkvmerge.exe" @"M:\Videos\2_MKVO~1.TXT"
MkvMerge output: mkvmerge v8.5.2 ('Crosses') 32bit
MkvMerge output: 'M:\Videos\1.mkv': Using the demultiplexer for the format 'Matroska'.
MkvMerge output: 'M:\Videos\1.mkv' track 0: Using the output module for the format 'AVC/h.264'.
MkvMerge output: The file 'M:\Videos\2-001.mkv' has been opened for writing.
 -> new temp file: M:\Videos\2-001.mkv
MkvMerge output: Progress: 0%
MkvMerge output: The cue entries (the index) are being written...
MkvMerge output: The file 'M:\Videos\2-002.mkv' has been opened for writing.
 -> new temp file: M:\Videos\2-002.mkv
MkvMerge output: The cue entries (the index) are being written...
MkvMerge output: Progress: 100%
Muxing took 0 seconds.
deleted M:\Videos\2_mkvOptions.txt
 video splitter created the following files:
  1: M:\Videos\2-001.mkv
  2: M:\Videos\2-002.mkv
mkvSplit finished,..
handling split files,...
 trim value for 1_cut_001.mkv: KEEP
 trim value for 1_cut_002.mkv: Trim(0,length=53)
 createAvisynthSkript(M:\Videos\2-002.mkv, Trim(0,length=53))
  Avisynth file name: M:\Videos\2-002.avs
  Saved avisynth script:
   ----------------------------

LoadPlugin("C:\Users\Username\Programs\MkvCutter\LSMASHSource.dll")
LWLibavVideoSource("M:\Videos\2-002.mkv", cache=false)

Trim(0,length=53)
   ----------------------------
  to: M:\Videos\2-002.avs
FFmpeg extractor call: "C:\Users\Username\Programs\MkvCutter\ffmpeg.exe" -y -i "M:\Videos\2-001.mkv" -vcodec copy -an -sn -vsync 0 -bsf:v h264_mp4toannexb "M:\Videos\2-001.264"
ffmpegFinished: 0, status 0
mkvExtract finished,..
Analyzing M:\Videos\2-001.264 with h264_parse,..
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 reference frames: 12
 b-frames: 2
 weigthed p-frames: 0
 weigthed b-frames: 2
 qpMin: 0
 chroma offset: 0
 h264_parse finished analysing the input,..
  Detected settings:
    AVCProfileLevel: High@L5.1
   x264Settings: --cabac --ref 12 --deblock 1:1 --partitions i4x4,i8x8,p8x8,b8x8 --me umh --subme 7 --merange 16 --trellis 1 --8x8dct --deadzone-inter 21 --deadzone-intra 11 --qblur 0 --bframes 16 --b-pyramid strict --b-adapt 1 --b-bias 0 --direct auto --keyint 250 --min-keyint 25 --scenecut 40(pre) --ratetol 1.0 --qcomp 1.00 --qpmin 10 --qpmax 41 --qpstep 4 --cplxblur 20.0 --qblur 0.5 --ipratio 1.40 --pbratio 1.30 --aq-mode 1 --aq-strength 0.5
     SPS: 0
     FPS: 29.97
 creating x264 reencode call for: M:\Videos\2-002.avs
m_reencodedVideoFiles:
M:\Videos\2-001.264
  M:\Videos\2-002_reencode.264
 -> x264 call: "C:\Users\Username\Programs\MkvCutter\x264.exe" --profile high --level 51 --sps-id 0 --cabac --ref 12 --deblock 1:1 --partitions i4x4,i8x8,p8x8,b8x8 --me umh --subme 7 --merange 16 --trellis 1 --8x8dct --deadzone-inter 21 --deadzone-intra 11 --qblur 0 --bframes 16 --b-pyramid strict --b-adapt 1 --b-bias 0 --direct auto --keyint 250 --min-keyint 25 --scenecut 40(pre) --ratetol 1.0 --qcomp 1.00 --qpmin 10 --qpmax 41 --qpstep 4 --cplxblur 20.0 --qblur 0.5 --ipratio 1.40 --pbratio 1.30 --aq-mode 1 --aq-strength 0.5 --stitchable --non-deterministic --thread-input --crf 19 --demuxer avs --fps 30000/1001 --sar 984:1000 -o "M:\Videos\2-002_reencode.264" "M:\Videos\2-002.avs"
encoding next file,...
 x264 call: "C:\Users\Username\Programs\MkvCutter\x264.exe" --profile high --level 51 --sps-id 0 --cabac --ref 12 --deblock 1:1 --partitions i4x4,i8x8,p8x8,b8x8 --me umh --subme 7 --merange 16 --trellis 1 --8x8dct --deadzone-inter 21 --deadzone-intra 11 --qblur 0 --bframes 16 --b-pyramid strict --b-adapt 1 --b-bias 0 --direct auto --keyint 250 --min-keyint 25 --scenecut 40(pre) --ratetol 1.0 --qcomp 1.00 --qpmin 10 --qpmax 41 --qpstep 4 --cplxblur 20.0 --qblur 0.5 --ipratio 1.40 --pbratio 1.30 --aq-mode 1 --aq-strength 0.5 --stitchable --non-deterministic --thread-input --crf 19 --demuxer avs --fps 30000/1001 --sar 984:1000 -o "M:\Videos\2-002_reencode.264" "M:\Videos\2-002.avs"
x264 [error]: invalid argument: scenecut = 40(pre)

ExitCode: -1, ExitStatus: 0
 x264 encoding finished,..
Resetting since x264 crashed,..
Reset
Deleting M:\Videos\1.avs,..

364 (edited by Selur 2016-04-04 06:18:47)

Re: MKV Cutter - tool to cut h.264 mkv files frame accurate,...

I see the problem. smile
Seems like the SEI info (MediaInfo>Encoding Settings) reports not the normal 'scenecut 40', but 'scenecut 40(pre)' since I have never seen such an info before MKV Cutter simply copies it and x264 stumbles over it.
-> will fix

=> uploaded a new version which should fix the issue.

Cu Selur

365

Re: MKV Cutter - tool to cut h.264 mkv files frame accurate,...

Geez, not only your tool is better than many commercial video editors, even your support is as well. tongue
Hey, 2 other things that I've been meaning to ask for a while. I don't know whether if they are possible or not, perhaps it's too complicated and cannot be done, but if not, could you consider this whenever you have free time and are in the mood of working on it?

1) My screen is 1920x1080. When I have a full HD video the preview area takes almost the whole program, which is fine; but that means that more often than not I cannot see which frame I'm currently on. Because if the background is black (and it's often the case when you cut a video, since it's quite normal to make the cut at the point where the image and the music stops, right before something new begins) the font color stays black as well, so it's impossible to see it. It's quite bothersome. Could you make the max height of the preview right over the horizontal sliding bar that lets you navigate the video to avoid that problem?

2) Would it be possible to add the current timestamp in the video, with milliseconds? I'm not asking about being able to cut by time, but just to have it displayed right next to the current frame number. Sometimes I want to cut by time, and I have to make a few guesses to get it right, it would be awesome to have the time displayed as well (even if I navigate through frames it would be very quick to find which frame has the exact timestamp I need).

Thanks a lot for fixing the problem! Have a nice day.

366

Re: MKV Cutter - tool to cut h.264 mkv files frame accurate,...

I'll look into it.

367

Re: MKV Cutter - tool to cut h.264 mkv files frame accurate,...

Uploaded a new version (same name), which should help with both problems.

368

Re: MKV Cutter - tool to cut h.264 mkv files frame accurate,...

Now the avs viewer crashes with every file I try to open.

Reset
MkvInfoAnalyszer call: mkvinfo.exe --ui-language en  -s "M:\1.mkv"
 profile@Level:  High @L5.1
 video track numer: 1
 video stream frame rate: 29.97

Track 1: video, codec ID: V_MPEG4/ISO/AVC (h.264 profile: High @L5.1), mkvmerge/mkvextract track ID: 0, default duration: 33.367ms (29.970 frames/fields per second for a video track), language: jpn, pixel width: 640, pixel height: 480, display width: 630, display height: 480
Track 2: audio, codec ID: A_AC3, mkvmerge/mkvextract track ID: 1, default duration: 32.000ms (31.250 frames/fields per second for a video track), language: jpn, sampling freq: 48000, channels: 2
 frame count: 9257
MkvvInfo detected 9257 frames 156 of them are key frames
 video stream key frame count: 156, average distance: 59
MediaInfo call: "C:\Users\Username\Programs\MkvCutter\MediaInfo.exe" --Full "M:\1.mkv"
 video scan order: progressive
 profile@Level: High@L5.1
 cabac: 1
 cabac: 1
 reference frames: 12
 aspect ratio of input: 0.984
Found x264 encoding settings!
 frame rate mode: cfr
 audio format: AC-3
 video scan order: progressive
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 M:\1_tmp.avs
 Importing M:\1_tmp.avs into environment,..
Avisynth error: Import: couldn't open "C:\Users\Username\Programs\MkvCutter"
Resetting since avs viewer crashed,..
Reset
Deleting M:\1.avs,..

I have to go now unfortunately, but as soon as I wake up in the night I'll test it again. Thanks a lot for your help!

369

Re: MKV Cutter - tool to cut h.264 mkv files frame accurate,...

will look into it

370

Re: MKV Cutter - tool to cut h.264 mkv files frame accurate,...

Might be that something was off when I uploaded the update, reuploaded it.

371 (edited by Seeker320 2016-04-05 08:17:06)

Re: MKV Cutter - tool to cut h.264 mkv files frame accurate,...

So, issue nº 2 is solved, thanks a lot!
Issue nº 1 remains the same. Even the timer that you set for issue nº 2 cannot be seen, since it's in the bottom of the video (so the lines with the log are on top of it). It's as if the video isn't resized at all. If you try it with a video with equal or greater resolution than your screen you'll see it.

Edit: As I told you, my resolution is 1920x1080.
http://i.imgur.com/Qnch5KS.jpg - Here is the mkvCutter with a 640x480 source, you can see how I know that I'm in frame 3120 and at the timestamp 00:01:44.104. That's perfect.
http://i.imgur.com/1b9Qvdf.jpg - But here is the mkvCutter with a 1920x1080 source (I guess it would be the same with larger sources), you can see how I don't know where the heck I'm at, even the timestamp is hidden.

And a funny thing, I tried to run the program with the video in M:\1.mkv and it gave me the same avs crash from yesterday; but if I move the video into a folder it works. Have a nice day!

372

Re: MKV Cutter - tool to cut h.264 mkv files frame accurate,...

Mal eine grundlegende Frage zu MKVcutter, ich benutze es um meine mkvs zu schneiden die vorher mit ffmpg von einer .ts datei codiert wurden.
Da es sich um HDTV rips handelt ist in jedem Video ein delay. MKVcutter scheint dieses delay aber zu ignorieren und die geschittenen mkv´s sind async. Ich möchte gern bei MKVcutter bleiben da es mir 1:1 und ohne header compression und mit erhaltenen x246 settings im Mediainfo raushaut. Kenne sonst kein programm das es in der art macht.
Könnte man in MKVcutter diese Video delay option noch einbauen ?

373

Re: MKV Cutter - tool to cut h.264 mkv files frame accurate,...

@Seeker320: Will try to reproduce the issue (have to create a video with a 5k Resolution to check first, so that the video has the same resolution as my display).

@E46ME:

ich benutze es um meine mkvs zu schneiden die vorher mit ffmpg von einer .ts datei codiert wurden.

Doofe Idee, verwende lieber mkvmerge, ffmpeg erzeugt je nach Version 'merkwürdige' mkvs. wink

Könnte man in MKVcutter diese Video delay option noch einbauen ?

Delays werden eigentlich über MediaInfo ausgelesen, wenn ffmpeg da allerdings an den TimeCodes 'rumsaut' wäre der Stream vfr, womit MKV Cutter nicht umgehen kann.

374

Re: MKV Cutter - tool to cut h.264 mkv files frame accurate,...

Hi Selur,

mein problem beim schneiden mit mkvmerge ist das die x264 encoder settings verloren gehen wenn der anfang des films geschnitten wird. Und genau diese Infos mag ich gerne behalten und der mkvcutter machte das wunderbar ^^
Sonst noch eine idee wie ich das problem lösen kann ?

375

Re: MKV Cutter - tool to cut h.264 mkv files frame accurate,...

Du sollst nicht mkvmerge als alternative zu MKV Cutter sondern anstatt ffmpeg verwenden. wink