Jump to content

Playback corruption on split mkv files


MyronAub
Go to solution Solved by Guest asrequested,

Recommended Posts

MyronAub

Some TV Show Blu-rays (e.g. "Lost") have two episodes in one file which when ripped I prefer to split into two individual episodes/files using MKVToolNix (v36.0.0 64-bit) so that Emby/Trakt correctly marks them as collected/watched etc.

 

My problem is that, while every normal individual episode/file plays perfectly, every single "split" episode/file shows corruption/glitches on playback; the glitches are either multi-colour blocks when played back in Emby Web Client or green bars in Amazon FireTV (screenshot attached.) The glitches keep appearing every few minutes making the video un-watchable and so I always end up having to find and load up the physical Blu-ray to watch the episode... annoying to say the least.

 

For the avoidance of doubt if I directly (i.e. not via Emby) watch the same file using VLC or Windows Media Player then there is no corruption evident so it does seem as though Emby is introducing the video glitches somehow and only on any file that has been split from a larger file.

 

Any ideas on what causes this and how to fix it?

 

 

embyserver.txt

post-373221-0-73846500-1569664051_thumb.jpg

Link to comment
Share on other sites

rbjtech

.. you could try remuxing the offending MKV using ffmpeg 

 

ffmpeg -i <input.mkv> -c copy -map 0 <output.mkv>

 

This will just re-copy all the native streams and re-write them with new MKV headers.

  • Like 1
Link to comment
Share on other sites

MyronAub

.. you could try remuxing the offending MKV using ffmpeg 

 

This will just re-copy all the native streams and re-write them with new MKV headers.

 

Thanks for the suggestion but I've just tried this and it makes no difference; I still get intermittent green glitch bars across the screen when playing the remuxed file through Emby.

Link to comment
Share on other sites

MyronAub

And the originals never did this?

 

Correct, I've just re-ripped the multi-episode file to be absolutely sure:

 

The original multi-episode file plays fine in Emby, VLC and Windows Media Player however if I use MKVToolNix to split the original file into two episodes then both smaller files still play fine in VLC and Windows Media Player but Emby has the intermittent green glitch bars ( regardless of whether I remux as suggested by rbjtech.) As an extra test I've just loaded up Plex on the Amazon FireTV and that plays the split files fine so there does seem to be something specific to Emby that has problems playing my split files.

 

(I'd have attached the video file(s) if it helped but it's a 16Gb file!)

Link to comment
Share on other sites

MyronAub

I'm assuming h264 and direct playing not direct streaming?

 

I don't understand what or how to check "h264" is but the Emby Dashboard confirms "Direct Streaming."

 

5d90986b6b752_directstreaming.jpg

Link to comment
Share on other sites

The mkvtoolnix does rewrite the streams not only on H264 but on MPEG2 as well. these changes do sometimes have an impact,. These can have unexpected (but different) impacts not only on Emby but also on both Plex and vlc at least, in my experience. I have demo files that I can  play in vlc, run through mkvtoolnix without any splitting or anything, and if I play the result file back in vlc it will glitch, give greenscreen, etc.

Link to comment
Share on other sites

Guest asrequested

It's being remuxed. I'll bet that's the issue. Probably doesn't support the audio. Try choosing a basic AC3/Dolby audio track. That should stop it remuxing.

  • Like 1
Link to comment
Share on other sites

MyronAub

It's being remuxed. I'll bet that's the issue. Probably doesn't support the audio. Try choosing a basic AC3/Dolby audio track. That should stop it remuxing.

 

Assuming you mean when playing back the video, there are two audio tracks (DTS and DTS-HD) to choose from but I get green glitches regardless of which audio track I choose. Similarly, the non-split files also have DTS and DTS-HD audio tracks but don't exhibit the green glitch problem.

 

So thanks for the suggestion but it doesn't seem to be the solution.

Link to comment
Share on other sites

Guest asrequested

Assuming you mean when playing back the video, there are two audio tracks (DTS and DTS-HD) to choose from but I get green glitches regardless of which audio track I choose. Similarly, the non-split files also have DTS and DTS-HD audio tracks but don't exhibit the green glitch problem.

 

So thanks for the suggestion but it doesn't seem to be the solution.

Right, but you split a single file into two. So the key frames are probably different. And when remuxed, that might cause an issue. Your fire device probably doesn't support dts so the server needs to change the audio and repack it for HLS. And this, I suspect is likely the issue. Does this also happen with the first half of the file that you split?

