mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-18 07:15:07 -05:00
* make {vf} only evaluate to standard tags like 1080p, 720p, 480p
* the old {vf} binding is now {hpi}
This commit is contained in:
parent
9cd320431a
commit
861d557e92
@ -187,6 +187,26 @@ public class MediaBindingBean {
|
|||||||
|
|
||||||
@Define("vf")
|
@Define("vf")
|
||||||
public String getVideoFormat() {
|
public String getVideoFormat() {
|
||||||
|
// {def h = video.height as int; h > 720 ? 1080 : h > 480 ? 720 : 480}p
|
||||||
|
int height = Integer.parseInt(getMediaInfo(StreamKind.Video, 0, "Height"));
|
||||||
|
String vf = "";
|
||||||
|
|
||||||
|
if (height > 720)
|
||||||
|
vf += 1080;
|
||||||
|
else if (height > 480)
|
||||||
|
vf += 720;
|
||||||
|
else if (height > 360)
|
||||||
|
vf += 480;
|
||||||
|
else
|
||||||
|
return null; // video too small
|
||||||
|
|
||||||
|
// e.g. 720p
|
||||||
|
return vf + 'p'; // nobody actually wants files to be tagged as interlaced, e.g. 720i
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Define("hpi")
|
||||||
|
public String getExactVideoFormat() {
|
||||||
String height = getMediaInfo(StreamKind.Video, 0, "Height");
|
String height = getMediaInfo(StreamKind.Video, 0, "Height");
|
||||||
String scanType = getMediaInfo(StreamKind.Video, 0, "ScanType");
|
String scanType = getMediaInfo(StreamKind.Video, 0, "ScanType");
|
||||||
|
|
||||||
|
@ -2,4 +2,4 @@
|
|||||||
parameter.exclude: ^StreamKind|Count$
|
parameter.exclude: ^StreamKind|Count$
|
||||||
|
|
||||||
# preview expressions (keys are tagged so they can be sorted alphabetically)
|
# preview expressions (keys are tagged so they can be sorted alphabetically)
|
||||||
expressions: n,y,s,e,t,airdate,startdate,absolute,special,imdb,episode,sxe,s00e00,movie,vc,ac,cf,vf,af,resolution,ws,sdhd,source,group,crc32,fn,ext,file,pi,pn,lang,actors,director,genres,certification,rating,info.runtime,info.status,media.title,media.durationString,media.overallBitRateString,video.codecID,video.frameRate,video.displayAspectRatioString,video.height,video.scanType,audio.format,audio.bitRateString,audio.language,text.codecInfo,text.language
|
expressions: n,y,s,e,t,airdate,startdate,absolute,special,imdb,episode,sxe,s00e00,movie,vc,ac,cf,vf,af,resolution,hpi,ws,sdhd,source,group,crc32,fn,ext,file,pi,pn,lang,actors,director,genres,certification,rating,info.runtime,info.status,media.title,media.durationString,media.overallBitRateString,video.codecID,video.frameRate,video.displayAspectRatioString,video.height,video.scanType,audio.format,audio.bitRateString,audio.language,text.codecInfo,text.language
|
||||||
|
Loading…
Reference in New Issue
Block a user