working with .mkv. files...

sRecollet wrote on 4/3/2025, 6:23 PM

Hi. I know it isn't the most common type to work with as I usually don't but have a lot of .mkv files I have to work with. I know they're not the most friendly codec to work with like HEVC as Vegas just implemented .mkv's being useable in Vegas in 20 I think. I like that they're good to work with on the timeline like when trimming and playing clips and that they're is no slight delay/lagging like you get when working with HEVC vids for example. But parts of clips they start glitching out like swapping frames super quick. Does that for like I dunno, 20% of a video file. The file itself is fine as if I watch it by itself on VLC no issues but when editing/rendering the glitches appear. Is their a fix or is this just expected because .mkv isn't the most friendly codec to work with? Anybody else notice this? Thanks.

Comments

john_dennis wrote on 4/3/2025, 7:21 PM

MKV is a wrapper and we don't know what might be inside of yours.

Use this post as a guide to tell us about the media in your project.

How-to-post-Mediainfo-and-Vegas-Pro-file-properties

sRecollet wrote on 4/3/2025, 8:12 PM

I've actually encountered another issue with MKV's I forgot to mention. While most allow me to use them they're are some that won't allow me to use them. The ones that work always take a few seconds once I click on the file to preview and/or add it to timeline whereas mp4's are instant but they are so smooth once on timeline. And then they're other MKV's that just won't allow me to load them up. The first one is the one that Vegas won't allow me to add/edit and the 2nd one I can add/edit but acts glitchy. And by glitch I mean it's just a rapid swapping of missing or mixed frames from previous frame or whatever.

--------------------------------------------------------------------1st MKV------------------------------------------------------------------------

