What is the best way to play MMS/RTSP streams in C#? - c#

Is there something like libmms, librtsp or xine-lib for C#?

I have been using the BASS library successfully for these types of streams.
It should be able to do it with the WMA plugin.
It's written in C/C++ , but there is a .NET wrapper available.
It also supports mp3 and ogg/aac (with plugins)
You may also try to host the Media Player, if the target is Windows Forms/WPF.

Related

Merge Audio and Video on Uno Platform

I am trying to merge an audio stream and a video stream into a single file, on the Uno Platform, particularly for WebAssembly.
I already know that the normal, desktop-only way is by calling ffmpeg, and I also found a C# only way for UWP here.
However, the code used Windows.Media.Editing which is not implemented in Uno.
I know there is a ffmpeg library port for WASM here, but I don't know how to call it from my Uno web application.
So are there any ways to merge an audio stream and a video stream to a single file, on the Uno platform for WASM?
Unfortunately, this API is not yet implemented in Uno Platform, so in this case you need to write platform-specific implementation.
If you have a JavaScript library available, which can provide the functionality you need, you can still call it from the C# code. There is a three-part tutorial in the Uno Platform docs on implementing C# - JS interop, so that may be helpful to get started.
Alternatively, in case you find an alternative implementation in C# on NuGet, you can install it for the supported platforms and use it in your code as well. To write platform-specific code, you can use #if conditionals like #if __WASM__ etc. - for full information see this documentation page.

WinRt C# Audio Library

I am looking to develop an app in C# WinRt, but was wondering what libraries are available for playback and for complicated manipulation. I am looking for a free library that allows for an extensive list of audio formats to be played (for example mp3, wma, wav, ogg, etc.) and also to be analyzed. Thats pretty much the basic functionality I would need. But if I could get picky, a library that can convert audio files between the formats would be handy. Doing a google search I came across the Naudio library, but it was not so greatly compatible with WinRt.Thanks for any tips or advice on this.
The current alpha build of NAudio 1.7 (available via NuGet) does contain a Windows RT assembly and the source code includes a simple demo of playback and recording as a Windows Store app. Since it uses Media Foundation, you'll be able to play most of the file types you suggested (although ogg won't be supported out of the box), and you can construct your audio pipeline to access the audio as floating point samples for analysis.
Things that aren't currently supported are using the Media Foundation encoders to encode, and the various reader/writer classes need to be re-written to use the WinRT asynchronous streams and File I/O APIs instead of the regular .NET ones. Hopefully these features will be added to the library soon.

Extracting and splitting a MP3 audio stream from an AVI file

I want to develop a desktop application by programming in C# and using the .Net framework 4.
The goal of my application is to extract a MP3 audio stream from a supplied AVI file.
I have learned from the Internet that an AVI file is a container and it might contain different audio streams.
If the supplied AVI file contains one MP3 audio stream at least then I want to extract it and split it.
I want to split the MP3 audio stream into MP3 audio parts identified with a start time and an end time.
I have looked on the Internet for any .Net library I could use but without success.
Does someone know what documented .Net library would be useful ?
Maybe you can try this:
Simple C# Wrapper for the AviFile Library
It is targeted at AVI video but there might be some clues as how to use the same methods to extract the audio only.
Either use it as-is or use the example to incorporate what you need into your own code.
Since tools for this task already exist, I see no point in creating another one unless you're curious about how to do this yourself and learn something new.
If so, using a ready-made library would defeat the entire idea of learning something which is why I strongly recommend you try implementing the splitter yourself.
You can find descriptions of the AVI file format online, that should get you started.

.Net sdk for video editing like Windows Movie Marker

i am currently working on .net application which contains one audio & video file.
audio file is split as in to small section as per database entries. then we have to merge this files on video file at specific positions.we what something like windows movie maker
it will be nice if someone suggest some .net based sdk for this.
You can use ffmpeg for this purpose. But you will need a .net wrapper to make it usable in C#.
You can use ffmpeg-sharp or SolidFFMpeg. its a a wrapper library over the FFmpeg multimedia suite that provides easy to use wrappers for use in C#.
Datastead Software's TVideoGrabber Video SDK has this feature.
"join several video clips and/or audio clips into a single one, in full or by specifying respective start times and end times"
http://www.datastead.com/products/tvideograbber/features.html
The engine behind Windows Movie Maker is DirectShow Editing Services. You can use it via DirectShow.NET.

Is there a .NET library to Normalize PCM WAV

I want to normalize PCM WAV files from client side(Silverlight). I am using ASP.NET MVC on the server side. And I found a C program here
https://neon1.net/prog/normalizer.html
Does anyone know that if there are similar C# libraries that I can use directly?
"Normalizing" audio files is generally not a great idea, since if there is just one sample at full volume, then it will have no effect. A better approach would be to run a dynamic range compressor on the audio.
In Skype Voice Changer I have written sample code that uses NAudio and passes audio through dynamic range compressors. However, as others have said, NAudio isn't directly usable in Silverlight due to interop. But you should be able to copy WaveFileReader, WaveFormat and WaveFileWriter out and compile them without needing to make too many code changes. Also, you won't be able to use the WaveBuffer mechanism for casting between arrays of bytes and shorts/floats, so you need to do the conversion the slow way (e.g. using BitConverter).
Some ideas (aside of trying NAudio or Bass.NET)
Call the compiled c executable
Compile it as a dll and use P/Invoke
Convert the C code to c#

Categories

Resources