LoginSignup
6
7

More than 5 years have passed since last update.

AviUtlのexoファイル出力時のテキストの変換

Posted at

はじめに

AviUtlのexoファイルのテキストはUnicodeをバイト文字列にしたもののようで、かつ4096文字分の固定長形式のようです。
まぁ大した内容ではないのですが、動画作成で同じような内容はexoファイルを作って自動化するに辺り、テキスト変換用のメソッドを次のように作ってみたというものです。

exoファイル用のテキスト変換

private string ConvertExoText(string text)
{
    string result = BitConverter.ToString(UnicodeEncoding.Unicode.GetBytes(text)).Replace("-", "");
    result = result + new string('0', 4096 - result.Length);
    return result;
}

文字列をUnicodeでエンコードして、それをBitConverterで16 進数文字列形式に変換し、かつ"-"を取り除き、4096バイトとなるように後ろに"0"を付加するだけです。

以上

6
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
7