General
Unique ID                                : 305632085486595293457473494563480519615 (0xE5EE9939F1D536D8834A3C6E7CF9C3BF)
Complete name                            : D:\NHL-2024-10-09_TOR@MTL.720pier.ru.mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 5.28 GiB
Duration                                 : 2 h 15 min
Overall bit rate                         : 5 595 kb/s
Frame rate                               : 59.940 FPS
Writing application                      : Lavf56.3.100
Writing library                          : Lavf56.3.100

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 4 frames
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 2 h 15 min
Bit rate mode                            : Constant
Nominal bit rate                         : 5 472 kb/s
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 59.940 (60000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.099
Time code of first frame                 : 22:57:56;00
Default                                  : Yes
Forced                                   : No

Audio
ID                                       : 2
Format                                   : AAC LTP
Format/Info                              : Advanced Audio Codec
Codec ID                                 : A_AAC-4
Duration                                 : 2 h 15 min
Channel(s)                               : 2 channels
Channel(s)_Original                      : 3 channels
ChannelLayout_Original                   : C L R
Sampling rate                            : 64.0 kHz
Frame rate                               : 62.500 FPS (1024 SPF)
Compression mode                         : Lossy
Delay relative to video                  : 16 ms
Default                                  : Yes
Forced                                   : No

----------------------------------------------------------------------2nd MKV-----------------------------------------------------------

General
Unique ID                                : 184378194668800757288218948695782342984 (0x8AB5F2D8CA87FDF4A7FC523263C44148)
Complete name                            : F:\Хоккей.НХЛ.РЧ.Бося-Монреаль.10.10.24.EN.720p.60fps.Мосгортранс.mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 3.35 GiB
Duration                                 : 2 h 8 min
Overall bit rate mode                    : Variable
Overall bit rate                         : 3 738 kb/s
Frame rate                               : 60.000 FPS
Encoded date                             : 2024-10-11 10:01:32 UTC
Writing application                      : mkvmerge v8.3.0 ('Over the Horizon') 64bit
Writing library                          : libebml v1.3.1 + libmatroska v1.4.2

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L3.2
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 4 frames
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 2 h 8 min
Bit rate mode                            : Variable
Bit rate                                 : 3 470 kb/s
Maximum bit rate                         : 3 600 kb/s
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Variable
Frame rate                               : 60.000 FPS
Original frame rate                      : 57.003 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.063
Stream size                              : 3.11 GiB (93%)
Default                                  : Yes
Forced                                   : No
Color range                              : Limited
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709

Audio
ID                                       : 2
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : A_AAC-2
Duration                                 : 2 h 8 min
Bit rate                                 : 265 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Delay relative to video                  : -35 ms
Stream size                              : 240 MiB (7%)
Default                                  : Yes
Forced                                   : No

john_dennis wrote on 4/3/2025, 8:47 PM

 

  • Report your results.

sRecollet wrote on 4/3/2025, 9:21 PM

Is this just converting the .mkv to .mp4 to make editable in Vegas? I've already had that in mind as I got video converters on my PC as had to do it already with the MKV's that won't open up at all but was trying to avoid doing that as I got over 80 of these MKVs to go through all 3 - 5ish GB file sizes so that's a lot to convert and go through and edit and for me...MKVs are smoother on the timeline to work with, even more then mp4's. But kinda figured that is what I must have to do.

RogerS wrote on 4/3/2025, 9:49 PM

Just remuxing to MP4 might be enough to make it editable (that's quicker than converting) since the source is already AVC/AAC.

sRecollet wrote on 4/3/2025, 10:53 PM

@RogerS How do I do that? Never heard of it.

RogerS wrote on 4/3/2025, 11:06 PM

Try Shutter Encoder as it can do this too

sRecollet wrote on 4/3/2025, 11:12 PM

@RogerS OK Thanks, will try that. But I've seen to be having luck with past couple files I just been editing. These are full NHL games and tried something different, tried rendering to MAGIX AVC/AAC MP4 as always, except this time I switched encode mode to NV Encoder and CBR instead and clips haven't glitched since. Did the next two games which are both the same (mkv) and both played and rendered flawlessly. Fingers crossed, don't know if just luck on the previous two or if that fixed it.

RogerS wrote on 4/3/2025, 11:56 PM

There might be something with how the clips were captured? If you see glitches when editing sometimes a different render setting won't help with that.

sRecollet wrote on 4/4/2025, 7:16 AM

Yea, it's whoever captures these, I dunno. Seems to be different types of MKV's. The glitches seem weird, like they will be there through one playthrough/render but then randomly will be fine at same spot of video where it was glitching before. I used to have similar issues kind of when I used to use .avi's with different codecs in Vegas. Like when I would minimize Vegas window or do something else on PC on differentwindow the video wouldn't play on timeline or be black screen or something and would have to go to Tools then Rebuild Offline Nested Audio and would fix the issue, that was back then though. Didn't seem to fix it this time but seems to be similar type of issue just not quite the same. Yea I don't see how switching those render/encoder settings would effect it playing fine in the timeline. But like I said, last two videos were fine...gonna continue to edit some more. If it's just the odd MKV that does that I'm fine with. Can just convert those to mp4 and edit, not too big of a deal. i just always get a little weird about doing extra converting as comes with slight quality loss even if re-encoding at similar and higher settings, depending on codec and video converter so always try use the original when possible. Most people wouldn't notice but I can notice the slightest bit of quality loss, very easy when you have high motion in videos but know how to correctly convert to avoid that. lol to give you guys an idea of what I'm editing is FULL NHL games, I'm making video of one player so have to go through each 2hr game and clip/trim out every time that player is on or mentioned throughout the game, so a lot of work. 82 games in a season! But I enjoy it too as I get to enjoy the highlights which I may have missed throughout the season. Then once I get all those clips clipped, trimmed and organized then I can make a video montage of that player for youtube. (Been video editing since 2001 and using Vegas when it came out a few years later) :)

RogerS wrote on 4/4/2025, 7:43 AM

Like AVI and MP4, MKV is just a container that has a variety of contents. The problem is some of them are poorly suited for editing and VEGAS only likes certain combinations.

There's no quality loss with remuxing, you're just taking the audio and video stream and putting it in a different container. In ShutterEncoder click "rewrap" for this. Re-encoding is different and can be noticeably lossy as you point out.

Good luck with your edits, that sounds like a lot of work.

sRecollet wrote on 4/4/2025, 7:58 AM

Thanks for all the info., yea grateful that Vegas at least allow you to import MKV's now. I will try that with ShutterEncoder when/if I encounter issue again.