has_audio

pub license: MIT

A Flutter plugin for checking if a video file contains an audio track. This plugin provides a simple method to quickly determine the presence of audio in a video file on both Android and iOS platforms.

Features

  • Check if a video file has an audio track.
  • Easy-to-use with a simple method call.
  • Supports both Android and iOS.

Installation

To use this plugin, add has_audio as a dependency in your pubspec.yaml file.

dependencies:
  has_audio: ^0.0.8

To use the has_audio plugin, first import it in your Dart code:

import 'package:has_audio/has_audio.dart';

Then, you can call the HasAudio.check method to check if a video file contains an audio track.

String videoPath = 'path/to/your/video/file.mp4';
bool hasAudio = await HasAudio.check(videoPath);
print(hasAudio ? 'The video has audio' : 'The video does not have audio');