Skip to content

Commit

Permalink
Added Hardware encoding.
Browse files Browse the repository at this point in the history
  • Loading branch information
ggarra13 committed Feb 25, 2024
1 parent f1a6187 commit dd08e6a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mrv2/lib/mrvFl/mrvSaveMovie.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ namespace mrv
}

ioOptions["FFmpeg/PixelFormat"] = options.ffmpegPixelFormat;

ioOptions["FFmpeg/HardwareEncode"] = options.ffmpegHardwareEncode;
if (options.ffmpegOverride)
{
ioOptions["FFmpeg/ColorRange"] = options.ffmpegColorRange;
Expand Down
1 change: 1 addition & 0 deletions mrv2/lib/mrvFl/mrvSaveOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 6 additions & 2 deletions mrv2/lib/mrvPy/IO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
,
Expand All @@ -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",
Expand Down Expand Up @@ -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."))
Expand Down
2 changes: 1 addition & 1 deletion tlRender

0 comments on commit dd08e6a

Please sign in to comment.