diff --git a/mrv2/lib/mrvFl/mrvSaveMovie.cpp b/mrv2/lib/mrvFl/mrvSaveMovie.cpp index 50457e5a7..6cd9b75cd 100644 --- a/mrv2/lib/mrvFl/mrvSaveMovie.cpp +++ b/mrv2/lib/mrvFl/mrvSaveMovie.cpp @@ -91,7 +91,7 @@ namespace mrv } ioOptions["FFmpeg/PixelFormat"] = options.ffmpegPixelFormat; - + ioOptions["FFmpeg/HardwareEncode"] = options.ffmpegHardwareEncode; if (options.ffmpegOverride) { ioOptions["FFmpeg/ColorRange"] = options.ffmpegColorRange; diff --git a/mrv2/lib/mrvFl/mrvSaveOptions.h b/mrv2/lib/mrvFl/mrvSaveOptions.h index 6c514dea1..d0383c544 100644 --- a/mrv2/lib/mrvFl/mrvSaveOptions.h +++ b/mrv2/lib/mrvFl/mrvSaveOptions.h @@ -23,6 +23,7 @@ namespace mrv std::string ffmpegPreset; std::string ffmpegPixelFormat; tl::ffmpeg::AudioCodec ffmpegAudioCodec = tl::ffmpeg::AudioCodec::AAC; + bool ffmpegHardwareEncode = false; bool ffmpegOverride = false; std::string ffmpegColorRange; std::string ffmpegColorSpace; diff --git a/mrv2/lib/mrvPy/IO.cpp b/mrv2/lib/mrvPy/IO.cpp index be7af351f..ed284b124 100644 --- a/mrv2/lib/mrvPy/IO.cpp +++ b/mrv2/lib/mrvPy/IO.cpp @@ -24,8 +24,8 @@ void mrv2_io(py::module& m) #ifdef TLRENDER_FFMPEG , tl::ffmpeg::Profile, std::string, std::string, - tl::ffmpeg::AudioCodec, - bool, std::string, std::string, std::string, std::string + tl::ffmpeg::AudioCodec, bool, bool, std::string, std::string, + std::string, std::string #endif #ifdef TLRENDER_EXR , @@ -38,6 +38,7 @@ void mrv2_io(py::module& m) py::arg("ffmpegProfile") = tl::ffmpeg::Profile::None, py::arg("ffmpegPreset") = "", py::arg("ffmpegPixelFormat") = "YUV420P", + py::arg("ffmpegHardwareEncode") = false, py::arg("ffmpegOverride") = false, py::arg("ffmpegColorRange") = "PC", py::arg("ffmpegColorSpace") = "bt709", @@ -66,6 +67,9 @@ void mrv2_io(py::module& m) .def_readwrite( "ffmpegPixelFormat", &mrv::SaveOptions::ffmpegPixelFormat, _("FFmpeg Pixel Format.")) + .def_readwrite( + "ffmpegHardwareEncode", &mrv::SaveOptions::ffmpegHardwareEncode, + _("FFmpeg video encoding with hardware if possible.")) .def_readwrite( "ffmpegOverride", &mrv::SaveOptions::ffmpegOverride, _("FFmpeg Override color characteristics.")) diff --git a/tlRender b/tlRender index d2f256c0e..7b2520088 160000 --- a/tlRender +++ b/tlRender @@ -1 +1 @@ -Subproject commit d2f256c0e66f5b3b31a71d0d03515a597fbfe004 +Subproject commit 7b2520088e9ac07706f1234c6d7d32120fe5bc5e