VF Giving Different Value Than Expected

Support for Windows users
Post Reply
sadsack5000
Posts: 3
Joined: 14 Mar 2018, 06:25

VF Giving Different Value Than Expected

Post by sadsack5000 »

Hi all,

My movie format is as such:

Format: Select all

D:\Temp\Filebot\NEW Movies\{ ~plex.id % { " {edition-$edition}" } % { " [$vs $vf][$ac $channels][$vcf]" } }
And gives the following result for this particular file:

Code: Select all

Firehouse Dog (2007) [DVD-R 480p][AC3 5.1][HEVC]
I used Mediainfo to check the video height straight out of MakeMKV - it was 720*576
I then encoded the file to x265 using my PAL 576 Handbrake profile. For some reason it scales the video to 720*552 (confirmed later in Mediainfo)
Filebot then writes vf as 480

My questions are:
1) Why does filebot change 552 to 480
2) Can this be adjusted to automatically take the closest of 576 or 480 respectively?
3) What issue could this cause for me down the road? (Save for xx streaming software maybe identifying the rip as an NTSC)
4) Recommendations?


Thankyou!
User avatar
rednoah
The Source
Posts: 23461
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: VF Giving Different Value Than Expected

Post by rednoah »

:idea: The {vf} binding works a bit like this. 576p would require height >= 576 or height > 480 and width > 720. 720x552 isn't high enough to qualify by height, and isn't wide enough to allow for leniency on height.

:arrow: You can use {hpi} to get the raw height number + progressive/interlaced letter instead of the general video quality descriptor.

:arrow: You can use {height} to get the raw number and then add your own custom code to round as you see fit.
:idea: Please read the FAQ and How to Request Help.
cultchristmas
Posts: 1
Joined: 04 Oct 2024, 01:45

Re: VF Giving Different Value Than Expected

Post by cultchristmas »

sadsack5000 wrote: 30 Sep 2024, 09:40 Hi all,

My movie format is as such:

Format: Select all

D:\Temp\Filebot\NEW Movies\{ ~plex.id % { " {edition-$edition}" } % { " [$vs $vf][$ac $channels][$vcf]" } }
And gives the following result for this particular file:

Code: Select all

Firehouse Dog (2007) [DVD-R 480p][AC3 5.1][HEVC]
I used Mediainfo to check the video height straight out of MakeMKV - it was 720*576
I then encoded the file to x265 using my PAL 576 Handbrake profile. For some reason it scales the video to 720*552 (confirmed later in Mediainfo)
Filebot then writes vf as 480

My questions are:
1) Why does filebot change 552 to 480
2) Can this be adjusted to automatically take the closest of 576 or 480 respectively?
3) What issue could this cause for me down the road? (Save for xx streaming software maybe identifying the rip as an NTSC)
4) Recommendations? snow rider


Thankyou!
1) Why does filebot change 552 to 480:
FileBot uses predefined thresholds to identify common video resolutions. Since 552 is closer to 480 than to 576, FileBot rounds it down and categorizes it as 480p. The standard definitions it follows are likely set to identify 720×480 (for NTSC) or 720×576 (for PAL) content. Handbrake may have applied slight cropping or resizing to the video, bringing it to 552p, which doesn't match a common video format, leading to FileBot assigning 480p.
2) Yes, you can create a custom format to ensure that FileBot assigns the correct label. You could modify your format script to handle this better by checking if the vertical resolution (vf) is closer to 576 or 480 and adjusting the label accordingly.
Here’s a possible adjustment to your format:
{ vf >= 552 ? '576p' : '480p' }
3) Metadata: Streaming apps or media managers like Plex may misidentify the file as NTSC (480p) instead of PAL (576p), leading to misrepresentation in your library.
Compatibility: If you’re organizing your media by resolution, it could cause confusion when browsing through your collection. For example, if you expect PAL content to be 576p, but it is labeled as 480p, you might miscategorize your media.
Playback: In terms of playback, it’s less likely to cause issues, but certain streaming setups might treat the file as NTSC incorrectly.
4. Recommendations?
Double-check Handbrake’s profile settings: It seems Handbrake is scaling your video slightly, which causes the resolution to become 720×552. Look into whether you’ve set it to crop or scale during encoding, and make sure you keep the output resolution at 720×576 (the full PAL resolution) to avoid this discrepancy.
Custom FileBot script: Use a custom script as mentioned above to ensure proper resolution tagging. Alternatively, consider writing a script that reads the actual resolution directly from Mediainfo to override FileBot's predefined resolution matching.
sadsack5000
Posts: 3
Joined: 14 Mar 2018, 06:25

Re: VF Giving Different Value Than Expected

Post by sadsack5000 »

cultchristmas wrote: 04 Oct 2024, 01:48 1) Why does filebot change 552 to 480:
FileBot uses predefined thresholds to identify common video resolutions. Since 552 is closer to 480 than to 576, FileBot rounds it down and categorizes it as 480p. The standard definitions it follows are likely set to identify 720×480 (for NTSC) or 720×576 (for PAL) content. Handbrake may have applied slight cropping or resizing to the video, bringing it to 552p, which doesn't match a common video format, leading to FileBot assigning 480p.
2) Yes, you can create a custom format to ensure that FileBot assigns the correct label. You could modify your format script to handle this better by checking if the vertical resolution (vf) is closer to 576 or 480 and adjusting the label accordingly.
Here’s a possible adjustment to your format:
{ vf >= 552 ? '576p' : '480p' }
3) Metadata: Streaming apps or media managers like Plex may misidentify the file as NTSC (480p) instead of PAL (576p), leading to misrepresentation in your library.
Compatibility: If you’re organizing your media by resolution, it could cause confusion when browsing through your collection. For example, if you expect PAL content to be 576p, but it is labeled as 480p, you might miscategorize your media.
Playback: In terms of playback, it’s less likely to cause issues, but certain streaming setups might treat the file as NTSC incorrectly.
4. Recommendations?
Double-check Handbrake’s profile settings: It seems Handbrake is scaling your video slightly, which causes the resolution to become 720×552. Look into whether you’ve set it to crop or scale during encoding, and make sure you keep the output resolution at 720×576 (the full PAL resolution) to avoid this discrepancy.
Custom FileBot script: Use a custom script as mentioned above to ensure proper resolution tagging. Alternatively, consider writing a script that reads the actual resolution directly from Mediainfo to override FileBot's predefined resolution matching.
This is probably the best response ive ever had on any forum ive written on, thankyou!!
I checked handbrake and discovered that i had it set to automatic cropping, doh!
I was about 40 movies into my ripping project and discovered through Mediainfo that all had been cropped in height or width. So unfortunately i nuked my project and started again, this time with cropping off and all of my encodes are coming out perfectly with either 576 or 480 height and filebot giving me the correct height for my naming convention (and plex).
A painful lesson learned but i think im back on track now

Thanks again
Post Reply