Git Product home page Git Product logo

media-kit / media-kit Goto Github PK

View Code? Open in Web Editor NEW
892.0 17.0 121.0 81.34 MB

A cross-platform video player & audio player for Flutter & Dart.

Home Page: https://github.com/media-kit/media-kit

License: MIT License

Dart 69.66% CMake 5.28% C 1.85% C++ 12.33% Swift 4.37% Makefile 0.83% Ruby 1.82% Objective-C 0.01% Java 2.83% Kotlin 0.01% HTML 0.18% Shell 0.83%
dart flutter libmpv c cpp media-player linux windows audio video android ios macos web java obj-c swift audio-player video-player hacktoberfest

media-kit's People

Contributors

23doors avatar abdelaziz-mahdy avatar ahmedabouelkher avatar alexmercerind avatar alexmercerind2 avatar alexv525 avatar ashilkn avatar birros avatar deckerst avatar default-anton avatar dferrarigrowtech avatar domingomg avatar femalemonkeyman avatar jamiepiccolo avatar kirill-21 avatar moffatman avatar noelex avatar prateekmedia avatar punxch avatar quackdoc avatar refi64 avatar wanjm avatar wizlif avatar yehudakremer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

media-kit's Issues

[Request] Please delete un-attended forks containing my code

Hi!

I see you have an old fork containing my code/commits at:

Please consider deleting those repositories containing un-maintained code authored & licensed by me.

This is the actual repository, which contains the final work rooted from that old state. I decided to rename package:libmpv to package:media_kit, in-order to have more freedom in terms of project's direction. Here, I just implemented H/W accelerated video playback too. The project now has much more to see here & a number of new things have also been added. Let's build it together. Get to the README for more information.

Thanks!

[Question] Subtitles are not working

var pp = windowsvidplayer.platform as libmpvPlayer;
      await pp.setProperty("sub-file", "E:\\sub.srt");
      await pp.setProperty("subs-with-matching-audio", "no");
      await pp.setProperty("sub-forced-only", "yes");
      await pp.setProperty("blend-subtitles", "video");
      controller = await VideoController.create(windowsvidplayer.handle);

      setState(() {});

      windowsvidplayer.open(Playlist([dta]));

experted
mpv " https://my-video-path" --sub-file=E:\sub.srt --subs-with-matching-audio=no --sub-forced-only=yes --blend-subtitles=video

using mpv exe an arggument is working fine;
but setProperty is not working in flutter applixcation

[Bug Report][GNU/Linux] Memory usage not freeing with dispose

I' just noticing that the memory taken up by both my own and the test application on linux (I have not tested other platforms) is never clearing. It is fine to begin with but eventually does get out of hand. I looked a bit and didn't really see an issue with flutter itself pertaining to this so i was just wondering if there was any insight.

[Bug Report] GLib-Error: creating thread 'mpv_render_context_set_update_callback': Resource temporarily unavailable

It's running out of memory gradually, even though I see dispose messages for every controller.

Screenshot from 2023-03-27 20-27-24
Screenshot from 2023-03-27 20-30-22

I am on Ubuntu 22.04 LTS, media_kit master, mpv 0.34.1, FFmpeg version: 4.4.2-0ubuntu0.22.04.1.

I am having a controller for each player. Gradually, over the period of 1-2 minutes, the app crashes with

GLib-ERROR **: 20:30:54.533: creating thread 'mpv_render_context_set_update_callback': Error creating thread: Resource temporarily unavailable

[Windows] Remove flutter::FlutterView::GetGraphicsAdapter usage

Hello !

To get started, thank's for your work ! :)

I wanted to test this package with your example but i got an error :

Launching lib\main.dart on Windows in debug mode...
E:\temp\media_kit-master\media_kit\media_kit_test\windows\flutter\ephemeral.plugin_symlinks\media_kit_core_video\windows\video_output_manager.cc(81,33): error C2039: 'GetGraphicsAdapter' n'est pas membre de 'flutter::FlutterView' [E:\temp\media_kit-master\media_kit\media_kit_test\build\windows\plugins\media_kit_core_video\media_kit_core_video_plugin.vcxproj]
Building Windows application...
Exception: Build process failed.

