{"id":389004,"date":"2023-06-30T05:12:40","date_gmt":"2023-06-30T05:12:40","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=389004"},"modified":"2023-06-30T05:15:25","modified_gmt":"2023-06-30T05:15:25","slug":"implement-light-compressor-in-flutter","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/implement-light-compressor-in-flutter\/","title":{"rendered":"Implement light Compressor In Flutter"},"content":{"rendered":"\n<p>In this blog we will learn that how to Implement light Compressor In Flutter and  make video files smaller without losing quality by using the light_compressor package.<\/p>\n\n\n\n<p>You may also check our&nbsp;<a href=\"https:\/\/mobikul.com\/flutter-app-development\/\">flutter app development<\/a>&nbsp;company page.<\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"654\" data-id=\"389092\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/blog4-1200x654.png\" alt=\"blog4\" class=\"wp-image-389092\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/blog4-1200x654.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/blog4-300x163.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/blog4-250x136.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/blog4-768x418.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/blog4.png 1406w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n<\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">How it works&nbsp;:-<\/h2>\n\n\n\n<p>When a video file from the library is compressed, this checks if the user wants to specify a minimum bitrate to prevent low quality video from being compressed. This is useful if you don&#8217;t want the video to be compressed every time it is processed to avoid having very poor quality after several rounds of compression.The minimum bitrate selected is 2mbps.<\/p>\n\n\n\n<p>You can provide one of five video qualities: very_high, high, medium, low, or very_low, and the plugin will handle creating the appropriate bitrate number for the output video.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Implementation:-<\/strong><\/h2>\n\n\n\n<p>First we need to create a new flutter project and add the following dependencies in the pubspec.yaml file.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">dependencies:\n  flutter\n    sdk: flutter\n  light_compressor: ^2.0.1<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"ios\"> iOS&nbsp;<a href=\"https:\/\/pub.dev\/packages\/light_compressor#ios\"><\/a><\/h3>\n\n\n\n<p>Add the following to your&nbsp;<em>Info.plist<\/em>&nbsp;file, located in&nbsp;<code>&lt;project root&gt;\/ios\/Runner\/Info.plist<\/code>:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;key&gt;NSPhotoLibraryUsageDescription&lt;\/key&gt;\n&lt;string&gt;${PRODUCT_NAME} library Usage&lt;\/string&gt;<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"android\">Android&nbsp;<a href=\"https:\/\/pub.dev\/packages\/light_compressor#android\"><\/a><\/h3>\n\n\n\n<p>Add the following permissions in AndroidManifest.xml:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\"> &lt;uses-permission android:name=&quot;android.permission.READ_MEDIA_VIDEO&quot;\/&gt;<\/pre>\n\n\n\n<p>Include this in your Project-level build.gradle file:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">allprojects {\n    repositories {\n        maven { url &#039;https:\/\/jitpack.io&#039; }\n    }\n}<\/pre>\n\n\n\n<p>Include this in your Module-level build.gradle file: <\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">implementation &#039;com.github.AbedElazizShe:LightCompressor:1.2.3&#039;<\/pre>\n\n\n\n<p>Then just call [VideoCompressor.start()] and pass both source and destination file paths. The method has a callback for 5 functions;<\/p>\n\n\n\n<p>OnSuccess \u2014 called when compression completed with no errors\/exceptions.<br>OnFailure \u2014 called when an exception occured or video bitrate and size are below the minimum required for compression.<br>OnCancelled \u2014 called when the job is cancelled.<a href=\"https:\/\/pub.dev\/packages\/light_compressor#ios\"><\/a><\/p>\n\n\n\n<p>If you want to maintain the original video width and height from being modified during compression, you may pass true or false for keepOriginalResolution, with the default being false.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\"> final dynamic response = await _lightCompressor.compressVideo(\n      path: _filePath!,\n      videoQuality: VideoQuality.medium,\n      isMinBitrateCheckEnabled: false,\n      video: Video(videoName: videoName),\n      android: AndroidConfig(isSharedStorage: true, saveAt: SaveAt.Movies),\n      ios: IOSConfig(saveInGallery: false),\n    );<\/pre>\n\n\n\n<p>Get Compressor progress to get the stream when the video is being compressed.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">StreamBuilder&lt;double&gt;(\n    stream: _lightCompressor.onProgressUpdated,\n    builder: (BuildContext context,  AsyncSnapshot&lt;dynamic&gt; snapshot) {\n       if (snapshot.data != null &amp;&amp; snapshot.data &gt; 0) {\n         \/\/ --&gt; use snapshot.data\n       }\n    },\n),<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">complete code:-<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\">import &#039;dart:async&#039;;\nimport &#039;dart:io&#039;;\n\nimport &#039;package:file_picker\/file_picker.dart&#039;;\nimport &#039;package:flutter\/material.dart&#039;;\nimport &#039;package:light_compressor\/light_compressor.dart&#039;;\n\nvoid main() {\n  runApp(MyApp());\n}\n\n\/\/\/ A widget that uses LightCompressor library to compress videos\nclass MyApp extends StatefulWidget {\n  @override\n  _MyAppState createState() =&gt; _MyAppState();\n}\n\nclass _MyAppState extends State&lt;MyApp&gt; {\n  late String _desFile;\n  String? _displayedFile;\n  late int _duration;\n  String? _failureMessage;\n  String? _filePath;\n  bool _isVideoCompressed = false;\n\n  final LightCompressor _lightCompressor = LightCompressor();\n\n  @override\n  Widget build(BuildContext context) =&gt; MaterialApp(\n   debugShowCheckedModeBanner: false,\n    home: Scaffold(\n      appBar: AppBar(\n        title: const Text(&#039;Compressor Sample&#039;),\n      ),\n      body: Container(\n        margin: const EdgeInsets.all(16),\n        child: Column(\n          crossAxisAlignment: CrossAxisAlignment.start,\n          children: &lt;Widget&gt;&#091;\n            if (_filePath != null)\n              Text(\n                &#039;Original size: ${_getVideoSize(file:File(_filePath.toString()))} MB&#039;,\n                style: const TextStyle(fontSize: 16),\n              ),\n            const SizedBox(height: 8),\n            if (_isVideoCompressed)\n              Column(\n                crossAxisAlignment: CrossAxisAlignment.start,\n                children: &lt;Widget&gt;&#091;\n                  Text(\n                    &#039;Size after compression: ${_getVideoSize(file: File(_desFile))} MB&#039;,\n                    style: const TextStyle(fontSize: 16),\n                  ),\n                  const SizedBox(height: 8),\n                  Text(\n                    &#039;Duration: $_duration seconds&#039;,\n                    style: const TextStyle(fontSize: 16, color: Colors.red),\n                  ),\n                ],\n              ),\n            const SizedBox(height: 16),\n            Visibility(\n              visible: !_isVideoCompressed,\n              child: StreamBuilder&lt;double&gt;(\n                stream: _lightCompressor.onProgressUpdated,\n                builder: (BuildContext context,\n                    AsyncSnapshot&lt;dynamic&gt; snapshot) {\n                  if (snapshot.data != null &amp;&amp; snapshot.data &gt; 0) {\n                    return Column(\n                      children: &lt;Widget&gt;&#091;\n                        LinearProgressIndicator(\n                          minHeight: 8,\n                          value: snapshot.data \/ 100,\n                        ),\n                        const SizedBox(height: 8),\n                        Text(\n                          &#039;${snapshot.data.toStringAsFixed(0)}%&#039;,\n                          style: const TextStyle(fontSize: 20),\n                        )\n                      ],\n                    );\n                  }\n                  return const SizedBox.shrink();\n                },\n              ),\n            ),\n            const SizedBox(height: 24),\n            Text(\n              _failureMessage ?? &#039;&#039;,\n            )\n          ],\n        ),\n      ),\n      floatingActionButton: FloatingActionButton.extended(\n        onPressed: () =&gt; _pickVideo(),\n        label: const Text(&#039;Pick Video&#039;),\n        icon: const Icon(Icons.video_library),\n        backgroundColor: const Color(0xFFA52A2A),\n      ),\n    ),\n  );\n\n  Future&lt;void&gt; _pickVideo() async {\n    _isVideoCompressed = false;\n\n    final FilePickerResult? result = await FilePicker.platform.pickFiles(\n      type: FileType.video,\n    );\n\n    final PlatformFile ? file = result?.files.first;\n\n    if (file == null) {\n      return;\n    }\n\n    _filePath = file.path;\n    setState(() {\n      _failureMessage = null;\n    });\n\n    final String videoName =\n        &#039;MyVideo-${DateTime.now().millisecondsSinceEpoch}.mp4&#039;;\n\n    final Stopwatch stopwatch = Stopwatch()..start();\n    final dynamic response = await _lightCompressor.compressVideo(\n      path: _filePath!,\n      videoQuality: VideoQuality.medium,\n      isMinBitrateCheckEnabled: false,\n      video: Video(videoName: videoName),\n      android: AndroidConfig(isSharedStorage: true, saveAt: SaveAt.Movies),\n      ios: IOSConfig(saveInGallery: false),\n    );\n\n    stopwatch.stop();\n    final Duration duration =\n    Duration(milliseconds: stopwatch.elapsedMilliseconds);\n    _duration = duration.inSeconds;\n\n    if (response is OnSuccess) {\n      setState(() {\n        _desFile = response.destinationPath;\n        _displayedFile = _desFile;\n        _isVideoCompressed = true;\n      });\n    } else if (response is OnFailure) {\n      setState(() {\n        _failureMessage = response.message;\n      });\n    } else if (response is OnCancelled) {\n      print(response.isCancelled);\n    }\n  }\n}\n\n\nString _getVideoSize({required File file}) =&gt; formatBytes(file.lengthSync(), file.readAsBytesSync().lengthInBytes);\n\nformatBytes(int lengthSync, int i) {\n  final kb = lengthSync \/ 1024;\n  final mb = kb \/ 1024;\n  return mb.toString();\n}<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Output:-<\/h2>\n\n\n\n<figure class=\"wp-block-video\"><video height=\"2340\" style=\"aspect-ratio: 1080 \/ 2340;\" width=\"1080\" controls src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/blog4-1-3.mp4\"><\/video><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Conclusion<\/strong>:-<\/h2>\n\n\n\n<p>We have done with the implementation how to Implement light Compressor In Flutter.<\/p>\n\n\n\n<p>Check here for more interesting blogs &#8211;<a href=\"https:\/\/mobikul.com\/blog\/\" rel=\"nofollow\">https:\/\/mobikul.com\/blog\/<\/a>.<\/p>\n\n\n\n<p>Hope this blog helped you to better understand the Implement light Compressor In Flutter.<\/p>\n\n\n\n<p>Thanks for reading this blog.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">References:-<\/h2>\n\n\n\n<p><a href=\"https:\/\/pub.dev\/packages\/light_compressor\">https:\/\/pub.dev\/packages\/light_compressor<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this blog we will learn that how to Implement light Compressor In Flutter and make video files smaller without losing quality by using the light_compressor package. You may also check our&nbsp;flutter app development&nbsp;company page. How it works&nbsp;:- When a video file from the library is compressed, this checks if the user wants to specify <a href=\"https:\/\/webkul.com\/blog\/implement-light-compressor-in-flutter\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":516,"featured_media":389129,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[12989,14457],"class_list":["post-389004","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-flutter","tag-light-compressor"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Implement light Compressor In Flutter - Webkul Blog<\/title>\n<meta name=\"description\" content=\"Implement light Compressor In Flutter and reduce the size of the video file without compromising its quality.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/implement-light-compressor-in-flutter\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Implement light Compressor In Flutter - Webkul Blog\" \/>\n<meta property=\"og:description\" content=\"Implement light Compressor In Flutter and reduce the size of the video file without compromising its quality.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/implement-light-compressor-in-flutter\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-06-30T05:12:40+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-06-30T05:15:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Hello.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2240\" \/>\n\t<meta property=\"og:image:height\" content=\"1260\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Sakshi Rai\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sakshi Rai\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/implement-light-compressor-in-flutter\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/implement-light-compressor-in-flutter\/\"},\"author\":{\"name\":\"Sakshi Rai\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/494f4a6febbdb69ffe87f1b7cf0c46ba\"},\"headline\":\"Implement light Compressor In Flutter\",\"datePublished\":\"2023-06-30T05:12:40+00:00\",\"dateModified\":\"2023-06-30T05:15:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/implement-light-compressor-in-flutter\/\"},\"wordCount\":356,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/implement-light-compressor-in-flutter\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Hello.png\",\"keywords\":[\"Flutter\",\"light Compressor\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/implement-light-compressor-in-flutter\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/implement-light-compressor-in-flutter\/\",\"url\":\"https:\/\/webkul.com\/blog\/implement-light-compressor-in-flutter\/\",\"name\":\"Implement light Compressor In Flutter - Webkul Blog\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/implement-light-compressor-in-flutter\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/implement-light-compressor-in-flutter\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Hello.png\",\"datePublished\":\"2023-06-30T05:12:40+00:00\",\"dateModified\":\"2023-06-30T05:15:25+00:00\",\"description\":\"Implement light Compressor In Flutter and reduce the size of the video file without compromising its quality.\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/implement-light-compressor-in-flutter\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/implement-light-compressor-in-flutter\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/implement-light-compressor-in-flutter\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Hello.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Hello.png\",\"width\":2240,\"height\":1260,\"caption\":\"Hello\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/implement-light-compressor-in-flutter\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Implement light Compressor In Flutter\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/494f4a6febbdb69ffe87f1b7cf0c46ba\",\"name\":\"Sakshi Rai\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/2c12c700382e736a7084229ae8cdda5a6d6ac963df9ecc509657e4b5926f7f8b?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Feva.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/2c12c700382e736a7084229ae8cdda5a6d6ac963df9ecc509657e4b5926f7f8b?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Feva.png&r=g\",\"caption\":\"Sakshi Rai\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/sakshirai-mk754\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Implement light Compressor In Flutter - Webkul Blog","description":"Implement light Compressor In Flutter and reduce the size of the video file without compromising its quality.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webkul.com\/blog\/implement-light-compressor-in-flutter\/","og_locale":"en_US","og_type":"article","og_title":"Implement light Compressor In Flutter - Webkul Blog","og_description":"Implement light Compressor In Flutter and reduce the size of the video file without compromising its quality.","og_url":"https:\/\/webkul.com\/blog\/implement-light-compressor-in-flutter\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2023-06-30T05:12:40+00:00","article_modified_time":"2023-06-30T05:15:25+00:00","og_image":[{"width":2240,"height":1260,"url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Hello.png","type":"image\/png"}],"author":"Sakshi Rai","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Sakshi Rai","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/implement-light-compressor-in-flutter\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/implement-light-compressor-in-flutter\/"},"author":{"name":"Sakshi Rai","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/494f4a6febbdb69ffe87f1b7cf0c46ba"},"headline":"Implement light Compressor In Flutter","datePublished":"2023-06-30T05:12:40+00:00","dateModified":"2023-06-30T05:15:25+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/implement-light-compressor-in-flutter\/"},"wordCount":356,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/implement-light-compressor-in-flutter\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Hello.png","keywords":["Flutter","light Compressor"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/implement-light-compressor-in-flutter\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/implement-light-compressor-in-flutter\/","url":"https:\/\/webkul.com\/blog\/implement-light-compressor-in-flutter\/","name":"Implement light Compressor In Flutter - Webkul Blog","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/implement-light-compressor-in-flutter\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/implement-light-compressor-in-flutter\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Hello.png","datePublished":"2023-06-30T05:12:40+00:00","dateModified":"2023-06-30T05:15:25+00:00","description":"Implement light Compressor In Flutter and reduce the size of the video file without compromising its quality.","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/implement-light-compressor-in-flutter\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/implement-light-compressor-in-flutter\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/implement-light-compressor-in-flutter\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Hello.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Hello.png","width":2240,"height":1260,"caption":"Hello"},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/implement-light-compressor-in-flutter\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Implement light Compressor In Flutter"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/494f4a6febbdb69ffe87f1b7cf0c46ba","name":"Sakshi Rai","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/2c12c700382e736a7084229ae8cdda5a6d6ac963df9ecc509657e4b5926f7f8b?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Feva.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2c12c700382e736a7084229ae8cdda5a6d6ac963df9ecc509657e4b5926f7f8b?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Feva.png&r=g","caption":"Sakshi Rai"},"url":"https:\/\/webkul.com\/blog\/author\/sakshirai-mk754\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/389004","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/516"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=389004"}],"version-history":[{"count":16,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/389004\/revisions"}],"predecessor-version":[{"id":389132,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/389004\/revisions\/389132"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media\/389129"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=389004"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=389004"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=389004"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}