[SNIPPET] Guess source media based on resolution, bitrate and file size

All about user-defined episode / movie / file name format expressions
Post Reply
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

[SNIPPET] Guess source media based on resolution, bitrate and file size

Post by rednoah »

Return different values based on {hd}, {bytes} and {bitrate}:

Format: Select all

{
	if (hd == 'SD')
		if (megabytes >= 700 && mbps >= 1.1)
			return 'DVDRip'
		else
			return 'TVRip'

	if (hd == 'HD')
		if (gigabytes >= 1 && mbps >= 18)
			return 'BDRemux'
		else if (mbps >= 8)
			return 'BDRip'
		else if (mbps >= 2.2)
			return 'MicroHD'
		else
			return 'HDRip'

	if (hd == 'UHD')
		if (gigabytes >= 1 && mbps >= 32)
			return 'UHDRemux'
		else if (mbps >= 16)
			return 'UHDRip'
		else
			return 'MicroUHD'
}

Possible return values:

Code: Select all

DVDRip
TVRip
BDRemux
BDRip
MicroHD
HDRip
UHDRemux
UHDRip
MicroUHD
:idea: Please read the FAQ and How to Request Help.
Post Reply