visioforge / .Net-SDK-s-samples

VisioForge .Net SDKs samples - Video Capture SDK, Video Edit SDK, Media Player SDK, Media Blocks SDK, Video Fingerprinting SDK
https://www.visioforge.com
MIT License
50 stars 24 forks source link

Support .NET MAUI #17

Closed shushu789 closed 1 month ago

shushu789 commented 7 months ago

Hello, I'm very happy to see this SDK of yours, I just downloaded the sample project, mainly I want to know if it is mature enough to use it on .NET MAUI? In the example of MAUI (SkinnedPlayer), I can only successfully run the Windows platform. If I run Android (pixel 5 32-api), I cannot successfully play the MP4 sample video (the video file is no problem because the Android system has built-in playback). After the file system loads the video file and clicks the play button, a crash will occur. Also I don't see anything about iOS and macos in the examples, are they not supported yet? I saw on your official website that these platforms are already supported, maybe I missed something, I would like to know about the completion progress or planned time of supporting cross platform in .NET MAUI so that I can buy it anytime and build with it Production ready app, thank you very much

This is a video of the playback and crash issues encountered when testing Android in the example

https://github.com/visioforge/.Net-SDK-s-samples/assets/85976805/383d27e6-8dc7-45a8-ad4c-96a169ee04c1

visioforge commented 7 months ago

The problem is confirmed, working on it.

visioforge commented 7 months ago

Please check the v15.8.9 update. Also, I think you should use Simple Player Demo, not Skinned.

macOS (MacCatalyst) and iOS are supported. But you need macOS to build.

shushu789 commented 7 months ago

Thank you for your response. I tested it again immediately, but unfortunately, the Simple Player Demo cannot play videos on Windows. I tested with three different video files: flv (hevc), mp4 (hevc), and MP4 (h.264). After clicking the play button, there was no response. On the Android emulator, when I opened a file and clicked the play button, the program crashed immediately (Pixel 5, API 32). This issue actually existed in the last test, so I had to use the SkinnedPlayer example.

Currently, similar issues persist when testing the SkinnedPlayer example. For example, on Android, clicking the play button produces sound for less than 2 seconds before crashing. The same happens on Windows; local videos can be played, but there are sound issues. This was a pre-existing issue; the system sound cannot control the volume of the player example, only the player itself can control it. In other words, the Windows system sound cannot take control of this player example. Even if I mute the system, the player still has sound unless I mute it separately. Additionally, despite having headphones connected to my computer, the example always plays sound through the computer's internal speakers and doesn't use the headphones.

All of the above tests were conducted using .NET 8 version.

Actually, I currently need an SDK for MAUI that can play and record rtmp (with hevc support), http-flv (with hevc support), hls, and other common mainstream media formats. It would be great if it could integrate with native ffmpeg and VLC libraries because these libraries support a wide range of formats and protocols.

visioforge commented 7 months ago

Please share your test video files.

I've tested a simple player demo (cloned this repo, the latest version) with an MP4 file (AAC/H264), and it's worked correctly on Windows and Android.

You can check the Output window of Visual Studio or implement the OnError event to help me with errors.

The cross-platform version of our SDK uses GStreamer, which has FFMPEG decoder support.

shushu789 commented 7 months ago

I shared two mp4 videos with different encodings, h264 and hevc. When tested on Android in the SimplePlayer8 example, they could not be played normally. The main problem was that clicking the play button would immediately crash. Is this possibly a compatibility issue? I provide the console's log, which starts recording when the play button is clicked.

android_debug.txt

When playing the test on Windows, hevc-encoded mp4 cannot be played. This product can be decoded and played normally when using vlc, potplayer, and ffplay. It also provides logging when playing on Windows

windows_debug.txt

MP4-hevc

MP4-h264

visioforge commented 6 months ago

Windows issue

I've tested the latest version, the Simple Player MAUI demo, Net 8, on a clean virtual machine (VMWare, Windows 11).

All worked correctly.

2024-02-11_16-44-04

Android

Please take a screenshot of your emulator settings.

shushu789 commented 6 months ago

- This is a screenshot related to the settings of the Android emulator:

33 44 22 11