nyx_converter 0.3.0 copy "nyx_converter: ^0.3.0" to clipboard
nyx_converter: ^0.3.0 copied to clipboard

A Flutter package that makes it easier to convert formats, codecs, etc. of media files.

Nyx Converter Github release pub package License Github Stars Issues #

nyx_converter logo

The nyx_converter package in Flutter empowers you to seamlessly convert media files between various formats, codecs, resolutions, bitrates, and audio properties. It utilizes the robust ffmpeg under the hood, providing a convenient and efficient solution for your media processing needs within your Flutter applications.

Key Features #

  • Extensive Container Support: Convert a wide range of video and audio file containers.
  • Flexible Codec Control: Specify desired video codecs (e.g., H.264, VP8) and audio codecs (e.g., AAC, MP3) to tailor the output file's characteristics.
  • Granular Resolution Management: Define the exact width and height in pixels for the converted video, granting precise control over the output dimensions. (will be added)
  • Bitrate Optimization: Set the bitrate (in kbps or on Mbps) to strike a balance between quality and file size, catering to different bandwidth requirements or storage constraints.
  • Audio Fine-Tuning: Specify the sampling frequency (in Hz) and number of channels (mono or stereo) for the audio stream within the converted media file, allowing for customized audio output. (will be added)

Installation #

To use this package, add nyx_converter as a dependency in your pubspec.yaml file.

dependencies:
  nyx_converter: <latest-version>
copied to clipboard

Platform Support #

The following table shows Android API level, iOS deployment target and macOS deployment target requirements in nyx_converter releases.

Android
API Level
iOS Minimum
Deployment Target
macOS Minimum
Deployment Target
24 12.1 10.15

Using #

Import: Import the package in your Dart code:

import 'package:nyx_converter/nyx_converter.dart';
copied to clipboard

Widget Usage: Use .convertTo method for initiate the media file path and desired output file path to save converted media file.

final filePath = 'path/to/my.mp4';
final outputPath = 'path/to/';
result =  NyxConverter.convertTo(
  filePath, // Specify the input file path
  outputPath, // Define the output file path
copied to clipboard

Container: Choose the desired container for your output media file.

  container: NyxContainer.mp4,
copied to clipboard

Video Codec: Select the appropriate video codec for your media file.

  videoCodec: NyxVideoCodec.h264,
copied to clipboard

Audio Codec: Select the appropriate audio codec for your media file.

  audioCodec: NyxAudioCodec.aac,
copied to clipboard

Bitrate: Set the bitrate to balance between quality and file size. Typical values range from 96 kbps for low quality to 320 kbps for high quality audio, and from 1 Mbps for low quality to 10 Mbps or higher for high quality video.

  audioBitrate: 192,
  videoBitrate: 5,
copied to clipboard

Debug Mode: Set true for get detailed logs

  debugMode: true,
copied to clipboard

Output file name: Set output file name

  fileName: 'new_name',
copied to clipboard

Execution: execution callback provides the path of the converted file and the status and messages of the conversion process.

  execution: (String? path, NyxStatus status, {String? errorMessage}) {
    //TODO: codes
  }
);
copied to clipboard

Stop process: Use .kill method to kill all nyx_converter processes.

NyxConverter.kill();
copied to clipboard

Contributing #

There is not much to contribute since the package serves its purpose, however, in chance of needing to bump or adjust some version, or any other suggestion for that matter, please read CONTRIBUTING.

18
likes
150
points
170
downloads
screenshot

Publisher

unverified uploader

Weekly Downloads

2024.09.28 - 2025.04.12

A Flutter package that makes it easier to convert formats, codecs, etc. of media files.

Repository (GitHub)
View/report issues
Contributing

Topics

#video #audio #converter #ffmpeg

Documentation

API reference

License

LGPL-3.0 (license)

Dependencies

ffmpeg_kit_flutter_full_gpl, flutter, path

More

Packages that depend on nyx_converter