搜尋套件、儲存庫與 APP 分類

套件詳情v0.2.3

mp3_info

一個用於從 MP3 檔案中提取關鍵元資訊的套件,包括取樣率、位元速率和持續時間。以純 Dart 編寫。

AndroidiOSmacOSWindowsLinux
近 30 天下載
1020
喜歡數
23
Pub 分數
150

安裝套件

flutter pub add mp3_info

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

mp3_info 是一個純 Dart 套件,專門用於從 MP3 檔案中提取重要元資料,例如取樣率、比特率和持續時間。它讓開發者能在不依賴原生程式碼的情況下分析音訊屬性,確保在 Android、iOS、macOS、Windows 和 Linux 上的跨平台相容性。此套件輕巧且高效,非常適合需要檢查音訊檔案或準備播放的應用程式。設計簡單,可透過 pub.dev 順暢整合至 Flutter 專案。

適用情境

  • 音頻檔案分析
  • 播放設定
  • 元數據提取
  • 媒體庫管理
  • 音訊處理工具

主要特色

  • 純 Dart 實現
  • 跨平台支援
  • 提取取樣率、比特率和持續時間
  • 輕便且快速
  • 無原生依賴

適合對象

  • Flutter 應用需要音訊元資料
  • 媒體播放器開發
  • 音訊檔案工具
  • 桌面和移動音頻工具
  • 具有離線音訊處理功能的應用程式

使用建議

  • 僅限 MP3 格式
  • 不支援進階 ID3 標籤
  • 需要完全檔案存取權限
  • 無即時串流分析
  • 檔案必須完全載入到記憶體中

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

MP3 Info

Processes an MP3 file to extract key meta information such as MPEG version, MPEG layer version, bitrate, sample rate and duration. Can optionally process ID3 tags.

Usage

A simple usage example:

import 'dart:io';

import 'package:mp3_info/mp3_info.dart';

main() {
  MP3Info mp3 = MP3Processor.fromFile(File("test_files/test_128kpbs_441khz_stereo_10s.mp3"));

  print('MP3: test_128kpbs_441khz_stereo_10s.mp3');

  switch(mp3.sampleRate) {
    case SampleRate.rate_32000:
      print('Sample rate: 32KHz');
      break;
    case SampleRate.rate_44100:
      print('Sample rate: 44.1KHz');
      break;
    case SampleRate.rate_48000:
      print('Sample rate: 48KHz');
      break;
  }

  print('Bit rate: ${mp3.bitrate}bps');
  print('Duration: ${mp3.duration}');
}
Task list
  • [x] MP3 Key fields
    • [x] MPEG version
    • [x] MPEG layer version
    • [x] Sample rate
    • [x] Bitrate
    • [x] Duration
    • [x] CRC check
    • [x] Channel mode
    • [ ] Mode extension
    • [x] Copyright flag
    • [x] Origin (original/copy))
    • [x] Emphasis
  • [x] CBR (Constant Bitrate) support
  • [ ] VBR (Variable Bitrate) support
  • [ ] ID3 v1 Tag support
  • [ ] ID3 v2 Tag support
    • [ ] AENC Audio encryption
    • [ ] APIC Attached picture
    • [x] CHAP Chapters
    • [x] COMM Comments
    • [ ] COMR Commercial frame
    • [ ] ENCR Encryption method registration
    • [ ] EQUA Equalization
    • [ ] ETCO Event timing codes
    • [ ] GEOB General encapsulated object
    • [ ] GRID Group identification registration
    • [ ] IPLS Involved people list
    • [ ] LINK Linked information
    • [ ] MCDI Music CD identifier
    • [ ] MLLT MPEG location lookup table
    • [ ] OWNE Ownership frame
    • [ ] PRIV Private frame
    • [ ] PCNT Play counter
    • [ ] POPM Popularimeter
    • [ ] POSS Position synchronisation frame
    • [ ] RBUF Recommended buffer size
    • [ ] RVAD Relative volume adjustment
    • [ ] RVRB Reverb
    • [ ] SYLT Synchronized lyric/text
    • [ ] SYTC Synchronized tempo codes
    • [x] TALB Album/Movie/Show title
    • [x] TBPM BPM (beats per minute)
    • [x] TCOM Composer
    • [x] TCON Content type
    • [x] TCOP Copyright message
    • [x] TDAT Date
    • [x] TDLY Playlist delay
    • [x] TENC Encoded by
    • [x] TEXT Lyricist/Text writer
    • [x] TFLT File type
    • [x] TIME Time
    • [x] TIT1 Content group description
    • [x] TIT2 Title/songname/content description
    • [x] TIT3 Subtitle/Description refinement
    • [x] TKEY Initial key
    • [x] TLAN Language(s)
    • [x] TLEN Length
    • [x] TMED Media type
    • [x] TOAL Original album/movie/show title
    • [x] TOFN Original filename
    • [x] TOLY Original lyricist(s)/text writer(s)
    • [x] TOPE Original artist(s)/performer(s)
    • [x] TORY Original release year
    • [x] TOWN File owner/licensee
    • [x] TPE1 Lead performer(s)/Soloist(s)
    • [x] TPE2 Band/orchestra/accompaniment
    • [x] TPE3 Conductor/performer refinement
    • [x] TPE4 Interpreted, remixed, or otherwise modified by
    • [x] TPOS Part of a set
    • [x] TPUB Publisher
    • [x] TRCK Track number/Position in set
    • [x] TRDA Recording dates
    • [x] TRSN Internet radio station name
    • [x] TRSO Internet radio station owner
    • [x] TSIZ Size
    • [x] TSRC ISRC (international standard recording code)
    • [x] TSSE Software/Hardware and settings used for encoding
    • [x] TYER Year
    • [x] TXXX User defined text information frame
    • [ ] UFID Unique file identifier
    • [ ] USER Terms of use
    • [ ] USLT Unsychronized lyric/text transcription
    • [ ] WCOM WCOM Commercial information
    • [ ] WCOP Copyright/Legal information
    • [ ] WOAF Official audio file webpage
    • [ ] WOAR Official artist/performer webpage
    • [ ] WOAS Official audio source webpage
    • [ ] WORS Official internet radio station homepage
    • [ ] WPAY Payment
    • [ ] WPUB Publishers official webpage
    • [ ] WXXX User defined URL link frame

所屬分類

依賴

依賴清單 1 項

原始碼儲存庫

使用此套件的專案