Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

動画合成 #41

Merged
merged 18 commits into from
Apr 27, 2023
Merged

動画合成 #41

merged 18 commits into from
Apr 27, 2023

Conversation

windymelt
Copy link
Owner

@windymelt windymelt commented Apr 27, 2023

solves: #

前提 / Prerequisites

  • 動画も背景に合成したいが今はできない
  • できるとゲーム実況的な構成が可能になる

なぜこのPRが必要になったか / Why do we need this PR

  • ほしい

なにをやったか / What I did

  • 2通りの手法があったので2通り実装したが、サブ的な手法はデッドコードのまま遺しておいた
    • 主: 前景を画像とアルファチャンネルとに分けた動画を生成(MKV形式は複数ストリームが可能なのでこれができる) して、動画と合成する
    • 副: カラーキー合成を行う(マゼンタをキーにする。画質は劣化する)
  • video属性で起動するが、背景も透明でなければならない(あとでなんとかする)

補足 / Supplementary information

  • アルファチャンネルによる合成はChromiumでしか動作しない(Firefoxが背景透過をサポートしていないため)(バグ?)。
  • Firefoxはいったん未対応のままとした。
  • Chromiumのバグでアスペクト比がしばらく狂った状態になる。https://bugs.chromium.org/p/chromium/issues/detail?id=1416398
  • Chromiumのエンジンをheadless=newに設定したところ、同時に1つしか起動できなくなったのでSemaphoreではなくMutexにした。
  • Verboseスイッチでデバッグ状態にしているときはタイムスタンプが合成される。
  • framerateが今おかしいのでちょっとずつずれている気がする。あとで直す
  • 合成オフの状態だと動画の最後らへんが切れることがある。あとで直す

@windymelt windymelt self-assigned this Apr 27, 2023
@windymelt windymelt merged commit 6798768 into main Apr 27, 2023
@windymelt windymelt deleted the reduction-images branch April 27, 2023 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant