Identifying Episodes after conversion to mkv

MKV playback, recompression, remuxing, codec packs, players, howtos, etc.
Post Reply
Message
Author
rmk13
Posts: 9
Joined: Fri Apr 17, 2020 1:25 pm

Identifying Episodes after conversion to mkv

#1 Post by rmk13 » Thu May 29, 2025 10:49 am

Hi

I am converting BluRays to mkv again...
And I have many TV series - one of them is for example Twin Peaks. The problem is that the naming (..._txx.mkv) does obviously not follow any order related to the episode order.

I have MediaInfo (https://mediaarea.net/en/MediaInfo) which helps identifying the episodes compared to the extras, but it does not help, in many cases, to identify the actual episode number. Is there any tool put there which can help with this? I mean it should be conceptually straight forward to extract a few seconds of dialogue and / or frames and use these to identify the episode. Is there something out there which I did not find? I am using FileBot to rename the files finally after adding the Season and Episode manually, but it is a chore to look into the first frames and try to identify the episode. Is there an automated or easier way of doing this by now?

Thanks, and please feel free to refer me to a discussion where this was answered (I could not find anything helpful)

Rainer

PS: This is obviously worse with the extras....

flojo
Posts: 204
Joined: Thu Jun 22, 2023 4:27 am
Location: El Paso

Re: Identifying Episodes after conversion to mkv

#2 Post by flojo » Thu May 29, 2025 7:06 pm

With a little bit of scripting you might be able to match them based on $SECONDS, but the tough part might be finding a source online that stores the seconds (not just minutes) of each episode which can also be scraped via wget/curl to get the JSON/CSV/etc.

I could post here a JSON for the episodes but you'd have to scrap/parse yourself, however you'd have at least 1 source.

rmk13
Posts: 9
Joined: Fri Apr 17, 2020 1:25 pm

Re: Identifying Episodes after conversion to mkv

#3 Post by rmk13 » Fri May 30, 2025 1:35 pm

Thanks - I used that approach manually using https://www.dvdcompare.net/index.php .

But I also have several others, but there are no runtimes on dvdcompare. So I think I will give series a pause (although these are especially useful on Plex). Or I will just dump the BluRays and then put in the BluRay and go through the Menu and the opening sequences.

flojo
Posts: 204
Joined: Thu Jun 22, 2023 4:27 am
Location: El Paso

Re: Identifying Episodes after conversion to mkv

#4 Post by flojo » Fri May 30, 2025 7:55 pm

I've labeled a few series' by using the seconds of rips found on the internet, but it's hit or miss (50/50) because some things you download have the production cards or color bars or something edited out, even if it's a "Remux". However, I believe Twin Peaks downloaded "Remuxes" were correct so I used them. Regardless I'll post them just in case.

Generated output with:

Code: Select all

for i in *.mkv; do echo "$(ffprobe -i "$i" -show_entries format=duration -v quiet -of csv="p=0"),$i"; done
Output (seconds,filename):

Code: Select all

6773.184000,Twin.Peaks.S01E01.2160p.Northwest.Passage.International.Version.2160p.UHD.BluRay.REMUX.SDR.HEVC.DTS-HD.MA.7.1-EPSiLON.mkv
5640.512000,Twin.Peaks.S01E01.2160p.Northwest.Passage.UHD.BluRay.REMUX.SDR.HEVC.DTS-HD.MA.7.1-EPSiLON.mkv
2787.868000,Twin.Peaks.S01E02.Traces.to.Nowhere.1080p.BluRay.REMUX.AVC.DTS-HD.MA.7.1-NOGRP.mkv
2896.353000,Twin.Peaks.S01E03.Zen.or.the.Skill.to.Catch.a.Killer.1080p.BluRay.REMUX.AVC.DTS-HD.MA.7.1-NOGRP.mkv
2817.106000,Twin.Peaks.S01E04.Rest.in.Pain.1080p.BluRay.REMUX.AVC.DTS-HD.MA.7.1-NOGRP.mkv
2820.359000,Twin.Peaks.S01E05.The.One-Armed.Man.1080p.BluRay.REMUX.AVC.DTS-HD.MA.7.1-NOGRP.mkv
2786.951000,Twin.Peaks.S01E06.Coopers.Dreams.1080p.BluRay.REMUX.AVC.DTS-HD.MA.7.1-NOGRP.mkv
2817.398000,Twin.Peaks.S01E07.Realization.Time.1080p.BluRay.REMUX.AVC.DTS-HD.MA.7.1-NOGRP.mkv
2807.763000,Twin.Peaks.S01E08.The.Last.Evening.1080p.BluRay.REMUX.AVC.DTS-HD.MA.7.1-NOGRP.mkv
5652.814000,Twin.Peaks.S02E01.May.the.Giant.Be.with.You.1080p.BluRay.REMUX.AVC.DTS-HD.MA.7.1-NOGRP.mkv
2815.019000,Twin.Peaks.S02E02.Coma.1080p.BluRay.REMUX.AVC.DTS-HD.MA.7.1-NOGRP.mkv
2826.866000,Twin.Peaks.S02E03.The.Man.Behind.Glass.1080p.BluRay.REMUX.AVC.DTS-HD.MA.7.1-NOGRP.mkv
2818.107000,Twin.Peaks.S02E04.Lauras.Secret.Diary.1080p.BluRay.REMUX.AVC.DTS-HD.MA.7.1-NOGRP.mkv
2827.908000,Twin.Peaks.S02E05.The.Orchids.Curse.1080p.BluRay.REMUX.AVC.DTS-HD.MA.7.1-NOGRP.mkv
2844.550000,Twin.Peaks.S02E06.Demons.1080p.BluRay.REMUX.AVC.DTS-HD.MA.7.1-NOGRP.mkv
2848.137000,Twin.Peaks.S02E07.Lonely.Souls.1080p.BluRay.REMUX.AVC.DTS-HD.MA.7.1-NOGRP.mkv
2840.004000,Twin.Peaks.S02E08.Drive.with.a.Dead.Girl.1080p.BluRay.REMUX.AVC.DTS-HD.MA.7.1-NOGRP.mkv
2807.307000,Twin.Peaks.S02E09.Arbitrary.Law.1080p.BluRay.REMUX.AVC.DTS-HD.MA.7.1-NOGRP.mkv
2841.464000,Twin.Peaks.S02E10.Dispute.Between.Brothers.1080p.BluRay.REMUX.AVC.DTS-HD.MA.7.1-NOGRP.mkv
2844.011000,Twin.Peaks.S02E11.Masked.Ball.1080p.BluRay.REMUX.AVC.DTS-HD.MA.7.1-NOGRP.mkv
2788.411000,Twin.Peaks.S02E12.The.Black.Widow.1080p.BluRay.REMUX.AVC.DTS-HD.MA.7.1-NOGRP.mkv
2815.271000,Twin.Peaks.S02E13.Checkmate.1080p.BluRay.REMUX.AVC.DTS-HD.MA.7.1-NOGRP.mkv
2770.893000,Twin.Peaks.S02E14.Double.Play.1080p.BluRay.REMUX.AVC.DTS-HD.MA.7.1-NOGRP.mkv
2806.846000,Twin.Peaks.S02E15.Slaves.and.Masters.1080p.BluRay.REMUX.AVC.DTS-HD.MA.7.1-NOGRP.mkv
2839.837000,Twin.Peaks.S02E16.The.Condemned.Woman.1080p.BluRay.REMUX.AVC.DTS-HD.MA.7.1-NOGRP.mkv
2759.757000,Twin.Peaks.S02E17.Wounds.and.Scars.1080p.BluRay.REMUX.AVC.DTS-HD.MA.7.1-NOGRP.mkv
2810.266000,Twin.Peaks.S02E18.On.the.Wings.of.Love.1080p.BluRay.REMUX.AVC.DTS-HD.MA.7.1-NOGRP.mkv
2819.442000,Twin.Peaks.S02E19.Variations.on.Relations.1080p.BluRay.REMUX.AVC.DTS-HD.MA.7.1-NOGRP.mkv
2836.851000,Twin.Peaks.S02E20.The.Path.to.the.Black.Lodge.1080p.BluRay.REMUX.AVC.DTS-HD.MA.7.1-NOGRP.mkv
2783.030000,Twin.Peaks.S02E21.Miss.Twin.Peaks.1080p.BluRay.REMUX.AVC.DTS-HD.MA.7.1-NOGRP.mkv
3030.152000,Twin.Peaks.S02E22.Beyond.Life.and.Death.1080p.BluRay.REMUX.AVC.DTS-HD.MA.7.1-NOGRP.mkv
8108.089000,Twin.Peaks.S02E99.Fire.Walk.with.Me.1992.2160p.UHD.Blu-ray.Remux.SDR.HEVC.DTS-HD.MA.7.1-CiNEPHiLES.mkv
3635.507000,Twin.Peaks.S03E01.Part.1.1080p.BluRay.REMUX.AVC.TrueHD.5.1-NOGRP.mkv
3274.605000,Twin.Peaks.S03E02.Part.2.1080p.BluRay.REMUX.AVC.TrueHD.5.1-NOGRP.mkv
3531.820000,Twin.Peaks.S03E03.Part.3.1080p.BluRay.REMUX.AVC.TrueHD.5.1-NOGRP.mkv
3417.497000,Twin.Peaks.S03E04.Part.4.1080p.BluRay.REMUX.AVC.TrueHD.5.1-NOGRP.mkv
3498.286000,Twin.Peaks.S03E05.Part.5.1080p.BluRay.REMUX.AVC.TrueHD.5.1-NOGRP.mkv
3483.772000,Twin.Peaks.S03E06.Part.6.1080p.BluRay.REMUX.AVC.TrueHD.5.1-NOGRP.mkv
3454.785000,Twin.Peaks.S03E07.Part.7.1080p.BluRay.REMUX.AVC.TrueHD.5.1-NOGRP.mkv
3498.955000,Twin.Peaks.S03E08.Part.8.Gotta.Light.2160p.UHD.BluRay.REMUX.SDR.HEVC.DTS-HD.MA.5.1-EPSiLON.mkv
3500.372000,Twin.Peaks.S03E09.Part.9.1080p.BluRay.REMUX.AVC.TrueHD.5.1-NOGRP.mkv
3203.826000,Twin.Peaks.S03E10.Part.10.1080p.BluRay.REMUX.AVC.TrueHD.5.1-NOGRP.mkv
3433.889000,Twin.Peaks.S03E11.Part.11.1080p.BluRay.REMUX.AVC.TrueHD.5.1-NOGRP.mkv
3293.207000,Twin.Peaks.S03E12.Part.12.1080p.BluRay.REMUX.AVC.TrueHD.5.1-NOGRP.mkv
3559.222000,Twin.Peaks.S03E13.Part.13.1080p.BluRay.REMUX.AVC.TrueHD.5.1-NOGRP.mkv
3375.872000,Twin.Peaks.S03E14.Part.14.1080p.BluRay.REMUX.AVC.TrueHD.5.1-NOGRP.mkv
3309.056000,Twin.Peaks.S03E15.Part.15.1080p.BluRay.REMUX.AVC.TrueHD.5.1-NOGRP.mkv
3467.964000,Twin.Peaks.S03E16.Part.16.1080p.BluRay.REMUX.AVC.TrueHD.5.1-NOGRP.mkv
3564.394000,Twin.Peaks.S03E17.Part.17.1080p.BluRay.REMUX.AVC.TrueHD.5.1-NOGRP.mkv
3430.432000,Twin.Peaks.S03E18.Part.18.1080p.BluRay.REMUX.AVC.TrueHD.5.1-NOGRP.mkv

dcoke22
Posts: 3705
Joined: Wed Jul 22, 2020 11:25 pm

Re: Identifying Episodes after conversion to mkv

#5 Post by dcoke22 » Sat May 31, 2025 7:32 pm

In cases where DVDCompare.net hasn't been helpful and the TV Show doesn't put the name of the episode in the show, I have found that matching the writer & director combo to the relevant TV Show episode info on Wikipedia can be useful. At least for the show's I've used this on, rarely does the same director & writer(s) get credit for multiple episodes in a row.

loucipher
Posts: 19
Joined: Tue Nov 29, 2022 12:45 am

Re: Identifying Episodes after conversion to mkv

#6 Post by loucipher » Mon Jun 02, 2025 5:12 pm

One thing I've found helpful, and an option that is often but not ALWAYS available, many discs will have both the individual episodes, and a "play-all" track available. For example, you'll have 10 episodes on a disc, 4GB each, and one 40GB track that has all episodes in one file, and in-order. Now, in your specific case of Twin Peaks, this is not the case (ask me how I know :D). But when it is available, I always rip the play-all track, and use mkvtoolnix to split by chapter after the fact. It's not as efficient, but it works when it's an option (most of the time. There was a disc from Code Geass that had one episode not part of the play-all track, and I had to rip that episode separately. But 99.9% of the time, when there's a play-all track, it will contain all episodes on the disc in order).

Now, for discs where you do not have this option, it gets trickier. Sometimes you can look at the segment map (click on a title in makemkv, it'll be in the right hand panel). For example, episode one will be segment map 1, episode 2 will contain segment map 2, but the file names will not reflect this unless you modify them manually. Maybe the first file will be segment map 2, the second file segment map 1, that's a good indication the second file is episode 1 and the first file is episode 2. This does not always work, but it's a good starting point when all else fails. But sometimes that ordering is not accurate. But often times it is. That can be a good clue. Other times you'll have no idea, and no real way to tell (Gunslinger Girl season 2 disc 1 has 2 titles with 3 episodes each and another title with 1 episode, the segment map is all over the place). Sometimes you'll get lucky and the series will have an episode title on screen after the credits. Sometimes you have no way to know at all. In such cases, I find it helpful to source episodes from another source first, and compare the first few frames and see what matches up to a known listing. I leave the source of such alternates to the imagination of the user, no judgements.

Suffice to say, sometimes it's easy, sometimes it's hard, sometimes it's just a matter of guess and check. Like right now I'm going through my Seinfeld 4k collection, and there's no play-all track on any of the discs, there's no apparent ordering to the episodes, there's no reference to the segment map that's useful. But I have my old DVD rips of seinfeld, so when I finish with one, I can compare the first 2 seconds of the standup intro, and figure out what episode each one is. But only because I have the existing rips from my DVDs. Without that, I dunno. My advice? Good luck!

Post Reply