我正在使用Xam.Plugin.Media捕获照片并录制视频。问题是视频的文件大小始终大于20MB。
我试图将设置降低到最低,但仍能获得20秒视频的20MB文件大小。我正在使用Samsung Galaxy A9(2018)。我可以使用 FFMPEG 减小文件大小吗?
private async void btnCamera4_Clicked(object sender, EventArgs e)
{
var cafNo = entCafNo.Text;
TimeSpan time = new TimeSpan(0, 0, 0, 20, 0);
await CrossMedia.Current.Initialize();
if (!CrossMedia.Current.IsCameraAvailable || !CrossMedia.Current.IsTakeVideoSupported)
{
await DisplayAlert("No Camera", "No Camera Available", "Ok");
return;
}
try
{
var file = await CrossMedia.Current.TakeVideoAsync(
new Plugin.Media.Abstractions.StoreVideoOptions
{
Name = cafNo + "_VID.mp4",
CompressionQuality = 0,
Quality = VideoQuality.Low,
DesiredLength = time
});
entVideoUrl.Text = file.Path;
}
catch (Exception ex)
{
Crashes.TrackError(ex);
}
}
答案 0 :(得分:0)