Link to comment
Share on other sites

  • Solution
Guest asrequested

I'll bet it's also fine if you lower the bitrate in the app just lower than the video bitrate and you force a full transcode.

  • Like 1
Link to comment
Share on other sites

Mkvmerge always splits on a keyframe. It doesnt change that. It does various other things though that I dont well understand.

The first thing to do is check the headers before and after.

Also, does the same thing happen if you run the material through mkvmerge without splitting?

Edited by scb99
Link to comment
Share on other sites

MyronAub

 Your fire device probably doesn't support dts so the server needs to change the audio and repack it for HLS. And this, I suspect is likely the issue. Does this also happen with the first half of the file that you split?

 

Yes, the glitches occur with both halves of the split file.

 

Also, does the same thing happen if you run the material through mkvmerge without splitting?

 

I'll try that next.

 

PS Especially on interlaced material. Dont know if Lost is, but TV shows esp the older ones quite often are.

 

Just for reference, Lost is progressive not interlaced.

 

Trying to solve this from a different angle, is there any software other than MKVToolNix recommended for splitting mkv files?

Link to comment
Share on other sites

PenkethBoy

you can do it with ffmpeg

 

ffmpeg -ss 00:05:00 -i 'Fleabag - S01E03 - Episode 3.mkv' -to 00:03:00 -c copy output.mkv
 
5:00 is start point - 5 mins
3:00 is a three minute video (approx)
  • Like 1
Link to comment
Share on other sites

rbjtech

Also to add - as you have the original Blu-ray, why not rip them by individual episode in the first place.. ?

Link to comment
Share on other sites

MyronAub

 

you can do it with ffmpeg

 

ffmpeg -ss 00:05:00 -i 'Fleabag - S01E03 - Episode 3.mkv' -to 00:03:00 -c copy output.mkv

 

Thanks! Trying this now...

 

Also to add - as you have the original Blu-ray, why not rip them by individual episode in the first place.. ?

 

I use MakeMKV to rip from the Blu-ray; the first two episodes are one file on the Blu-ray and I wasn't aware of and/or can't find anything that lets me rip the episodes individually from the Blu-ray?

Link to comment
Share on other sites

MyronAub

 

you can do it with ffmpeg

 

ffmpeg -ss 00:05:00 -i 'Fleabag - S01E03 - Episode 3.mkv' -to 00:03:00 -c copy output.mkv

 

OK, great, this is looking promising!

 

I've split the original file using ffmpeg as suggested and a quick test hasn't thrown up any glitches in the first 4 minutes of play; using MKVToolNix I would have had four or more glitches by now so this may be a workaround.

 

Many thanks for everyone's help and suggestions so far, I'll do some more comprehensive testing tomorrow and report back in case it helps anyone else with similar issues.

  • Like 1
Link to comment
Share on other sites

rbjtech

 

I use MakeMKV to rip from the Blu-ray; the first two episodes are one file on the Blu-ray and I wasn't aware of and/or can't find anything that lets me rip the episodes individually from the Blu-ray?

 

Ah ok - a poorly authored Blu-Ray - it must use chapter points to select episodes  :mellow: - lets hope the MKV split works out for you. 

Link to comment
Share on other sites

MyronAub

you can do it with ffmpeg

 

ffmpeg -ss 00:05:00 -i 'Fleabag - S01E03 - Episode 3.mkv' -to 00:03:00 -c copy output.mkv

 

So as promised I did some more testing. The last two episodes on the 'Lost' Blu-ray box set final season disc are also authored as one file. Splitting these with MKVToolNix works fine in Plex, VLC and Windows Media Player but results in glitches on all my versions of Emby. Splitting the multi-episode file with ffmpeg as suggested by PenkethBoy creates two episodes/files that work fine in everything including Emby so, for whatever reason, there's some sort of issue going on with Emby and my MKVToolNix split files.

 

That's all good as I now have a workaround moving forward but as I already have loads of MKVToolNix split files from all my other DVD/Blu-ray rips the following suggestion works out even better in my particular case:

 

I'll bet it's also fine if you lower the bitrate in the app just lower than the video bitrate and you force a full transcode.

 

You were absolutely correct! :)

 

