]> git.sesse.net Git - nageru/blobdiff - x264encode.cpp
Make it possible to set x264 preset/tune from the command line.
[nageru] / x264encode.cpp
index a72d940f8a115eb8bde0be93fb7adb953b02d7e1..cafb64d813c83a778051c99bb085d8b77064e892 100644 (file)
@@ -2,6 +2,7 @@
 #include <unistd.h>
 
 #include "defs.h"
+#include "flags.h"
 #include "mux.h"
 #include "timebase.h"
 #include "x264encode.h"
@@ -60,7 +61,7 @@ void X264Encoder::end_encoding()
 void X264Encoder::init_x264()
 {
        x264_param_t param;
-       x264_param_default_preset(&param, "ultrafast", "film");  // TODO: flags
+       x264_param_default_preset(&param, global_flags.x264_preset.c_str(), global_flags.x264_tune.c_str());
 
        param.i_width = WIDTH;
        param.i_height = HEIGHT;