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;

 

posted @ 2019-01-22 09:40 塞翁失身 阅读(...) 评论(...) 编辑 收藏