Jump to content


Photo

Playback corruption on split mkv files

green bars mkv splitting

Best Answer Doofus , 29 September 2019 - 12:22 PM

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. Go to the full post


  • Please log in to reply
23 replies to this topic

#1 MyronAub OFFLINE  

MyronAub

    Advanced Member

  • Members
  • 30 posts
  • Local time: 08:56 AM

Posted 28 September 2019 - 05:55 AM

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?

 

 

Attached Files



#2 rbjtech OFFLINE  

rbjtech

    Advanced Member

  • Members
  • 488 posts
  • Local time: 08:56 AM
  • LocationLondon, UK

Posted 28 September 2019 - 09:29 AM

.. 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.


  • MyronAub likes this

#3 MyronAub OFFLINE  

MyronAub

    Advanced Member

  • Members
  • 30 posts
  • Local time: 08:56 AM

Posted 28 September 2019 - 11:31 AM

.. 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.



#4 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 142291 posts
  • Local time: 03:56 AM

Posted 28 September 2019 - 12:20 PM

And the originals never did this?

#5 MyronAub OFFLINE  

MyronAub

    Advanced Member

  • Members
  • 30 posts
  • Local time: 08:56 AM

Posted 28 September 2019 - 02:53 PM

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!)



#6 Doofus OFFLINE  

Doofus

    Advanced Member

  • Members
  • 12875 posts
  • Local time: 12:56 AM

Posted 28 September 2019 - 03:05 PM

I wonder if it's a key frame issue? I'm assuming h264 and direct playing not direct streaming?

#7 MyronAub OFFLINE  

MyronAub

    Advanced Member

  • Members
  • 30 posts
  • Local time: 08:56 AM

Posted 29 September 2019 - 07:42 AM

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



#8 scb99 OFFLINE  

scb99

    Advanced Member

  • Members
  • 153 posts
  • Local time: 10:56 AM

Posted 29 September 2019 - 10:33 AM

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.



#9 Doofus OFFLINE  

Doofus

    Advanced Member

  • Members
  • 12875 posts
  • Local time: 12:56 AM

Posted 29 September 2019 - 11:28 AM

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.
  • MyronAub likes this

#10 MyronAub OFFLINE  

MyronAub

    Advanced Member

  • Members
  • 30 posts
  • Local time: 08:56 AM

Posted 29 September 2019 - 12:13 PM

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.



#11 Doofus OFFLINE  

Doofus

    Advanced Member

  • Members
  • 12875 posts
  • Local time: 12:56 AM

Posted 29 September 2019 - 12:19 PM

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?

#12 Doofus OFFLINE  

Doofus

    Advanced Member

  • Members
  • 12875 posts
  • Local time: 12:56 AM

Posted 29 September 2019 - 12:22 PM   Best Answer

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.
  • MyronAub likes this

#13 scb99 OFFLINE  

scb99

    Advanced Member

  • Members
  • 153 posts
  • Local time: 10:56 AM

Posted 29 September 2019 - 01:02 PM

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, 29 September 2019 - 01:14 PM.


#14 scb99 OFFLINE  

scb99

    Advanced Member

  • Members
  • 153 posts
  • Local time: 10:56 AM

Posted 29 September 2019 - 01:11 PM

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

#15 MyronAub OFFLINE  

MyronAub

    Advanced Member

  • Members
  • 30 posts
  • Local time: 08:56 AM

Posted 29 September 2019 - 01:53 PM

 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?



#16 PenkethBoy ONLINE  

PenkethBoy

    Advanced Member

  • Members
  • 3432 posts
  • Local time: 08:56 AM
  • LocationWarrington,UK

Posted 29 September 2019 - 02:09 PM

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)

  • MyronAub likes this

#17 rbjtech OFFLINE  

rbjtech

    Advanced Member

  • Members
  • 488 posts
  • Local time: 08:56 AM
  • LocationLondon, UK

Posted 29 September 2019 - 03:21 PM

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



#18 MyronAub OFFLINE  

MyronAub

    Advanced Member

  • Members
  • 30 posts
  • Local time: 08:56 AM

Posted 29 September 2019 - 03:52 PM

 

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?



#19 PenkethBoy ONLINE  

PenkethBoy

    Advanced Member

  • Members
  • 3432 posts
  • Local time: 08:56 AM
  • LocationWarrington,UK

Posted 29 September 2019 - 03:58 PM

MakeMKv does not have the ability to split files - so ignore that


  • MyronAub likes this

#20 MyronAub OFFLINE  

MyronAub

    Advanced Member

  • Members
  • 30 posts
  • Local time: 08:56 AM

Posted 29 September 2019 - 04:07 PM

 

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.


  • rbjtech likes this





Also tagged with one or more of these keywords: green bars, mkv, splitting

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users