Delphi 將視頻 Base64 字符串轉換爲視頻二進制文件

var
  Bytes: TBytes;
  Stream: TBytesStream;
begin
  with System.NetEncoding.TBase64Encoding.Create do
  try
    Bytes := Decode(System.IOUtils.TFile.ReadAllBytes('video.txt'));
  finally
    Free;
  end;

  Stream := TBytesStream.Create(Bytes);
  try
    Stream.SaveToFile('video.mp4');
  finally
    FreeAndNil(Stream);
  end;

end;