Streaming audio file to another computer - c#

This is what I am trying to do. We are 5 people in a room. Everybody has a PC. Each PC has mp3 files but only one of the PCs has speakers (ex. called Speakers-PC). So, instead of asking the person on Speakers-PC to play you a song you want, I was thinking of an application that can take an audio file from a No-Speakers-PC and send it to the Speakers-PC. The Speakers-PC can then play the audio file. Of course, if multiple files are sent, the application on Speakers-PC will have a queue.
So, is it worth digging or it will be just better if we buy wireless speakers and rotate the transmitter (instead we are now rotating the speakers) :)
Any ideas on how to implement something like this? I am familiar mostly with .NET technologies.
Any broad or specific help would be greatly appreciated.
Best Regards,
Kiril

Many media players come with web interfaces already. One of the winamp ones, for example, is http://www.winamp.com/plugins/details/92511

VLC is the swiss army knife of media streaming, take a peek at the extensive feature set :)

I quick thought.
I assume the "speakers-PC" use winamp. If so then create some playlist file and load it with winamp. Also everyone of you should share your folders containing mp3 files so that "speakers-PC" could have access to them. From this point you have two options:
1. Everyone who wants to add his own song to a playlist opens it in any text editor and adds a new line at the bottom of the file.
2. You could create a simple web app to manage this same playlist file. You know .NET, rignt?
I haven't checked if winamp locks playlist file it currently plays. If it does then this idea is not worth a penny.
Here is basic structure of playlis file discussed.
http://forums.winamp.com/showthread.php?threadid=65772
I'm sure you can find in google
Good luck

Related

How do I create a live video recording program on Visual Studio using c#?

I am currently doing a project for school and desperately in need of help.
The main gist of the project:
I am using 3 Bosch Dinion IP Cameras to film students during a lecture. I have to create a program on Visual Studio that enables the lecturer to view all 3 cameras on one screen, able to record all 3 footages and then save them in a database afterwards.
The thing about Bosch is that there is very limited material for me to refer to online.
I have already referred to SDKs from Bosch and Ozeki but I can't seem to figure out the codes. I sought help from a few people and they told me to use Onvif (I am unsure how to use it).
I would greatly appreciate all of the help I could get, and if possible explained in simple terms. Thank you so much!
You can view and record the Bosch Dinion camera with the TVideoGrabber SDK and this sample code:
VideoGrabber1.VideoSource = vs_IPCamera
VideoGrabber1.IPCameraURL = "rtsp://admin:password#192.168.1.34/rtsp_tunnel?h26x=4&line=1&inst=1"
VideoGrabber1.RecordingMethod = rm_MP4
VideoGrabber1.RecordingFileName = "c:\folder\filename.mp4"
VideoGrabber1.StartRecording()
ONVIF (Open Network Video Interface Forum) is a global and open industry forum with the goal of facilitating the development and use of a global open standard for the interface of physical IP-based security products – or, in other words, to create a standard for how IP products within video surveillance and other physical security areas can communicate with each other. ONVIF is an organization started in 2008 by Axis Communications, Bosch Security Systems and Sony.
Thanks wikipedia^
At first, you should try to establish a connection to your camera using the OnvifDeviceManager (disponible at this link)
The OnvifDeviceManager is a tool made to test if your camera is ONVIF conformant.
If you're able to get a video feed/ptz control of your camera, it means it shouldn't be that hard to make an app for your needs.
There's two part to the app you want to make:
1) Communicating to the camera.
2) Showing/recording the video stream
In part 1 you want to be able to send request to your camera and get responses from it. You could use this example to make your first ONVIF request to one of your camera... You'll then want to get the stream URL with a request you'll make
In part 2 you want to take the streaming link you'll get from your request and show it somewhere with some tools... I personally used VLC.DOTNET to add a vlcControl to my C# form and show the stream of my camera. There's help to do so on this link.
Good luck, have fun developing your app!

Unity3D Android file browser

does anyone know how would I create a file browser in Unity for an android OS? I don't actually know where to even start, even after I did a lot of search on it.
What I want, is for the user to be able to go through his folders on the phone or the SD card and he should be able to choose a text file, I would then save the text from the file into a string in my app and continue from there.
Thank you!
The file navigation is as simple as using the .net 2.0 file browsing functions.
http://msdn.microsoft.com/en-us/library/system.io%28v=vs.80%29.aspx
However you will have a lot of headaches trying to get Unity to play ball with Android's Intent broadcasters/receivers and will require a lot of fiddling with Java to launch the other Activity.
http://developer.android.com/training/basics/firstapp/starting-activity.html
You might want to look into this: http://wiki.unity3d.com/index.php/ImprovedFileBrowser and its relevant forum post. You might need to modify the script to work on Android, but it should be a good start.

how to implement video webcast on the website?

