Is there possibility to compress the audio and video file programmatically?

is there any plugin available for compress video , images and Document files


  • YkshLeoYkshLeo USMember ✭✭✭✭

    I didn't find any plugins for this.

    I prefer you to use some zip-algorithm to Zip and UnZip files.

  • YkshLeoYkshLeo USMember ✭✭✭✭
  • Thanks Vaikesh Leo ... but i don't want to zip and unzip files

  • YkshLeoYkshLeo USMember ✭✭✭✭

    Zip is a common way of compression.

    Are you try some other ?

  • FebinDonzManGroveFebinDonzManGrove USMember ✭✭
    edited March 2016

    zipping does not compresses the video files size for me. the zipped file is almost in the same size of the original file,

    the solution that i have found is that

    for android,

    compress the video using ffmpeg for xamarin android

    for ios,


            string downloadPath = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
            string downloadFilePath = Path.Combine(downloadPath, "compressed_video.mp4");
            var asset = AVAsset.FromUrl( NSUrl.FromFilename( sourceFilePath ) );
            AVAssetExportSession export = new AVAssetExportSession (asset, AVAssetExportSession.PresetLowQuality );
            export.OutputUrl = NSUrl.FromFilename( downloadFilePath );
            export.OutputFileType = AVFileType.Mpeg4;
            export.ShouldOptimizeForNetworkUse = true;
            export.ExportAsynchronously(  ( ) => 
                    if( export.Error != null )
                        System.Diagnostics.Debug.WriteLine( export.Error.LocalizedDescription );


  • TirumalTirumal USMember ✭✭

    Hi @praveen mm,
    Could you please share your sample video compression code to me, i have been struggling to find the faster compression code.
    I will really appreciate for your help.

  • LakshyaLakshya Member ✭✭✭


     public Compress (String[] files, String zipFiles)
            _files = files;
            _zipFiles = zipFiles;

    What value comes in the string[] files and string Zipfiles

Sign In or Register to comment.