Guess source media based on resolution, bitrate and file size

All about user-defined episode / movie format expressions
Post Reply
User avatar
rednoah
The Source
Posts: 20299
Joined: 16 Nov 2011, 08:59

Guess source media based on resolution, bitrate and file size

Post by rednoah »

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

Code: Select all

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

	if (hd == 'HD')
		if (megabytes >= 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 (megabytes >= 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