Open NVentimiglia opened 6 years ago
package id="Xamarin.Android.MP4Transcoder" version="1.0.9" targetFramework="monoandroid60"
public class VideoUtilityAndroid { public async Task<string> ConvertFileAsync( string inputPath, Action<int, int> onProgress = null) { File inputFile = new File(inputPath); if (Android.OS.Build.VERSION.SdkInt >= BuildVersionCodes.Kitkat) { try { File ouputFile = new File(inputFile.CanonicalPath.Replace(".mp4", "_min.mp4")); double percent = 0; await Xamarin.MP4Transcoder.Transcoder.For960x540Format().ConvertAsync( inputFile, ouputFile, f => { // this is never called percent = f; onProgress?.Invoke((int)(f * (double)100), 100); }); // file is empty at this point return ouputFile.Path; } catch (Exception ex) { LogController.LogError(ex); } } return inputFile.Path; } }
Could you please add some log?
package id="Xamarin.Android.MP4Transcoder" version="1.0.9" targetFramework="monoandroid60"