I've upgraded Flutter to the last version, clean everything i can.
If you want more informations tell me !

[Feature Request] setAudioFile, setSubFile

I am looking at the code and stumble upon setAudioTrack, setVideoTrack, setSubtitleTrack.

But this does not work for me.
I want to play a video, with a detached audio file and another file for the subtitle.

I have found that I can do that with mpv by using --audio-file and --sub-file. I wasn't able to get it working with --vid and --aid, that SetVideo/AudioTrack are used for.

I tried to use those switches in this package with setProperty but looking at the source, it seems only a limited subset is taken into account, and not those 2.

So either, add them to the list of setProperty taken into account or add dedicated method, like setAudioFile, setSubFile.

Thank you

[Question] App does not build on linux

Logs

CMake Error at flutter/ephemeral/.plugin_symlinks/media_kit_video/linux/CMakeLists.txt:15 (add_library):
  Target "media_kit_video_plugin" links to target "PkgConfig::mpv" but the
  target was not found.  Perhaps a find_package() call is missing for an
  IMPORTED target, or an ALIAS target is missing?


CMake Generate step failed.  Build files cannot be regenerated correctly.

I did follow all the steps described in the README (sudo apt install libmpv-dev libmpv2), but I get the following error (see E)

--- sudo apt install libmpv-dev libmpv2
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package libmpv2

[Bug] 8 or more Player(s) freeze the application

Filed dart-lang/sdk#51254 for now.

Let's see what should be done in regard to this. It is quite important to fix this. Many users of package:media_kit are definitely playing more than 8 videos at once. Reaching that level of stability/performance is certainly a goal for project.

8 is definitely not a less number. Most applications are never going to play this number of videos simultaneously.


You can +1 this issue comment. Working on this will require substantial time.

[Question] Build fails on Windows 10 and Flutter 3.8 beta

Hi. Even when trying to launch the app on Windows 10 and Flutter 3.8, the build fails.
Could you tell me where is wrong?

Log

Launching lib\main.dart on Windows in debug mode...
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(382,5): error MSB3491: �s���t�@�C�� "x64\Debug\media_kit_libs_windows_video_ANGLE_EXTRACT\media_ki.11B11C55.tlog\media_kit_libs_windows_video_ANGLE_EXTRACT.lastbuildstate" �ɏ������߂܂���ł����B�p�X: x64\Debug\media_kit_libs_windows_video_ANGLE_EXTRACT\media_ki.11B11C55.tlog\media_kit_libs_windows_video_ANGLE_EXTRACT.lastbuildstate �� OS �̃p�X�̏�����z���Ă��܂��B���S�C���̃t�@�C������ 260 �����ȉ��ɂ���K�v������܂��B [C:\Users\<user>\OneDrive\development\flutter_applications\media_kit_test_app\build\windows\plugins\media_kit_libs_windows_video\media_kit_libs_windows_video_ANGLE_EXTRACT.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(382,5): error MSB3491: �s���t�@�C�� "x64\Debug\media_kit_libs_windows_video_LIBMPV_EXTRACT\media_ki.9F972795.tlog\media_kit_libs_windows_video_LIBMPV_EXTRACT.lastbuildstate" �ɏ������߂܂���ł����B�p�X: x64\Debug\media_kit_libs_windows_video_LIBMPV_EXTRACT\media_ki.9F972795.tlog\media_kit_libs_windows_video_LIBMPV_EXTRACT.lastbuildstate �� OS �̃p�X�̏�����z���Ă��܂��B���S�C���̃t�@�C������ 260 �����ȉ��ɂ���K�v������܂��B [C:\Users\<user>\OneDrive\development\flutter_applications\media_kit_test_app\build\windows\plugins\media_kit_libs_windows_video\media_kit_libs_windows_video_LIBMPV_EXTRACT.vcxproj]
Exception: Build process failed.
Exited (sigterm)

Steps to reproduce

  1. Create a new flutter app.
  2. Edit the pubspec.yaml as described later.
  3. flutter pub get
  4. Press F5 on VSCode.

Envs

Flutter doctor
> flutter doctor -v  
[√] Flutter (Channel beta, 3.8.0-10.1.pre, on Microsoft Windows [Version 10.0.19045.2673],
    locale ja-JP)
    • Flutter version 3.8.0-10.1.pre on channel beta at C:\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 1a0a03a41d (4 weeks ago), 2023-02-16 22:03:58 -0600
    • Engine revision 639e313f99
    • Dart version 3.0.0 (build 3.0.0-218.1.beta)
    • DevTools version 2.21.1

[√] Windows Version (Installed version of Windows is version 10 or higher)   

[X] Android toolchain - develop for Android devices
    • Android SDK at C:\Users\<user>\AppData\Local\Android\sdk
    X cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe        

[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.5.2)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.5.33502.453
    • Windows 10 SDK version 10.0.19041.0

[!] Android Studio (version 2021.3)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    X Unable to find bundled Java version.
    • Try updating or re-installing Android Studio.

[√] VS Code (version 1.74.3)
    • VS Code at C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.60.0

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version
      10.0.19045.2673]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 111.0.5563.65
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 110.0.1587.41

