如何解决在 Android Xamarin Forms 中压缩视频时出现视频转码器问题
在视频转码器中压缩视频时上传问题似乎是 com.otaliastudios.transcoder.source.FilePathDataSource.ensureDescriptorSource java.lang.RuntimeException:(没有这样的文件或目录)但问题仍未重新创建我的手机。如何解决这个问题
string path = System.IO.Path.GetDirectoryName(outputpath);
AVAssetExportSession export = new AVAssetExportSession(sourceVideoPath);
string outputFilePath = Path.Combine(path,$"{DateTime.Now.ToString(DateString.strDMYHMS,AppState.CultureInfo)}.mp4");
export.OutputPath = outputFilePath;
await export.ExportTaskAsync();
MemoryStream output = new MemoryStream();
using (Stream source = File.OpenRead(outputFilePath))
await source.copyToAsync(output);
output.Seek(0,SeekOrigin.Begin);
return outputFilePath;
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。