Fix MOV and WEBM render transparency
This commit is contained in:
parent
39aa593c13
commit
1359000497
3 changed files with 5 additions and 3 deletions
|
@ -85,7 +85,9 @@ TLevelWriterMov::~TLevelWriterMov() {
|
||||||
preIArgs << QString::number(m_frameRate);
|
preIArgs << QString::number(m_frameRate);
|
||||||
|
|
||||||
postIArgs << "-pix_fmt";
|
postIArgs << "-pix_fmt";
|
||||||
postIArgs << "yuv420p";
|
postIArgs << "rgb24";
|
||||||
|
postIArgs << "-c:v";
|
||||||
|
postIArgs << "png";
|
||||||
postIArgs << "-s";
|
postIArgs << "-s";
|
||||||
postIArgs << QString::number(outLx) + "x" + QString::number(outLy);
|
postIArgs << QString::number(outLx) + "x" + QString::number(outLy);
|
||||||
postIArgs << "-b";
|
postIArgs << "-b";
|
||||||
|
|
|
@ -171,7 +171,7 @@ bool RenderController::addScene(MovieGenerator &g, ToonzScene *scene) {
|
||||||
}
|
}
|
||||||
if (r1 < r0) return false;
|
if (r1 < r0) return false;
|
||||||
TPixel color = scene->getProperties()->getBgColor();
|
TPixel color = scene->getProperties()->getBgColor();
|
||||||
if (m_movieExt == "mp4" || m_movieExt == "webm" || m_movieExt == "mov") color.m = 255;
|
if (isMovieType(m_movieExt) && m_movieExt != "mov" && m_movieExt != "webm") color.m = 255;
|
||||||
g.setBackgroundColor(color);
|
g.setBackgroundColor(color);
|
||||||
g.addScene(*scene, r0, r1);
|
g.addScene(*scene, r0, r1);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -439,7 +439,7 @@ void RenderCommand::rasterRender(bool isPreview) {
|
||||||
// depth). I tried to make OT to detect the mov settings and adaptively switch
|
// depth). I tried to make OT to detect the mov settings and adaptively switch
|
||||||
// the behavior, but ended in vain :-(
|
// the behavior, but ended in vain :-(
|
||||||
// So I just omitted every mov from applying solid background as a quick fix.
|
// So I just omitted every mov from applying solid background as a quick fix.
|
||||||
if (isMovieType(ext)) {
|
if (isMovieType(ext) && ext != "mov" && ext != "webm") {
|
||||||
scene->getProperties()->setBgColor(currBgColor);
|
scene->getProperties()->setBgColor(currBgColor);
|
||||||
}
|
}
|
||||||
// for non alpha-enabled images (like jpg), background color will be inserted
|
// for non alpha-enabled images (like jpg), background color will be inserted
|
||||||
|
|
Loading…
Reference in a new issue