Playing video (OGG Theora) in a C# WinForms application? - c#

I'm looking for a GPL-compatible solution for playing a video file in a Windows Forms control, specifically with the OGG Theora codec?
I was looking into using the VLC player library. A Google search found this library on CodeProject, but it was apparently deleted.
Is there a mirror or a similar library available?

Check out MOGRE (such cute names), you could also build the source and do the interop by hand, but the wrapper is probably better.

have you seen vlcdotnet ?

Related

FFmpegInterop.UWP or VLC.MediaElement for UWP apps

Which one is better choice for UWP? VLC is really easy to start to use but FFmpeg more complicated (read: difficult). But if we are thinking for example licenses, support of different format, casting, media tags, converting , subtitles and audio support, video/audio editing etc.
Any experiences?
Vlc.DotNet does not run with UWP.
I'd advise you to use https://github.com/kakone/VLC.MediaElement which uses a C++/CX wrapper under the hood to call libvlc. That's a rather complete sample app: https://code.videolan.org/videolan/vlc-winrt
licenses, support of different format, casting, media tags, converting , subtitles and audio support, video/audio editing
That's a lot of considerations and I don't know your requirements and needs. You should evaluate both. But for ease of use, VLC.MediaElement is the best choice.
Vlc Dot net . you can find details here https://github.com/ZeBobo5/Vlc.DotNet
This library will provide you better control. There are many other choices but as you are talking about audio/video/subtitles/formats you will find everything in this library. This is core medial lib and wrap by custom control.
Thus can be easily import in any wpf project/ Uwp project.

c# mixing two audio files in windows phone 8.1 silverlight project

My goal is to mix 2 audio files that is one voice and one background music. For mixing I am using NAudio.
The problem is I am getting following exception while reading mp3 file using NAudio's Mp3FileReader.
DllImport cannot be used on user-defined methods
I am using NAudio in Windows Phone 8.1 Silverlight app project. I am not sure if NAudio is useable on WP Silverlight app if its useable then please help by providing a code example or suggest any other library or custom implementation to mix 2 audio files.
No, I'm afraid NAudio is not usable on Silverlight, as it makes lots of calls into Windows APIs which you can't do in Silverlight. You can take a look at the NAudio NLayer project which offers fully managed MP3 decoding. You could use that in conjunction with some of the more generic helper classes in NAudio like the MixingSampleProvider to perform the mixing you require. Of course the next issue would be what you want to do with that mixed audio. Silverlight does have a way of streaming user generated audio using the MediaElement but NAudio does not provide support for this directly.
[DllImport] requires a substantial chunk of code in the CLR, nothing very subtle about the pinvoke marshaller. That's a problem on a phone, it runs a special version of the CLR named .NETCore. Probably better known today as the codebase that spun-off the CoreCLR open source project. Keeping it small required unsubtle choices, pinvoke fell on the floor.
So no, you'll have no use at all for NAudio. You'll have to dip into the built-in support for audio. The relevant oversight MSDN page is this one. This blog post is relevant.
As you can tell, XAudio2 is your ticket with direct support for mixing. There is a learning curve of course, the language is probably the first obstacle given the question tags. Get started with this sample to get the basics.
Maybe you should consider taking the step to upgrade from WP8.1 Silverlight (WPS) project to WP8.1 (WinRT) one so that you have better access to audio APIs...
...or directly to a UWP/Win10 app (if you don't plan to release immediately to phones). If you choose that path, you could try maybe a free preview tool that converts WPS to UWP, just released from Microsoft and Mobilize.NET - https://blogs.windows.com/buildingapps/2015/09/17/initial-preview-of-silverlight-bridge-to-uwp/

Display webcam feed on windows form in C# without using 3rd party libraries

Here's the thing. I like building my own libraries because I learn a LOT about the functionality of everything in doing so. I'm looking to build a viewport on my windows form application (in C#) that streams live feed from my webcam.
Anyone know how to do this? I've found countless tutorials using other peoples libraries, but like I said before that's not what I'm looking for.
Thanks!
A complete tutorial on writing your own API : http://www.c-sharpcorner.com/uploadfile/yougerthen/integrate-the-web-webcam-functionality-using-C-Sharp-net-and-com-part-viii/
Does not use a third party library but the windows built in one called avicap32.dll

NAudio on Silverlight

Is it possible to use the NAudio on a silverlight application?
I just can't add the dll to my project... I'd like to build a little audio mixer.
I already searched on google but i can't find a way to do that...
someone has some hints for it???
NAudio uses tons of interop into Win32 functions that would be completely impossible to run in Silverlight.
UPDATE:
If you are looking for an MP3 player for Silverlight you may check out the Silverlight Audio Player.

How can I play .ogg, mp3, without Directsound libs in Windows CE 5.0 (Build 1400) in C#?

I've been facing a road block in trying to incorporate .ogg and .mp3 files in a WinCE 5.0 (build 1400) environment. Many of the answers I've found require some part of the Directsound libraries which are no longer supported.
Is there any way to implement playing of .ogg and .mp3 files on WinCE 5.0 without using Directsound libraries?
For this situation I would recommend taking a look at GSPlayer or TCPMP Player (open source software, C++), you could use the code to create a dll. GSPlayer uses WaveOut internally, so no worries about DirectSound. However you will need to check the license and make sure you are not violating it. After creating such dll you could use it with p/invoke.
If you are the OEM of your target device, another option that excludes .ogg would be to add Windows Media Player Control in your OS image, and use it from C# as an ActiveX control. There is more information on how to do this here, here and here
Update:
In answers to a similar question it is recommended to use FMOD, although this is not free for commercial use as #mack369 pointed out in a comment.

Categories

Resources