|
@@ -19,10 +19,10 @@ namespace Publicate.Video {
|
|
|
return get_command (input_path, output_path, 2);
|
|
|
}
|
|
|
public override string output_name () {
|
|
|
- return @"1080p_$(fps)fps.webm";
|
|
|
+ return @"1080p_$(get_clean_fps(fps))fps.webm";
|
|
|
}
|
|
|
public override string version_label (){
|
|
|
- return @"1080p $(fps)fps";
|
|
|
+ return @"1080p $(get_clean_fps(fps))fps";
|
|
|
}
|
|
|
public override bool suitable_for (VideoInfo info) {
|
|
|
return info.height >= 1080 && get_low_framerate (info.frame_rate) != info.frame_rate;
|
|
@@ -45,7 +45,7 @@ namespace Publicate.Video {
|
|
|
"-maxrate", "2610k",
|
|
|
"-tile-columns", "2",
|
|
|
"-g", "240",
|
|
|
- "-threads", "8",
|
|
|
+ "-threads", get_num_processors().to_string(),
|
|
|
"-quality", "good",
|
|
|
"-crf", "31",
|
|
|
"-c:v", "libvpx-vp9",
|
|
@@ -58,6 +58,16 @@ namespace Publicate.Video {
|
|
|
};
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ private string get_clean_fps(double fps) {
|
|
|
+ var clean = (int)fps;
|
|
|
+ if(fps - (double)clean > 0.0) {
|
|
|
+ clean++;
|
|
|
+ }
|
|
|
+ return clean.to_string ();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
public class Vp9Video1080pLowFramerateProfile : EncodingProfile {
|
|
@@ -88,14 +98,14 @@ namespace Publicate.Video {
|
|
|
return new string[] {
|
|
|
"ffmpeg",
|
|
|
"-i", input_path,
|
|
|
- "-r", fps.to_string(),
|
|
|
+ "-r", fps.to_string (),
|
|
|
"-vf", @"scale=$(size)",
|
|
|
"-b:v", "1800k",
|
|
|
"-minrate", "900k",
|
|
|
"-maxrate", "2610k",
|
|
|
"-tile-columns", "2",
|
|
|
"-g", "240",
|
|
|
- "-threads", "8",
|
|
|
+ "-threads", get_num_processors().to_string(),
|
|
|
"-quality", "good",
|
|
|
"-crf", "31",
|
|
|
"-c:v", "libvpx-vp9",
|
|
@@ -145,7 +155,7 @@ namespace Publicate.Video {
|
|
|
"-maxrate", "1485k",
|
|
|
"-tile-columns", "2",
|
|
|
"-g", "240",
|
|
|
- "-threads", "8",
|
|
|
+ "-threads", get_num_processors().to_string(),
|
|
|
"-quality", "good",
|
|
|
"-crf", "32",
|
|
|
"-c:v", "libvpx-vp9",
|
|
@@ -195,7 +205,7 @@ namespace Publicate.Video {
|
|
|
"-maxrate", "1088k",
|
|
|
"-tile-columns", "2",
|
|
|
"-g", "240",
|
|
|
- "-threads", "8",
|
|
|
+ "-threads", get_num_processors().to_string(),
|
|
|
"-quality", "good",
|
|
|
"-crf", "33",
|
|
|
"-c:v", "libvpx-vp9",
|