पैकेज, रिपॉज़िटरी और ऐप श्रेणियाँ खोजें

पैकेज विवरणv4.0.0

fc_native_video_thumbnail

मूल एपीआई के माध्यम से वीडियो थंबनेल बनाने के लिए एक फ्लटर प्लगइन।

AndroidiOSmacOSWindows
30-दिन डाउनलोड
38.2 हज़ार
लाइक
48
Pub अंक
160

पैकेज इंस्टॉल करें

flutter pub add fc_native_video_thumbnail

पैकेज अवलोकन

सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।

एक फ्लटर प्लगइन जो एंड्रॉइड, आईओएस, मैकओएस और विंडोज पर नेटिव प्लेटफॉर्म एपीआई का उपयोग करके वीडियो थंबनेल बनाता है। यह सिस्टम-लेवल कार्यक्षमता का उपयोग करके वीडियो से फ्रेम को दक्षतापूर्वक निकालता है, जिससे प्लेटफॉर्म के बीच उच्च प्रदर्शन और सुविधा सुनिश्चित होती है। यह प्लगइन ऐसे डेवलपर्स के लिए डिज़ाइन किया गया है जिन्हें एक विश्वसनीय थंबनेल निर्माण की आवश्यकता होती है जो क्रॉस-प्लेटफॉर्म छवि प्रोसेसिंग लाइब्रेरी पर निर्भर न हो। यह फ्लटर ऐप्स में वीडियो प्रीव्यू या मीडिया ब्राउज़िंग फीचर्स के लिए बिना किसी अड़चन के एकीकृत हो सकता है।

उपयोग

  • मीडिया गैलरी में वीडियो प्रीव्यू जनरेट करना
  • वीडियो प्लेबैक यूआई के लिए थंबनेल बनाना
  • वीडियो अपलोड या संपादन इंटरफेस बनाना
  • त्वरित वीडियो मेटाडेटा निकालने को सक्षम करना
  • ऑफलाइन वीडियो सामग्री इंडेक्सिंग का समर्थन

मुख्य विशेषताएँ

  • उत्कृष्ट प्रदर्शन के लिए मूल एपीआई का उपयोग करता है
  • क्रॉस-प्लेटफ़ॉर्म समर्थन (Android, iOS, macOS, Windows)
  • फ्रेम निकासी के लिए सरल API
  • उच्च गुणवत्ता वाली थंबनेल जनरेशन
  • न्यूनतम निर्भरता अतिरिक्त लागत

इनके लिए उपयुक्त

  • मीडिया ऐप विकासकर्ता
  • वीडियो स्ट्रीमिंग एप्लिकेशन
  • सामग्री प्रबंधन प्रणाली
  • शैक्षिक या सृजनात्मक उपकरण
  • वीडियो लाइब्रेरी विशेषताओं वाले ऐप्स

विचार योग्य बातें

  • Android और iOS पर मापदंड-विशिष्ट अनुमतियों की आवश्यकता होती है
  • वीडियो कोडेक या प्रारूप के आधार पर परिणाम भिन्न हो सकते हैं
  • थंबनेल आउटपुट के लिए सीमित कस्टमाइजेशन
  • मूल स्क्रिप्ट एसडीके की उपलब्धता पर निर्भर करता है
  • वास्तविक समय में थंबनेल उत्पादन के लिए उपयुक्त नहीं

मूल README

संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।

fc_native_video_thumbnail

pub package

A Flutter plugin to create video thumbnails via native APIs.

iOS Android macOS Windows Linux
Source (Path) ✅ ✅ ✅ ✅ ✅
Source (Uri) ✅ ✅ ✅ - -
Seeking ✅ ⚠️ ✅ - ✅

⚠️ Android seeking is only supported when the source file is a Uri.

Linux requires libavformat, libavcodec, libavutil, libswscale (FFmpeg) and libjpeg installed on the system.

Usage

  • saveThumbnailToFile saves the thumbnail to a file path.
    • Returns true if thumbnail was successfully created. Or false if thumbnail is not available.
    • Throws if error happens during thumbnail generation.
  • saveThumbnailToBytes returns the thumbnail as a byte array.
    • Returns the thumbnail as bytes if successfully created. Or null if thumbnail is not available.
    • Throws if error happens during thumbnail generation.

Example:

final plugin = FcNativeVideoThumbnail();

try {
  /// Extracts a thumbnail from [srcFile] with the given options and saves it to [destFile].
  ///
  /// [srcFile] source video path or Uri (See [srcFileUri]).
  /// [srcFileUri] If true, [srcFile] is a Uri (Android/iOS/macOS only).
  /// [destFile] thumbnail save path.
  /// [width] / [height] max dimensions of the thumbnail image.
  ///   Windows doesn't support non-square thumbnail images, only [width] is used in Windows, resulting in a [width]x[width] max thumbnail.
  /// [format] only "jpeg" is supported. Defaults to "jpeg".
  /// [quality] a fallback value for the quality of the thumbnail image (0-100). May be ignored by the platform.
  /// [at] the time position of the thumbnail.
  ///   Not supported on Windows, or Android if source file is a path.
  final generated = await plugin.saveThumbnailToFile(
            srcFile: srcFile,
            destFile: destFile,
            width: 300,
            height: 300,
            quality: 90);

  // `saveThumbnailToBytes` has the same options as `saveThumbnailToFile` except `destFile`.
  final thumbnailBytes = await plugin.saveThumbnailToBytes(
            srcFile: srcFile,
            width: 300,
            height: 300,
            quality: 90);
} catch (err) {
  // Handle platform errors.
}
Seeking to a specific time position
await plugin.saveThumbnailToFile(
            srcFile: srcFile,
            destFile: destFile,
            width: 300,
            height: 300,
            quality: 90,
            // Seek to 13 seconds to create the thumbnail.
            at: FcVideoThumbnailTime(13, .seconds),
// Supported units:
// .seconds
// .milliseconds
// .microseconds
);

श्रेणियाँ

निर्भरताएँ

निर्भरता सूची 1 आइटम

  • plugin_platform_interface^2.0.2

सोर्स रिपॉज़िटरी

इस पैकेज का उपयोग करने वाले प्रोजेक्ट