[√] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 2 categories.
pubspec.yaml
name: media_kit_test_app
description: A new Flutter project.
publish_to: "none" # Remove this line if you wish to publish to pub.dev

version: 1.0.0+1

environment:
  sdk: ">=3.0.0-218.1.beta <4.0.0"

dependencies:
  flutter:
    sdk: flutter

  media_kit:
    git:
      url: https://github.com/alexmercerind/media_kit
      path: media_kit
      ref: 24f95f20233105220306388d7e3f5aef413d8cb9
  media_kit_video:
    git:
      url: https://github.com/alexmercerind/media_kit
      path: media_kit_video
      ref: 24f95f20233105220306388d7e3f5aef413d8cb9
  # media_kit_native_event_loop: ^1.0.0
  media_kit_libs_windows_video: ^1.0.0

dev_dependencies:
  flutter_test:
    sdk: flutter
  flutter_lints: ^2.0.0

flutter:
  uses-material-design: true
</details>

Request to Enable Discussions in Repository

I was wondering if it might be possible for you to enable discussions within this GitHub repository.

This would allow people to engage in Q&A sessions, share information about new releases or unexpected documentation, and showcase projects they've been working on. By providing this separate space for discussion, we could help prevent the issue tracker from becoming cluttered and ensure that issues are addressed in a more streamlined manner. It would also give you the opportunity to focus on more pressing matters, without feeling guilty about not responding to every comment or question that arises.

Would you be willing to consider enabling discussions within the repository?

[Bug Report][GNU/Linux] Rendering broken on Flutter 3.9.x & Snapshot widget freezes UI on Flutter 3.7.x

Edit by @alexmercerind:

This is a regression in Flutter. I have filed an issue at:
flutter/flutter#124009

Please drop a +1 to that issue for expecting quick fixes.

Thanks!

Original comment:

I was testing the plugin player, and couldn't get back in navigator history.

It finally worked, when carefully copying that missing snippet about the pageTransitionsTheme of MaterialApp theme, that I saw in the media_kit_test example app. Then, it finally worked. But when I tried to use ZoomPageTransitionBuilder instead, it didn't work again; meaning I can't go back to my previous route, and the player freeze and the app is stuck/frozen.

This is easily reproduced by modifying the pageTransitionsTheme of main.dart (line 25-29) of media_kit_test.

[Question] Set additional libmpv arguments

My Local RTSP-Stream (TV-Stream via Router) needs an additional argument for mpv to work --rtsp-transport=udp

cmd: mpv.exe "rtsp://..." --rtsp-transport=udp

is this somehow currently possible or will be in future?

[Question] macOS fatal error: 'mpv/client.h' file not found

In file included from /Users/jiangchunyu/Downloads/media_kit-main/media_kit_native_event_loop/macos/Classes/media_kit_native_event_loop.cc:3:
In file included from /Users/jiangchunyu/Downloads/media_kit-main/media_kit_native_event_loop/src/media_kit_native_event_loop.cc:9:
/Users/jiangchunyu/Downloads/media_kit-main/media_kit_native_event_loop/src/media_kit_native_event_loop.h:17:10: fatal error: 'mpv/client.h' file not found
#include <mpv/client.h>
^~~~~~~~~~~~~~
1 error generated.
Command CompileSwiftSources failed with a nonzero exit code
Command CompileSwiftSources failed with a nonzero exit code
** BUILD FAILED **

Exception: Build process failed
Macos is install mpv,but not found

[Enhancement] Possibility to resize the rect of `VideoController`

From the documentation:

/// 1. You can limit size of the video output by specifying `width` & `height`.
///    By default, both `height` & `width` are `null` i.e. output is based on video's resolution.

Currently, I initialize the video with 640x360, but I find the need to use a smaller resolution when the video is resized (192x144). Would it be possible to change the height and width of the VideoController?

I tried to create different video controllers with different resolutions, but it seems that the second controller isn't created if one controller is already initialized. It also crashes when the second controller is initialized. Is that by design?

[Enhancement] custom libmpv shared libraries

We need own libmpv builds for:

  • Allowing usage of package:media_kit in proprietary/commercial applications (by using LGPL compliant libmpv).
  • Reducing the final bundle size of the resulting application using package:media_kit as it's dependency.
  • Keeping specialized libmpv binaries available for download (e.g. GitHub releases) to to build projects having package:media_kit.

With the highest priority being first:

Windows [Done]

media_kit_core_audio bundles audio-only libmpv-2.dll on Windows.
media_kit_core_video bundles minimal video+audio libmpv-2.dll on Windows.

Both are LGPL compliant & allow commercial usage.

References:

Linux [Done]

package:media_kit doesn't bundle anything related to libmpv / FFmpeg etc. etc. It is not feasible either.

  • On Linux, distribution specific packages are the "standard".
  • Distribution specific packages are expected to be installed by the users themselves before installing application package.
  • Since, any commercial / proprietary application won't distribute these, it's not important for these to be LGPL etc.
  • In case of an alternative distribution methodology e.g. Snapcraft, Flathub etc., it is responsibility of the package:media_kit dependents to handle it themselves. Few references in regards to this may be located here, where libmpv, FFmpeg etc. are "bundled" into Flatpak package.

macOS [WIP]

  • Take hints from IINA. A really polished media player for macOS based on libmpv.

Android [Soon]

iOS [Soon]

  • ???

Documentation website

package:media_kit is becoming really large & there are a large number of features that need good documentation. As the project is growing further, it might be a good idea to provide documentation separately on a website; instead of GitHub README.

[Question] Web support timeline

I saw that the platforms table, doesnt include web

does that mean its not planned? and we need to create a work around to use media_kit with video_player to work across all platforms?

thank you for the package

[Windows] Playing file is in a seperate window

Hi,

Using the following code:

(note; these are just snippets of code)

  final Player _player = Player();
  VideoController? _videoController;
  _player.open(Playlist(
        [
          Media('file://${file.path}'),
        ],
      ));
      _videoController = await VideoController.create(_player.handle);
      setState(() {});
Video(
    controller: _videoController,
),

Code block 2 is in a function, when the first video gets loaded. It opens a seperate window to play said video. Then after switching between videos for a few times it suddenly work and is shown in the widget as defined in block 3.

Thanks in advance!
Kind regards,

Sample video of my hobby project on MacOS

Hi,
I have a hobby project for playing TV channels from my cable TV subscription which runs on iOS, Android and Android TV. This package made it possible to use the same code base to create a MacOS version of the project and it worked so well.

Thanks for the excellent implementation and sharing.

Here is how the app works on MacOS:

sample.mp4

