vlc uwp Dash playback issue - c#

I'm using VLC for Instagram live playback.
As long as I'm using Libvlcsharp 3.4.6 VideoLAN.libvlc.UWP 3.1.1.1 everything working fine when I create a media from the live dash playback URL.
But when I update any of the NuGets above live playbacks can not play anymore and I see only a black screen.
I have to mention that, the latest UWP VLC player from Windows Store can play the URL, I don't know what is going wrong.
Thanks.
Regards

Related

Unity iOS Build - No audio when returning from Control Center with external audio playing

I have a Unity iOS app with Mute Other Audio Sources checked in Project Settings > Player. When I'm playing audio from another app on device and foreground my app, everything works as expected: the audio from the other app fades out and the audio from my app fades in.
However, when I have my app open and audio is playing, open up the iOS Control Center, start playing audio from another app (say, Apple Music, Apple Podcasts, or Spotify), and then close the control center, unexpected behavior occurs. The audio from the other app fades out as anticipated, but the audio from my app does not fade back in. All audio in my app remains muted/disabled/otherwise silenced as I continue playing, and only returns when I background and foreground my app again.
I have also received a user report that the app crashed when repeating these same steps (open Control Center, play music, close Control Center). I haven't been able to reproduce that bug, but I am concerned that this may be an issue for other users.
It's almost as if different audio behavior occurs in OnApplicationPause vs. OnApplicationFocus, but I haven't been able to get it to work even if I restart my AudioSource in either of these contexts.
I have reproduced this error in Unity 2019.4.17 and 2020.3.18. Not sure if it's a bug in Unity or if there's something I could be doing in my code to mitigate it. Let me know if I can provide additional information that would be helpful in addressing the issue. Thanks in advance for any advice you're able to give!
Update: Using Unity 2020.3.18 and iPhone 13, this only happens when the iOS device is on silent mode. The app normally plays audio even if the device is silenced, but fails to play audio if the device is silenced and I return to the app from the Control Center as described above. When I experience this issue, the audio plays after switching to ring mode. When the device is on ring mode from the start, everything works as expected.

Windows 10 usb camera not working from code but works from other programs

I am unable to create an application in any programming language that will playback video from a usb webcam.
I want to display video feed from a webcam, and then take a snapshot of a frame at the press of a button.
The existing program uses avicap32.dll and works fine on older versions of windows, but does not work on windows 10.
On windows 10 I tested that VLC is able to playback the webcam from dshow, and it is able too. I then made a c# application that used a libvlc wrapper to play the webcam, and no video is ever loaded. However the light on my webcam lights up while the app is running. If i take the application and move the webcam to a windows 7 pc video plays in my c# app.
I then tried ffmpeg, running ffplay from command line plays video from webcam no problem. I made a c# app that will create a new process and run the ffplay exe with arguments. I get an error in the ffplay output saying it could not find the video format.
I then tried running ffplay from a subprocess in python, basicaly the exact same thing as the c# app above. This time video playback is successful.
I figured it must be something to do with c#. So I made a quick c++ application that uses lib vlc to play dshow://. I get no video playback but the light on the webcam turns on. If i move this c++ application to the windows 7 machine the application works and displays video from the camera. (this was made using mingw and not visual c++)
I also attempted to use directshow but that also did not work. just got a black image, and was unable to copy frames.
The strange thing is I was able to use the Universal app c# examples from microsoft and it is able to use the webcam. I have to give the example application permission to use the webcam first.
Furthermore, I know the webcam is working fine on the windows 10 machine because the Camera app in windows 10 works fine, vlc works fine, and ffplay work fine.
Does anyone know what is going on here? Is microsoft playing games? Are they forcing people to use univeral apps if they want webcam access? How is VLC, FFMPEG. working they'r not universal apps.
Update:
I'v still had no luck getting a winforms application to display an image from the webcam, however, I decided to use Process to start my python script that starts ffplay, and suprisingly I got the same error message i got when just directly running ffplay from c# using process. The error im getting is
"Could not find codec parameters for stream 0 (Video: mjpeg (MJPG / 0x47504A4D), none(bt470bg/unknown/unknown), 640x480): unspecified pixel format
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, dshow, from 'video=Logitech HD Webcam C615':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), none(bt470bg/unknown/unknown), 640x480, 30 fps, 30 tbr, 10000k tbn, 10000k tbc"
UPDATE 2:
I'm surprised of how little information online is available on this topic. However for those of you in the future that face this problem. I found a article on the Microsoft website, that states that the new app security mechanism in windows 10 version 1809 prevents any application from accessing camera's and microphones unless they are UWP, and have permissions. However, if the application knows how to directly communicate with the device bypassing windows libraries it is possible for that application to still use the camera. https://support.microsoft.com/en-us/help/4468234
This is where I ended, I am going to make a UWP app with a tcp socket server to broker webcam images to my old software.

Streaming Youtube Video in WPF

I have an application that can play online radios with the Windows Media Player. Now I wanted to add Youtube as a source aswell (videos only). I couldn't really find anything regarding to this. If it does not work with the WMP I am also free for any other ways.
What I tried so far was setting the URL of the WMP to the following values:
https://www.youtube.com/watch?v=ID
https://www.youtube.com/v/ID
Both of them without any success.
Note: I only need the audio not the video itself.

Access HTC wm6.5 camera using .NET

Well i have a htc diamond 2 which run on wm6.5, I would like to access the built in camera to capture image.
I am not building wm app, i want to build a c#(or any other .NET) winform app that run on windows 7 platform.
Is that possible?
I found some articles about directshow.net,wia,windowsmobile camera capture dialog etc.But i really have no idea on how to start it.
So my question is:
How do i establish a connection to my phone(i have to initiate a connection between my pc and phone's camera first right?),do i need to download any windows mobile sdk?
To control the camera, do i need any driver installed?
Do i use htc camera api/sdk(which i can't find) or windows mobile api/sdk to control the camera?
For HTC devices DirectShow cannot be used. The problem is that HTC provides only basic DirectShow API, and you will be able only use very small resolution from camera 320x240. HTC doen't provide any SDK. But I found very useful components for Windows Mobile Direct Show on this page. They are paid but quite good. I think it is worth to check. I'm using Player Control for DirectShow video playing. And there HCTCamera component (Some raw version I think still free) which I didn't check but you can:
HTCCamera Control

C# video player that supports streaming?

I want to add a video player in my Windows Form that would be able to stream videos (flv) from internet (web-server). So far i've tried Microsoft Windows Media Player and it's working but I don't like it because of its lags and bugs and etc.
So are there any other video players that can be easily embedded in a Windows Form and that support video streaming? (by streaming I don't mean something like live TV streaming, but just downloading (buffering) and playing at the same time the video)
Perhaps you can embed VLC as an ActiveX component?
There is a Flash ActiveX control which (I expect) would handle these natively.

Categories

Resources