Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Video Compression in Xamarin.Forms

NeerajGoelNeerajGoel USMember ✭✭

Hi,
I am using Xam.Plugin.Media to get video from camera/gallery now i need to get the size of that video also i need to compress the size. Please suggest how to get Media File size and how to compress media in Xamarin.Forms

Thanks in Advance.

Posts

  • NehalOSamaFahmyNehalOSamaFahmy Member ✭✭
    `  var file = await CrossMedia.Current.PickVideoAsync();
                            if (file != null)
                            {
                                stream = file.GetStream();
                                byte[] result;
                                using (var streamReader = new MemoryStream())
                                {
    
                                   stream.CopyTo(streamReader);
                                   result = streamReader.ToArray();
                                   var length= result.Length
    }
    }
    

    `

    that code to get length but i still search about how compress video i didn't found any solution please if found post it

Sign In or Register to comment.