The split files were at 21.7Mb/s and my app was set to Maximum Auto; dropping the app down to 21MB/s caused Direct Play/Transcoding instead of Direct Stream and the glitches went away. Thank you so much as that has saved me a load of grief having to re-rip/re-mux all my existing split files.

Link to comment
Share on other sites

  • 2 weeks later...

Hi MyronAub

The solution by Doofus is obviously a workaround, not a real solution.

Because I have a load of mkvmerge stuff I am quite keen to find the real underlying story.

Obviously it’s not a big priority but if you have a chance, can you see if your original files have avalue for Minimum cache in the video headers, and if so, whether adding the same value for this in the split file makes the problem go away?

No big deal but if you get a chance one day would be great to know one way or the other!

Cheers Steve

Link to comment
Share on other sites

  • 4 weeks later...
MyronAub

Obviously it’s not a big priority but if you have a chance, can you see if your original files have avalue for Minimum cache in the video headers,

 

Sorry it took so long to get around to this. I've just re-ripped this and can't see the parameter you refer to but here's the full list from MediaInfo:

Complete name                            : F:\My Videos\Rips\Video\Lost- Season 6 (Disc 1)\Lost- Season 6 (Disc 1)_t00.mkv
Format                                   : Matroska
Format version                           : Version 2
File size                                : 16.1 GiB
Duration                                 : 1 h 24 min
Overall bit rate mode                    : Variable
Overall bit rate                         : 27.4 Mb/s
Movie name                               : Lost: Season 6 (Disc 1)
Encoded date                             : UTC 2019-11-03 08:00:23
Writing application                      : MakeMKV v1.14.5 win(x64-release)
Writing library                          : libmakemkv v1.14.5 (1.3.5/1.4.7) win(x64-release)

Video
ID                                       : 1
ID in the original source medium         : 4113 (0x1011)
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4.1
Format settings                          : CABAC / 2 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 2 frames
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 1 h 24 min
Bit rate mode                            : Variable
Bit rate                                 : 21.9 Mb/s
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.440
Stream size                              : 12.9 GiB (80%)
Language                                 : English
Default                                  : No
Forced                                   : No
Original source medium                   : Blu-ray

Audio #1
ID                                       : 2
ID in the original source medium         : 4352 (0x1100)
Format                                   : DTS XLL
Format/Info                              : Digital Theater Systems
Commercial name                          : DTS-HD Master Audio
Codec ID                                 : A_DTS
Duration                                 : 1 h 24 min
Bit rate mode                            : Variable
Bit rate                                 : 3 994 kb/s
Channel(s)                               : 6 channels
Channel layout                           : C L R Ls Rs LFE
Sampling rate                            : 48.0 kHz
Frame rate                               : 93.750 FPS (512 SPF)
Bit depth                                : 24 bits
Compression mode                         : Lossless
Stream size                              : 2.35 GiB (15%)
Title                                    : Surround 5.1
Language                                 : English
Default                                  : Yes
Forced                                   : No
Original source medium                   : Blu-ray

Audio #2
ID                                       : 3
ID in the original source medium         : 4352 (0x1100)
Format                                   : DTS
Format/Info                              : Digital Theater Systems
Codec ID                                 : A_DTS
Duration                                 : 1 h 24 min
Bit rate mode                            : Constant
Bit rate                                 : 1 509 kb/s
Channel(s)                               : 6 channels
Channel layout                           : C L R Ls Rs LFE
Sampling rate                            : 48.0 kHz
Frame rate                               : 93.750 FPS (512 SPF)
Bit depth                                : 24 bits
Compression mode                         : Lossy
Stream size                              : 908 MiB (6%)
Title                                    : Surround 5.1
Language                                 : English
Default                                  : No
Forced                                   : No
Original source medium                   : Blu-ray
Link to comment
Share on other sites

  • 3 months later...
blesshealth

You may try another method to split MKV video:

Step 1: Click "Add file" button to locate and load the MKV to iDealshare VideoGo.

Step 2: First select all the MP4 files which you want to split into multiple tracks.

Then click "Split by Chapter" from the context menu, the long and large MKV files will be automatically split to separate tracks with its original name appearing just below the MKV file. It also allows you to select and rename the separate audio track file or delete unwanted audio tracks.

Step 3: Click the "Convert" button to start and finish splitting the MKV file to individual tracks as well as keep or change the file format.

Edited by blesshealth
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...