Add more video_profile to avoid confusion with some release_group

Close #569
This commit is contained in:
Rémi Alvergnat
2018-10-16 23:34:35 +02:00
parent c64c54d33e
commit 2121da89a4
6 changed files with 47 additions and 10 deletions
+2
View File
@@ -5,6 +5,8 @@ History
------------------
- Removed `Extras` and `Bonus` values from `episode_details` property as those tags may also appear in movies.
- Add `Scalable Video Coding`, `Advanced Video Codec High Definition` and `High Efficiency Video Coding` values to
`video_profile`.
- Add support for Python 3.7
+2 -2
View File
@@ -180,8 +180,8 @@ Video properties
Codec profile used for video.
- ``Baseline``, ``High``, ``High 10``, ``High 4:2:2``, ``High 4:4:4 Predictive``, ``Main``, ``Extended``
- ``Baseline``, ``High``, ``High 10``, ``High 4:2:2``, ``High 4:4:4 Predictive``, ``Main``, ``Extended``,
``Scalable Video Coding``, ``Advanced Video Codec High Definition``, ``High Efficiency Video Coding``
- **color_depth**
+14 -4
View File
@@ -36,13 +36,13 @@ def video_codec(config): # pylint:disable=unused-argument
rebulk.string('VP8', 'VP80', value='VP8')
rebulk.string('VP9', value='VP9')
rebulk.regex('[hx]-?263', value='H.263')
rebulk.regex('[hx]-?264(?:-?AVC(?:HD)?)?(?:-?SC)?', 'MPEG-?4(?:-?AVC(?:HD)?)', 'AVC(?:HD)?(?:-?SC)?', value='H.264')
rebulk.regex('[hx]-?265(?:-?HEVC)?', 'HEVC', value='H.265')
rebulk.regex('[hx]-?264', '(MPEG-?4)?AVC(?:HD)?', value='H.264')
rebulk.regex('[hx]-?265', 'HEVC', value='H.265')
rebulk.regex('(?P<video_codec>hevc)(?P<color_depth>10)', value={'video_codec': 'H.265', 'color_depth': '10-bit'},
tags=['video-codec-suffix'], children=True)
# http://blog.mediacoderhq.com/h264-profiles-and-levels/
# http://fr.wikipedia.org/wiki/H.264
# https://en.wikipedia.org/wiki/H.264/MPEG-4_AVC
rebulk.defaults(name="video_profile",
validator=seps_surround,
disabled=lambda context: is_disabled(context, 'video_profile'))
@@ -51,6 +51,14 @@ def video_codec(config): # pylint:disable=unused-argument
rebulk.string('XP', 'EP', value='Extended', tags='video_profile.rule')
rebulk.string('MP', value='Main', tags='video_profile.rule')
rebulk.string('HP', 'HiP', value='High', tags='video_profile.rule')
# https://en.wikipedia.org/wiki/Scalable_Video_Coding
rebulk.string('SC', 'SVC', value='Scalable Video Coding', tags='video_profile.rule')
# https://en.wikipedia.org/wiki/AVCHD
rebulk.regex('AVC(?:HD)?', value='Advanced Video Codec High Definition', tags='video_profile.rule')
# https://en.wikipedia.org/wiki/H.265/HEVC
rebulk.string('HEVC', value='High Efficiency Video Coding', tags='video_profile.rule')
rebulk.regex('Hi422P', value='High 4:2:2')
rebulk.regex('Hi444PP', value='High 4:4:4 Predictive')
rebulk.regex('Hi10P?', value='High 10') # no profile validation is required
@@ -107,7 +115,9 @@ class VideoProfileRule(Rule):
profile_list = matches.named('video_profile', lambda match: 'video_profile.rule' in match.tags)
ret = []
for profile in profile_list:
codec = matches.previous(profile, lambda match: match.name == 'video_codec')
codec = matches.at_span(profile.span, lambda m: m.name == 'video_codec', 0)
if not codec:
codec = matches.previous(profile, lambda match: match.name == 'video_codec')
if not codec:
codec = matches.next(profile, lambda match: match.name == 'video_codec')
if not codec:
+10
View File
@@ -3709,6 +3709,7 @@
audio_codec: AAC
audio_channels: '2.0'
video_codec: H.264
video_profile: Scalable Video Coding
release_group: SDH
type: episode
@@ -4492,3 +4493,12 @@
container: mp4
screen_size: 1080p
type: episode
? Bones.S03.720p.HDTV.x264-SCENE
: title: Bones
season: 3
screen_size: 720p
source: HDTV
video_codec: H.264
release_group: SCENE
type: episode
+15 -4
View File
@@ -41,12 +41,8 @@
? x264
? h.264
? x.264
? mpeg4-AVC
? AVC
? AVCHD
? AVCHD-SC
? H.264-SC
? H.264-AVCHD-SC
? -MPEG-4
? -mpeg4
? -mpeg
@@ -72,6 +68,21 @@
: video_codec: H.265
video_profile: High
? H.264-SC
: video_codec: H.264
video_profile: Scalable Video Coding
? mpeg4-AVC
: video_codec: H.264
video_profile: Advanced Video Codec High Definition
? AVCHD-SC
? H.264-AVCHD-SC
: video_codec: H.264
video_profile:
- Scalable Video Coding
- Advanced Video Codec High Definition
? VC1
? VC-1
: video_codec: VC-1
+4
View File
@@ -764,6 +764,7 @@
title: Gangs of New York
type: movie
video_codec: H.264
video_profile: Advanced Video Codec High Definition
year: 2002
? Peep.Show.S06E02.DVDrip.x264-faks86.mkv
@@ -875,6 +876,9 @@
date: 2017-06-22
screen_size: 720p
video_codec: H.264
video_profile:
- Advanced Video Codec High Definition
- Scalable Video Coding
release_group: SDH
type: episode