Skip to content

remove ffmpeg from package. #10

Closed
Closed

Description

@bsutton

The ffmpeg package provides media utilites for doing codec conversions and getting the duration of an audio file.

The downside is that ffmpeg bloats the Sounds package to the point there is a LITE and a FULL flavor of Sounds and even the LITE version is fat.

An issue has already been raised to move all codec conversions into separate packages in which case ffmpeg would also be moved into a separate package.

The other use of ffmpeg is to obtain a duration of a audio file, however it appears that android at least provides support for obtaining the duration of a audio file without using a third party package.

https://stackoverflow.com/questions/15394640/get-duration-of-audio-file

https://stackoverflow.com/questions/5219379/how-to-get-the-duration-of-an-audio-file-in-ios

This issue needs to completely remove FFMpeg from the Sounds and re-implement the dart library CodecHelper.getDuration using native ios and android methods as described by the above two links.

The dart library ffmpeg_util.dart currently implements the duration method which calls into the java/objective-c code using the plugin method: getMediaInformation.

The getMediaInformation method should be replaced with a duration method that returns (via a callback) the audio files duration as a long in milliseconds.
The 'getDuration' method will receive a three arguments:
slotNo:
path:
uuid:
Which will be a path to the audio file on the local file system.

The callback method name should be 'duration' and pass two values in a map:
slotNo - the plugin slot number passed by the dart code when calling getDuration

arg: - a json map contain the duration

The json map should contain a single key value pair:
{
"uuid" : ,
"milliseconds":
}

Activity

  1. added
    enhancement
    help wanted
    on Jun 19, 2020
  2. self-assigned this
    on Jun 28, 2020
  3. removed
    help wanted
    on Jun 28, 2020
  4. bsutton commented on Jun 28, 2020

    @bsutton
    OwnerAuthor

    done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions