diff --git a/CHANGELOG.md b/CHANGELOG.md index 365214ba..ae6987a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,8 @@ * Fixed parsing SVG paths * Added support for loading basic animated SVG paths * Fixed importing solid layers from lottie - * Fixed importing mattes affecting precomps + * Fixed importing mattes affecting precomp + * Added transparency support when exporting to WebM * UI: * Added simplified Chinese translation * Added British English translation diff --git a/src/core/io/video/video_format.cpp b/src/core/io/video/video_format.cpp index 22204fb5..f3665324 100644 --- a/src/core/io/video/video_format.cpp +++ b/src/core/io/video/video_format.cpp @@ -392,7 +392,10 @@ class Video if ( ost.codec->pix_fmts == nullptr ) throw av::Error(QObject::tr("Could not determine pixel format")); // get_format() for some reason returns an invalid value - ost.codec_context->pix_fmt = ost.codec->pix_fmts[0]; + if (ost.codec->id == AV_CODEC_ID_VP9 || ost.codec->id == AV_CODEC_ID_VP8) + ost.codec_context->pix_fmt = AV_PIX_FMT_YUVA420P; + else + ost.codec_context->pix_fmt = ost.codec->pix_fmts[0]; // just for testing, we also add B-frames if ( ost.codec_context->codec_id == AV_CODEC_ID_MPEG2VIDEO ) @@ -813,7 +816,7 @@ std::unique_ptr glaxnimate::io::video::VideoFormat return std::make_unique(app::settings::SettingList{ // slug label description default min max app::settings::Setting{"bit_rate", tr("Bitrate"), tr("Video bit rate"), 5000, 0, 10000}, - app::settings::Setting{"background", tr("Background"), tr("Background color"), QColor{}}, + app::settings::Setting{"background", tr("Background"), tr("Background color"), QColor(0, 0, 0, 0)}, app::settings::Setting{"width", tr("Width"), tr("If not 0, it will overwrite the size"), document->main()->width.get(), 0, 10000}, app::settings::Setting{"height", tr("Height"), tr("If not 0, it will overwrite the size"), document->main()->height.get(),0, 10000}, app::settings::Setting{"verbose", tr("Verbose"), tr("Show verbose information on the conversion"), false},