guessit-io / guessit

GuessIt is a python library that extracts as much information as possible from a video filename.
https://guessit-io.github.io/guessit
GNU Lesser General Public License v3.0
816 stars 92 forks source link

Recognize "1.0" audio channels #678

Closed plotski closed 3 years ago

plotski commented 3 years ago

This fixes a misdetection as "episode" type when mono is given as "1.0".

Toilal commented 3 years ago

Thanks. No problem with CI, I need to move from Coveralls to Codecov, and i'll merge this afterwards.

plotski commented 3 years ago

@Toilal Thanks for the quick reply.

However, I've looked a bit more into this and it seems this fix is not sufficient.

Take a look at the "Standard speaker channel layouts" table here: https://en.wikipedia.org/wiki/9.1#Standard_speaker_channels

These are all valid audio channels: 1.0, 2.0, 2.1, 3.0, 3.1, 4.0, 4.1, 5.0, 5.1, 5.1.4, 6.0, 6.1, 7.0, 7.1, 7.1.4, 8.0, 9.0, 11.0, 11.0.4

This article adds 7.1.2, 9.1 and 9.1.2: https://thehometheaterdiy.com/surround-sound-channels-explained/

Perhaps it would be best to recognize one or more \d+\. with a \d+ at the end if it comes after a recognized audio codec, e.g. (?:\d+\.)+\d+?

Toilal commented 3 years ago

You should base your pull requests on master branch.

Toilal commented 3 years ago

I have rebased your branch on develop

plotski commented 3 years ago

Sorry about the wrong branch. I should've been more careful.

Can you comment on my proposal for recognizing arbitrary audio channel layouts?

Toilal commented 3 years ago

I want to improve the configuration capabilities through options.json before, so then it'll be possible to include all of those new patterns inside the configuration file.

plotski commented 3 years ago

OK, sounds great. Thanks.