https://github.com/softyesti/soft_converter
A dart package/library for convert videos and images to some formats using cwebp and FFmpeg
https://github.com/softyesti/soft_converter
converter cwebp dart dart-library dart-package ffmpeg ffmpeg-wrapper flutter flutter-library flutter-package image-converter image-manipulation library package video-converter video-manipulation
Last synced: 3 months ago
JSON representation
A dart package/library for convert videos and images to some formats using cwebp and FFmpeg
- Host: GitHub
- URL: https://github.com/softyesti/soft_converter
- Owner: softyesti
- License: lgpl-3.0
- Created: 2024-05-15T12:56:56.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-17T15:45:18.000Z (11 months ago)
- Last Synced: 2025-02-10T04:29:50.726Z (4 months ago)
- Topics: converter, cwebp, dart, dart-library, dart-package, ffmpeg, ffmpeg-wrapper, flutter, flutter-library, flutter-package, image-converter, image-manipulation, library, package, video-converter, video-manipulation
- Language: Dart
- Homepage: https://www.softyes.com.br
- Size: 86.5 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Soft Converter
A Dart package/library for convert some video and images to some formats using [cwebp](https://developers.google.com/speed/webp/docs/cwebp) and [FFmpeg](https://ffmpeg.org/).
This package is not ready for production!## Resources
- Convert `.jpg` and `.png` images to `.webp`
- Convert `.mp4` videos to `.webm`## Platforms
- Windows
- macOS
- Linux## Pre-requisites
- Have the `cwebp` binary or have it installed and available in the system path
- Have the `FFmpeg` binary or have it installed and available in the system path## Usage
### SoftImageConverter
```dart
// ignore_for_file: avoid_printimport 'dart:io';
import 'package:soft_converter/soft_converter.dart';
Future main() async {
// The paths for the binaries are optional, if not defined
// SoftConverter will use the system path.
final converter = SoftImageConverter();try {
final files = await converter.toWEBP(
inputs: [File('assets/space.jpg')],
output: Directory('assets/'),
);for (final file in files) {
print('Image file path: ${file.path}');
}
} catch (e) {
rethrow;
}
}
```### SoftVideoConverter
```dart
// ignore_for_file: avoid_printimport 'dart:io';
import 'package:soft_converter/soft_converter.dart';
Future main() async {
// The paths for the binaries are optional, if not defined
// SoftConverter will use the system path.
final converter = SoftVideoConverter();try {
final files = await converter.toWEBM(
inputs: [File('assets/gradient.mp4')],
output: Directory('assets/'),
);for (final file in files) {
print('Video file path: ${file.path}');
}
} catch (e) {
rethrow;
}
}
```## Credits
- João Sereia [\](mailto:[email protected])
- SoftYes TI [\](https://softyes.com.br)