Using Bass.Net to stream audio from RTSP on C# - c#

I have a video server streaming MPEG-4(video/audio)
I need to get the audio from the MPEG-4...is it possible to get only the audio???
I would like to have some tutorials, samples, examples or something useful to start
programming my application.
I found this : Bass.Net to stream audio, but I don't know if it supports RTSP, and I would like to know if someone has any tutorial or something useful.

You can get the individual packets using my library and do something with them.
You can also aggregate the source using my library.
The library is # http://net7mma.codeplex.com/
There is an article # CodeProject http://www.codeproject.com/Articles/507218/Managed-Media-Aggregation-using-Rtsp-and-Rtp which explains how it works.
If you need anything else let me know!

Related

Capture Sound in C# using .Net Own libraries nothing else

I'm trying to capture Microphone sound using C#, and i have searched Google for this thing and all what i am getting is non .Net Libraries , i only get open source ones Like NAudio and other like DirectX and DirectX.DirectSound which are for managed languages like C# but that is not what I'm looking for. and i have tried them both and i used this open source project as a reference in NAudio
http://voicerecorder.codeplex.com/
and i manged to capture sound and then output it on a speaker or a headphone but i am still having problems when saving the Wav file
but i was wondering is there any .Net Built in libraries that can help me with my objective ?
Thanks for your help in advance :)
i was wondering is there any .Net Built in libraries that can help me
with my objective ?
Short answer: No, at least not at the present time.
The .NET framework does not provide any direct support for recording audio. This is the reason libraries like nAudio exist. You would neeed to use Com Interop and the Windows API to acheive this, and it would be no small task. Even the Coding4Fun article on recording sounds at Microsoft's Channel 19 website uses NAudio. Your best bet would be to follow their example.

How can I play H.264 RTSP video in Windows 8 Metro C# XAML app?

I have a device that provides an H.264 video stream from a URL like:
rtsp://192.168.0.10:554/videoservice
Since this is live video I don't need to be able to control it (pause, rewind, etc), just play. Is this supported by MediaElement or another standard class, do I need something like Smooth Streaming Client SDK or is this a lot more complicated than I thought?
Update:
I downloaded Microsoft's Player Framework but this doesn't play the stream either. I can't find anything in the examples about RTSP.
Update:
I used Wireshark to compare the packets that VLC Media Player (which works) sends with MediaElement and Player Framework and neither of them seemed to use RTSP protocol. Instead they're sending WPAD packets to a different address, even though I've provided the IP address of the source. Why is this necessary? Is there any way of turning this behaviour off?
See the post here. You need to wrap your data in MPEG-4 Part 14 containers and then pass them into MediaElement.SetSource. It appears you can't do this just using the documented API. Here is the important information from the link:
We don't support RTP but rather the MPEG-4 Part 14 container format.
You will need to write our own source to be able to parse the data a
pass it directly to the Microsoft decoder. At this time we do not have
any samples on how to write a custom source and have it loaded from
your Metro style app. Unfortunately it is not possible to simply use
the documentation to figure out how to do this. I have been talking
with Stan and we are trying to figure out how and when we can make
this information available. As soon as this information is available
I will announce it on my blog http://blogs.msdn.com/mediasdkstuff/.
Here is a list of supported video formats.
There is also an example here of how to extend the media class which might have an example of how to do something similar to what you are asking.
There is a similar example here.

Stream audio over network in MP3

My question is simple,
I would like to do this :
http://www.codeproject.com/Articles/19854/Sending-and-playing-microphone-audio-over-network
But with another codec , in MP3.
Its possible with a free SDK/tools ... ?
Thanks
I would probably use the NAudio library and send the buffer with sockets (which should be easy since they're both a byte array).
I can't expend too much because NAudio and sockets are 2 complete subjects.
But I can provide links:
NAudio
Any information you'd probably need + download can be found here
The videos in this user is a nice series that explains NAudio
Sockets - pretty hard subject for me so I'll give more links
http://msdn.microsoft.com/en-us/library/system.net.sockets.socket.aspxhttp://www.codeguru.com/csharp/csharp/cs_misc/sampleprograms/article.php/c7695/Asynchronous-Socket-Programming-in-C-Part-I.htm
http://www.csharp-examples.net/socket-send-receive/
http://www.codeproject.com/Articles/5252/Sockets-in-C
http://www.developerfusion.com/article/3918/socket-programming-in-c-part-1/
http://www.codeguru.com/csharp/csharp/cs_misc/sampleprograms/article.php/c7695/Asynchronous-Socket-Programming-in-C-Part-I.htm
http://csharp.net-informations.com/communications/csharp-socket-programming.htm
Don't forget to use Google!
Once you have basic understanding read my first sentence (with the buffer) and it will be clear.
P.S. NAudio might need another .dll to handle mp3, not sure, but it shouldn't be hard to find.
VLC Media Player can stream in a variety of different formats, including Icecast. I have not used them myself, but it looks like a nice starting point.

C# audio library (with simple effects, echos, reverb...)

could you please me advise some simple, free, library for modify input wav file? I found and try to play with irrKlang, but it misses customizing effect (it doesn't have any level of customization. You can just use effect distortion, but you cannot anything to set)
If there was something similar library, that's would be great. Thanks. for any advice.
There are good C# Audio Libraries for Wav like Bass Audio Library or NAudio :
Bass Audio Library Link
NAudio
Check their website to see if you find whatever you want there.

Getting microphone data (probably for c#)

i know there are many topics like mine, but i would realy love if somebody could explain me the theory behind the code.... what is the format of data you get from microphone?? Do same sounds return the same data from microphone or do you realy have to go through fft process if you want to compare sound samples.... Where can you save microphone data and analize it in live stream?
have a look at the open source .NET Voice Recorder project which uses NAudio. There is an article on Coding4Fun explaining how it works.

Categories