1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- namespace Publicate.Video {
- public abstract class EncodingProfile {
- public string size { get; protected set; }
- public string codec_names { get; protected set; }
- public double fps { get; protected set; }
- public EncodingProfile? alternative_to { get; set; }
- protected double get_low_framerate(double input_framerate) {
- if(input_framerate >= 50) {
- return input_framerate / 2;
- }
- return input_framerate;
- }
- public abstract string[] get_first_pass_command(string input_path, string output_path);
- public abstract string[] get_second_pass_command(string input_path, string output_path);
- public abstract string output_name();
- public abstract string version_label();
-
- public abstract bool suitable_for(VideoInfo info);
- public abstract void setup_for(VideoInfo info);
- }
- public static Invercargill.Enumerable<EncodingProfile> construct_free_profiles() {
- return Invercargill.ate(new EncodingProfile[] {
- new Vp9Video1080pHighFramerateProfile (),
- new Vp9Video1080pLowFramerateProfile (),
- new Vp9Video720pProfile(),
- new Vp9Video480pProfile(),
- new TheoraVideo360pProfile(),
- new TheoraVideo240pProfile(),
- });
- }
- public static Invercargill.Enumerable<EncodingProfile> construct_all_profiles() {
- var vp9_720 = new Vp9Video720pProfile();
- var vp9_480 = new Vp9Video480pProfile();
- var avc_720 = new H264Video720pProfile() {alternative_to = vp9_720};
- var avc_480 = new H264Video480pProfile() {alternative_to = vp9_480};
- return Invercargill.ate(new EncodingProfile[] {
- new Vp9Video1080pHighFramerateProfile (),
- new Vp9Video1080pLowFramerateProfile (),
- vp9_720,
- avc_720,
- vp9_480,
- avc_480,
- new TheoraVideo360pProfile(),
- new TheoraVideo240pProfile(),
- });
- }
- }
|