we have a video file which we have to "webcast" on the website (ASP.NET MVC 4 C#) to about 1000 users. I have absolutely no idea how to do this. I'm looking for answers to the following questions:
How webcasts are implemented in general? what are keywords I should be googling for?
How to synchronize video streams sent to different users?
How much computing power do I need for 1000 users? Need a rough answer of course. One server, or tens of servers.
any links, blog articles etc would be appreciated.
Thank you.
In general webcasts are implemented where there is a client software that sends tcp packets of stream data to server and server represents those packets as moving pictures.
In theory they already should be synchronized since you don't send the full video, you only send the current packets that are then buffered and represented as moving pictures. There will always be inconstancy in milliseconds because you cannot control every users ping to server.
It all depends on quality of your video as well as your webserver. No one will give you straight answer, you should always profile your applications on your own and see what bests fits your needs.
Since you are using C# MVC it is coupled with IIS, and IIS has something they call IIS Media Services that does exactly what you need. Definitely check it out.
Also you should check out c# live streadming in google, I found very interesting approach right here.
Well, as a streaming media person, here are my suggestions.
You could do a "live" webcast or an on-demand webcast depending on your choice. Live means, if you have a video file, you could broadcast it to multiple users at once and all will see it as if watching in a TV. They cannot pause your video. Normally, only live events are being broadcasted like this, unless you have a specific reason to broadcast an existing video file as a "fake" live broadcast.
You could use Windows Media Server (Add the media role in Windows Server 2003/2008/2012). Configuring and starting a windows media server needs intermediate level of familiarity with the streaming process, server, firewalls, exceptions. You have a lot of configurations which you can manage in this way, and generally suggested if you are very serious about your streaming. RTSP saves a lot of bandwidth for you too.
You could use Flash Media Server/Wowza media Server, Real Streaming Server also inplace of Windows media server.
For limited number of users, you can download the free Windows media Encoder, and select your file to be streamed, and click to stream easily. This is the easiest.
You could use managed streaming services from few thirdparties, like Livestream, Brightcove etc to stream video files.. Once you signup with them, the will give you an FTP/web space to upload your files, and they provide a link to the file (streaming media link). This link, you could embed in any popular player (like JWPlayer or any of that kind), and embed your player in your webpage for your users to start seeing the media. This is the most easy way to set it up. Maybe you can even get a 15 day trial services from brightcove or Mogolous.
Hope this answers your question.

SilverLight: How to record a video from a web camera

I have searched how to use SILVERLIGHT to record video for days but got no luck.
Most articles related to SL only talk about how to record audio or snap a picture rather than recording a video file and save it somewhere.
And I found there is no resources about it on Internet(I am surprised!!!)!
So could you provide me an example code with proper explanation?
I am waiting for it.
PS: I do not want to use Flesh as none iPhone nor iPAD supports it.
Thanks
Fortunately, Mike Taulty's source code can easily be updated to work with Silverlight 5. You can download the fixed source code and try it out (Disclaimer: all code courtesy to Mike Taulty, I merely fixed SL5 compatability and ran a cleanup). Use your favorite diff tool to see the changes I made.
I have tested it, and it generates video files that can be viewed in VLC media player (after selecting build index to fix the corrupted index). As the file format is not 100% correct, the files can not be opened in Windows Media Player etc... but I'm sure that can be fixed.
You should, however, be aware of the fact that Silverlight is not supported on iPhone, iPad, Android, and Windows Phone (Windows Phone apps are made on a special version of Silverlight, but can not run Silverlight applications in the browser).
Unfortunately, after undergoing hundreds of hours researching on the possible solution, I finally found the answer in a book called: Pro Silverlight 4 in C# (Matthew MacDonale, APress).
According what is said on the page 436, although you can do it with Silverlight 4 (you have to write your own file header helper, store the row data as byte arrays and later on you have to convert them into a raw video data and what is worse is the audio and video are separated.), it is just not practical and worthy to do it. Because it requires reams of complex, handwritten code to convert it, and the conversion process is computationally expensive, which makes it extremely difficult to do in real time.
So I guess this would be the conclusion of my question. Now what seems still make sense for me is to find out why Microsoft doesn't support it and what is the new technology which is going to be used/ has been used to replace the SL.
Is it HTML5? But as far as I know, there is only a video tag in HTML which can only be used as a video player, but no tag to support to get the access of a web camera and save the captured video+audio at the same time as one file onto somewhere which could be a local hard drive or a network storage.
I hope all dear you could come up with some thoughtful advice.
I am going to leave this question un-answered for a few days to see whether there could be someone who can come up with some fantastic solution.
Thanks again.

Plugin to play video content from my blog/website.

I wish to play video content (in a container) from my website/ blog when the page is loaded. This would be similar to that of YouTube, Dailymotion etc...
I would like to have the actual URL in the container which would then play the video at the location of the URL. The basic idea is to hide the actual URL from the user and make the person to view the video from the current page.
Could someone suggest some feasible ideas to accomplish this?
Thanks,
Vijay
A quick Google search turned up:
JW Player
There are other FLV players out there (this one also claims to handle MP4), and that's only one possible format. Any more detailed answer would require answering what format you want to serve up, whether you want streaming capabilities, etc.
What I've seen a lot of sites do (NBC Video Player for example), is the following:
Create a VideoPlayer.swf which has the video player functionality.
Pass in a cryptic key to the VideoPlayer.swf via swfobject and flashParams
VideoPlayer.swf sends that key to the server.
Server sends back video data somehow to VideoPlayer.swf and it does its thing.
If you go to this NBC Office episode at http://www.nbc.com/The_Office/video/episodes/#vid=1200746, and look at the source, you won't find that 1200746 value anywhere, so maybe it's not in flashParams. Looks like they store that in an init.xml file via <videoID> 1200746</videoID>, and they probably use SWFAddress to map that #vid=1200746 anchor to that xml file in VideoPlayer.swf, send it to their secure server, and return the video and ads they want.
Hope that helps,
Lance

Categories