[BUG] V/A out of sync when increasing `Player.rate`

While working on the implementation for macOS, I noticed that there was a progressive audio and video desynchronization when I change the rate of the Player:

player.rate = 2.0;

Tests (commit 21eb88d)

Platform Behavior
macOS V/A out of sync
Linux V/A out of sync
Windows Not tested

Ideas

One of these three possibilities may explain it:

  • If the issue is not present on Windows, it's possible that the lack of thread usage in the Linux and macOS implementations could be causing it
  • A missing option may be required by mpv
  • A bad implementation of rendering, perhaps certain frames need to be manually dropped, maybe through MPV_RENDER_PARAM_SKIP_RENDERING

[Question] Listen for network errors

Hello!
First of all, thank you for this awesome new project!
I'd like to know if it's possible to listen for network errors. I'm listening to the player.stream.error stream but when I enable the airplane mode, no error is raised. Is there any other solution?
Thanks!

[Enhancement] pub.dev scores

Now that package:media_kit is available on pub.dev, I'm noticing that we're losing few scores.
From what I've seen so far, primarily due to:

  • Missing example(s) in various packages.
  • Having too short description in pubspec.yaml of various packages.

A solid 140/140 on all packages will be good to have. Current scores:

The 'Package layout convention' page suggests that we can have examples at following places. It is important to consider because few of the packages don't have any Dart code in them (at all) & only native implementation or build steps.

  • example/example[.md]
  • example[/lib]/main.dart
  • example[/lib]/package_name.dart
  • example[/lib]/package_name_example.dart
  • example[/lib]/example.dart
  • example/README[.md]

[Question] flutter build windows is failing due to ANGLE.7z's failed integrity check

I followed all the steps in the README. The app runs fine if I run it with flutter run -d windows, but, when I run it with flutter build windows, the following error is thrown.

Logs

PS > flutter build windows 

 Building with sound null safety 

CMake Error at flutter/ephemeral/.plugin_symlinks/media_kit_core_video/windows/CMakeLists.txt:78 (message):
  ANGLE.7z seems corrupt.


Building Windows application...                                         
Unable to generate build files

[Question] Build failed on Windows 10 and Flutter 3.7

after upgrading flutter to 3.7 following error occurs when trying to use this package

Error waiting for a debug connection: The log reader stopped unexpectedly, or never started.
Error launching application on Windows.

with flutter run -v shows a little bit more

           #4      CommandRunner.runCommand (package:args/command_runner.dart:209:13)
           <asynchronous suspension>
           #5      FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:283:9)
           <asynchronous suspension>
           #6      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #7      FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:229:5)
           <asynchronous suspension>
           #8      run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:64:9)
           <asynchronous suspension>
           #9      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #10     main (package:flutter_tools/executable.dart:91:3)
           <asynchronous suspension>

Minimal example

import 'package:flutter/material.dart';
import 'package:media_kit/media_kit.dart';
import 'package:media_kit_video/media_kit_video.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyScreen(),
    );
  }
}

class MyScreen extends StatefulWidget {
  const MyScreen({Key? key}) : super(key: key);
  @override
  State<MyScreen> createState() => _MyScreenState();
}

class _MyScreenState extends State<MyScreen> {
  final Player player = Player();
  VideoController? controller;

  @override
  void initState() {
    super.initState();
    Future.microtask(() async {
      controller = await VideoController.create(player.handle);
      setState(() {});
    });
  }

  @override
  void dispose() {
    Future.microtask(() async {
      await controller?.dispose();
      await player.dispose();
    });
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Video(
      controller: controller,
    );
  }
}

pubspec.yaml

name: media_kit_test
description: A new Flutter project.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1

environment:
  sdk: '>=2.19.0 <3.0.0'

dependencies:
  flutter:
    sdk: flutter
  media_kit:
    git:
      url: https://github.com/alexmercerind/media_kit
      path: media_kit
  media_kit_video:
    git:
      url: https://github.com/alexmercerind/media_kit
      path: media_kit_video
  cupertino_icons: ^1.0.2

