Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more than one audio codec name in a file name #50

Closed
teletcl opened this issue Jun 11, 2023 · 3 comments
Closed

more than one audio codec name in a file name #50

teletcl opened this issue Jun 11, 2023 · 3 comments

Comments

@teletcl
Copy link

teletcl commented Jun 11, 2023

Hello.

I would like to draw attention to the following situations.

Sometimes we can find files with more than one audio codec in name, for example DTS and AC3
Here is first example:
Mission.Impossible.1996.MULTi.1080p.BluRay.x264.DTS.AC3-DENDA.mkv

I think, that script should preserve both of them, like in case for languages.

Maybe just add something like this:

if key == "audio":
    clean = " / ".join(match) # this
    clean = self.split_multi(match) # or this

Because for now it detect only Dolby Digital although DTS occurs first.


small insert
Screen from my test implementation how it looks like for now in some video plugin in KODI:
obraz
and how could it be looks like if script will be preserve both codecs name:
obraz
I was based on a much earlier version of the script that only returned raw expressions (that's why it's AC3 and not Dolby Digital), but I wanted only to show that all matching names can and should be preserved.


Back to the topic,

Another example:
Philadelphia.1993.MULTi.2160p.BluRay.REMUX.HEVC.HDR.DTS-HD.MA.TrueHD.7.1.Atmos-P2P.mkv
Two audio codecs: DTS-HD.MA and TrueHD.7.1.Atmos

.

I also found something like this:
Mission.Impossible.1996.Custom.Audio.1080p.DTS.PL-Spedboy.mkv
Custom Audio and DTS - what do you think about that?
patterns in "patterns.py" file has only Dual Audio.
Maybe just after line 239 add:

("Custom{d}Audios?".format(d=delimiters), "Custom"),

.

Also patterns doesn't has DTS-ES , DTS-EX and 6.1 at all. Examples with those codecs:
Black.Rain.1989.MULTi.1080p.BluRay.REMUX.MPEG-2.DTS-ES.6.1-LTS.mkv
Kiss.Of.The.Dragon.2001.MULTI.HDR.2160p.AI.BluRay.DTS.EX.6.1.AC3.2.0-ChrisVPS.mkv
Based on the code, my suggestion is:

 ("DTS{d}?ES".format(d=delimiters), "DTS ES"), 
 ("DTS{d}?EX".format(d=delimiters), "DTS EX"), 
 ("6.1(?:{d}?ch(?:annel)?(?:{d}?Audio)?)?".format(d=delimiters), "6.1"),

In addition to the fact that it is worth adding these 3 elements, please also take a look at the second example:
Kiss.Of.The.Dragon.2001.MULTI.HDR.2160p.AI.BluRay.DTS.EX.6.1.AC3.2.0-ChrisVPS.mkv
There are also 2 audio codecs in this example: DTS.EX.6.1 and AC3.2.0 and ALSO 2 different channels layout: 6.1 and 2.0
If we decide to keep the layout of the channels, we must remember to associate them with the appropriate codecs.

.

Maybe it's just a mistake in this case, but it can be true, 5.0 channels layout (without subwoofer channel)
Grease.Rise.of.the.Pink.Ladies.S01E06.MULTi.720p.WEB-DL.H264.DDP5.0-K83.mkv
Perhaps it is worth considering include such a case by the script?

("5.0(?:{d}?ch(?:annel)?(?:{d}?Audio)?)?".format(d=delimiters), "5.0"),

.

Last example who also match to the topic of this post, but in this case, I would like to point out that the phrase Dolby Digital EX can also be noted as not only DD-EX but also DD.EX:
Bolt.2008.MULTI.BluRay.3D.1080p.AVC.DTS-HD.MA.DD.EX.5.1-SnOoP-UPR.iso
Is the same case as for DTS-HD and DTS-X ; the dash in the middle may also be a period, or in some cases there may be neither a dash nor a period.
My suggestion is to change line 227 to:

 ("DD{d}?EX".format(d=delimiters), "Dolby Digital EX"), 

And finally, slightly off topic, please add detection for DTS-X .
Here is 2 examples with this phrase:
Spartacus.1960.MULTi.2160p.UHD.BluRay.Remux.HEVC.DTS-X.7.1-fHD.mkv
Casino.1995.MULTi.REMUX.2160p.UHD.Blu-ray.HDR.HEVC.DTS-X7.1-DENDA.mkv
I haven't found examples with the form DTSX, but that doesn't mean they don't exist.


.

I hope I was able to clearly describe the problem with examples. In some places I proposed my own solutions, because if I can and I know how, I try to help and not just demand. I hope it will help to improve the project much faster.
Regards

.

@platelminto
Copy link
Owner

Hey, thanks for the detailed examples - very helpful!

Allowing multiple audio-formats is covered by #30, which I have not looked at in a while, but given it's affecting you I'll be working on it soon. As an overall benefit, it'll also simplify some of the uglier list-regexes that currently exist (e.g. languages, genres, etc.)

I will try and implement it over the coming weeks, along with the additional audio formats/channels.

Thanks for opening the issue!

@teletcl
Copy link
Author

teletcl commented Jun 19, 2023

Hello
I'd like to add one more to this thread.
Yesterday I found another variant of AAC codec name: HE-AAC
Here is an example of the file name: Seinfeld.S04E23E24.The.Pilot.FiNAL.MULTi.1080p.NF.WEB-DL.HE-AAC2.0.H264-Ralf.mkv
or Escape.Room.Tournament.of.Champions.2021.PL.EXTENDED.1080p.BRRip.HE-AACv2.AV1.mkv
Please add to the pattern too.
Cheers

@platelminto
Copy link
Owner

Hey, sorry for the delay. I've added all the extra patterns you've mentioned (currently on the dev branch). Multi-audio support is still not added, but I will try to get to this soon.

Thanks for the opening the issue! I will close this since the multiple-audio stuff is covered by #30, and everything else was implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants