muzoapi 0.0.1 copy "muzoapi: ^0.0.1" to clipboard
muzoapi: ^0.0.1 copied to clipboard

A Dart package for extracting audio and video streams from YouTube videos, supporting multi-language audio tracks.

Muzo API #

A Dart package for extracting audio and video streams from YouTube videos. This package acts as a logical wrapper (similar to InnerTube implementations) to fetch streaming data, parse adaptive formats, and handle multiple audio languages.

Features #

  • Extract Video Streams: Get video streams with resolution, bitrate, and codecs.
  • Extract Audio Streams: Get audio streams with bitrate, sample rate, and channels.
  • Multi-Language Support: Detect and list available audio tracks for multi-language videos (dubbed content).
  • Easy to Use: Simple API to fetch data by Video ID.

Getting Started #

Add this to your package's pubspec.yaml file:

dependencies:
  muzoapi: ^0.0.1

Usage #

import 'package:muzoapi/youtube_stream_provider.dart';

void main() async {
  // Initialize the InnerTube instance
  final yt = InnerTube();

  try {
    // Fetch stream info for a video
    final videoId = 'YOUR_VIDEO_ID'; 
    final streamInfo = await yt.player(videoId);

    print('Video Title: ${streamInfo.title}');

    // Check for multiple languages
    if (streamInfo.hasMultipleLanguages) {
      print('Available Languages: ${streamInfo.availableLanguages}');
    }

    // List Audio Streams
    print('\n--- Audio Streams ---');
    for (var audio in streamInfo.audioStreams) {
       print('Language: ${audio.languageDisplayName ?? "Default"} | Bitrate: ${audio.bitrate}');
    }

    // List Video Streams
    print('\n--- Video Streams ---');
    for (var video in streamInfo.videoStreams) {
      print('Resolution: ${video.width}x${video.height} | Quality: ${video.qualityLabel}');
    }

  } catch (e) {
    print('Error fetching video info: $e');
  }
}

Additional Information #

This package is a "dark" package, meaning it relies on reverse-engineered internal APIs of the target service. It may break if the internal API changes. Use responsibly.

License #

MIT

1
likes
140
points
81
downloads

Publisher

unverified uploader

Weekly Downloads

A Dart package for extracting audio and video streams from YouTube videos, supporting multi-language audio tracks.

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

cupertino_icons, flutter, http

More

Packages that depend on muzoapi