How do {vf}, {languages} and {lang} work?

All your suggestions, requests and ideas for future development
Post Reply
jbbarnes77
Posts: 5
Joined: 26 Oct 2019, 19:56

How do {vf}, {languages} and {lang} work?

Post by jbbarnes77 »

Really love the detailed list of format expressions for naming files, but I have found some that have issues. I've used FileBot on hundreds of movie files today and find problems with the following three:

{vf} Any avi file in 720p or 1080p is incorrect, most commonly indicated as 360p. mkv and mp4 are accurate.

{languages} This is just hit and miss and doesn't reflect the audio tracks or order listed in VLC for Windows.

{lang} So far it has been blank on all the files I have tried. I checked a couple to confirm the existence of subtitles.

Thanks.
User avatar
rednoah
The Source
Posts: 22898
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Format Expressions that Don't Work

Post by rednoah »

1.
What does {resolution} and {hpi} say for files where {vf} doesn't work correctly?
viewtopic.php?t=4285


2.
{languages} is based on the Spoken Languages information from TheMovieDB and is thus unrelated to the file content. You'll want to use {audioLanguages} if you're talking about audio stream media information.


3.
{lang} is only defined for subtitle files. It'll always be undefined for non-subtitle files. The value of {lang} is based either on the filename (e.g. Avatar.eng.srt) if it contains a language suffix, or based on statistical language detection based on the file content (which of course only works for text-based subtitle files, and not image-based subtitles).
:idea: Please read the FAQ and How to Request Help.
jbbarnes77
Posts: 5
Joined: 26 Oct 2019, 19:56

Re: How do {vf}, {languages} and {lang} work?

Post by jbbarnes77 »

I will try to find some of the AVIs I ran across the other day. I just happened to format a few today. An SD video (1980s TV show) avi was listed as:

{vf} = 360p
{resolution} = 640x464
{hpi} = 464p
User avatar
rednoah
The Source
Posts: 22898
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How do {vf}, {languages} and {lang} work?

Post by rednoah »

FileBot r6831 has been updated to yield 480p for ~640x464 resolutions.
:idea: Please read the FAQ and How to Request Help.
jbbarnes77
Posts: 5
Joined: 26 Oct 2019, 19:56

Re: How do {vf}, {languages} and {lang} work?

Post by jbbarnes77 »

Great news! Thanks.

I've been using it quite a bit today, before I found out about this update. Probably renamed 500 files so as to append the resolution. Just so you know, I ended up skipping the AVIs after a while. They almost universally got flagged as 480p or 360p, though they were almost all 1080p and 720p. I only ran across one that was 1080p and actually showed as 1080p.

That being said, I've had no problems at all with MKV and MP4 files.

Appreciate the update. I'll download it now.
User avatar
rednoah
The Source
Posts: 22898
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How do {vf}, {languages} and {lang} work?

Post by rednoah »

It's all based on {resolution} and nothing else really matters. Newer mkv / mp4 files just so happen to typically have greater resolutions compared to ancient avi files.

{vf} is a "rounded" value. {hpi} and {resolution} are exact values. The former might not always work if you have a 1080p / 720p / 480p / etc files that aren't up to standard. (e.g. 480p means video height of 480, and 464 didn't make the cut)
:idea: Please read the FAQ and How to Request Help.
Bazzu85
Posts: 51
Joined: 16 Nov 2016, 19:28

Re: How do {vf}, {languages} and {lang} work?

Post by Bazzu85 »

Hi,

I'm noticing some files with 640x360 resolution and {vf} is 480p.
As I know this is 360p..
what I'm missing?

Code: Select all

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : [email protected]
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Si
Format settings, Reference frames        : 4 frame
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 21 min 31s
Bit rate                                 : 700 kb/s
Width                                    : 640 pixel
Height                                   : 360 pixel
Display aspect ratio                     : 16:9
Frame rate mode                          : Costante
Frame rate                               : 23,976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bit
Scan type                                : Progressivo
Bits/(Pixel*Frame)                       : 0.127
Stream size                              : 108MiB (84%)
Writing library                          : x264 core 120 r2M 0f692db
Encoding settings                        : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=8 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=4 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=240 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=2pass / mbtree=1 / bitrate=700 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=800 / vbv_bufsize=4000 / nal_hrd=none / ip_ratio=1.40 / aq=1:1.00
Default                                  : Si
Forced                                   : No
User avatar
rednoah
The Source
Posts: 22898
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How do {vf}, {languages} and {lang} work?

Post by rednoah »

640x360 is 480p because it's the 16/9 aspect ratio of 640x480, i.e. video width of 640 makes it fall in to the 640x480 class instead of the 480x360 class.


:arrow: You can use {hpi} if you want the exact value.
:idea: Please read the FAQ and How to Request Help.
Post Reply