dev_dependencies:
  flutter_test:
    sdk: flutter
  flutter_lints: ^2.0.0

flutter:
  uses-material-design: true
flutter doctor -v
[√] Flutter (Channel stable, 3.7.0, on Microsoft Windows [Version 10.0.19045.2486], locale de-DE)
    • Flutter version 3.7.0 on channel stable at C:\flutter                                      
    • Upstream repository https://github.com/flutter/flutter.git                                 
    • Framework revision b06b8b2710 (2 days ago), 2023-01-23 16:55:55 -0800                      
    • Engine revision b24591ed32                                                                 
    • Dart version 2.19.0                                                                        
    • DevTools version 2.20.1                                                                    
                                                                                                 
[X] Windows Version (Unable to confirm if installed Windows version is 10 or greater)            

[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0) 
    • Android SDK at C:\Users\Filly\AppData\Local\Android\Sdk                    
    • Platform android-33, build-tools 32.0.0                                    
    • ANDROID_HOME = C:\Users\Filly\AppData\Local\Android\Sdk                    
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java       
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
    • All Android licenses accepted.                                             
                                                                                 
[√] Chrome - develop for the web                                                 
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe      
                                                                                 
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.4.4)    
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community   
    • Visual Studio Community 2022 version 17.4.33213.308                        
    • Windows 10 SDK version 10.0.22621.0                                        
                                                                                 
[√] Android Studio (version 2022.1)                                              
    • Android Studio at C:\Program Files\Android\Android Studio                  
    • Flutter plugin can be installed from:                                      
       https://plugins.jetbrains.com/plugin/9212-flutter                         
    • Dart plugin can be installed from:                                         
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)

[√] VS Code (version 1.74.3)
    • VS Code at C:\Users\Filly\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.56.0

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.19045.2486]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 108.0.5359.125
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 109.0.1518.61

[√] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.

[Question] RTSP live stream low delay

I want to play an rtsp live stream. If I want to set a very low delay, how should I set it? I followed the setup method provided by MPV without success
image

'''
if (player.platform is libmpvPlayer) {

(player.platform as libmpvPlayer)

.setProperty("opengl-glfinish", "yes");
(player.platform as libmpvPlayer)
 .setProperty("untimed", "")
....

'''

[Enhancement] Player's setter and getter API

The current player API is a bit confusing:

// the following code is valid, but only the first instruction call mpv
player.rate = 2.0;       // call mpv
player.state.rate = 2.0; // don't do anything

I think it would be better to either:

  • move the setters to PlayerState
  • merge Player & PlayerState
  • turn the PlayerState into a read only class

[Question] Setting HTTP headers for a URL source

With better_player package I can set HTTP headers for a URL source as following:

      var newSource = BetterPlayerDataSource(
        BetterPlayerDataSourceType.network,
        url,
        drmConfiguration: null,
        headers: {"Cookie": cookie},
      );

I tried the same with the extras parameter but could not play the same URL source successfully:

                      player.open(
                        Playlist(
                          [
                            Media(_video.text, extras: {
                              "Cookie": cookie
                            }),
                          ],
                        ),
                      );

Is there a way to set HTTP headers for a URL source?

[Question] More Log-Output, Location of Temp-Dir (if used)

when opening files from my NAS (mounted as an Windows Network Share) then it takes minutes for these files to start playing, approximately the same amount of time it would need to copy these files to local storage.
is that or something similar maybe happening with network files? if so (and in general) are there any temporary/logging directories for this package and/or the libraries it's using?

some other files cannot be opened at all (local or network), the app always crashes with these files, I just see a "Lost connection to device".
are there any logfiles written somewhere or is there a possibility to see more logging output in order to investigate the problem with these files? they work with VLC or the official mpv-Player but not with the package

[Question] Federated plugin

Hi,

Are there plans to support offering this plugin as a federated plugin of video_player? The API's are different, being able to use this plugin as a federated plugin of video_player would make transitioning between the packages much easier.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.