Plugin to play video content from my blog/website. - c#

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

Related

Sharing for Facebook in Unity Example

I was checking for some tutorials how to implement Share button for Unity games. I want to share my game with custom picture, text and link together with my description over the share automatically.
I found this link: https://developers.facebook.com/docs/games/services/sharing
but I am not sure if this thing even works anymore. I found somewhere that I have to create custom HTML file with all og metadata inside in order to work this through. I tried that too, but when I press share button, Facebook automatically scrapes data from my website and not custom HTML file. In Unity I have initialized everything correctly, so there should not be problem in initialization, I guess something is either wrong in my code or in Facebook side.
Can someone share simle example how can I make HTML file connected to my unity game in order to correctly share custom data (Title, description, image....) like on link: https://developers.facebook.com/docs/games/services/sharing
Kindly appreciate it.
Best regards

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!

How to get video id using youtube .net api

I'm trying to find a way to give my application a YouTube URL (as copied from the address bar in a browser) and extract the unique video ID from that URL. I want to stay away from regex or any other string manipulation as a solution since not all YouTube URLs are the same and may continue to change.
There has to be some way to use the YouTube API for .NET (specifically C# for my solution) to simply call a method/function, pass the method the URL for the video, and finally the method would return the video ID as a string.
I've been trying to find documentation on this and so far I can only find info on using methods to retrieve data about a video based on already having and providing the video ID - which I do not have at this point.
I recognize which part of the YouTube URLs identify the video, but the users of my application should not have to be concerned with that.
It would be greatly appreciated if anybody could help me find a solution here.
Thanks!
Unfortunately I do not think this will work. But then again, I don´t understand the problem you have with using the URL. The URL in itself is a kind of an ID and the v property of the URL specifies which video it is. It seems you already know this.
Regarding your problems with using an URL:
Not all YouTube URLs are the same
R: No, but it doesn´t matter because using RegEx you would only read the v property (v=-l6P7VFKnW8), alternatively the short be variant
YouTube URLs may continue to change
R: Yes, they may. However it is unlikely that YouTube would change the identifier anytime soon because of the effects it would have on API's and other infrastructure. Besides, if you have a pure and modular generic solution you wouldn´t have to change more than one RegEx to comply with the new Id.
Related: Youtube .NET Data API: Retrieve only videoID?
Related: C# regex to get video id from youtube and vimeo by url

Streaming audio file to another computer

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

Getting an FLV from YouTube in .NET

I'm writting FLV media player and want to know if there is there anyway of accessing the underlying FLV files used by YouTube from a URL? There used to be a bunch of ways of doing it, but YouTube have changed things about and I now can't find any way of doing it...
From what I've seen so far, the YouTube API doesn't seem to give access either. Has anyone found a way of doing it?
Cheers!
There are two values associated with a YouTube video: an ID and a signature. The ID is simple to get, as it's in the URI itself. The signature is a bit trickier to get. It's embedded in a Javascript statement in the source code of each video page.
For example, let's take the Numa Numa video.
It has an ID of KmtzQCSh6xk, as can be seen from the URI.
To get the signature, we have to dig into the source code of the HTML. To easily do this in Firefox, load the source of the page by right clicking anywhere on the page and click "View Page Source." After that, press Ctrl+F, and type in "t":. It will take you to the signature of the page: the value directly after that in quotes is the signature.
In the case of the Numa Numa Dance, it's signature is vjVQa1PpcFOSvCcjdAYSc3ZQgK-6EG9yQM7RLSYqJk4%3D
To get the actual FLV, you enter this URI:
http://www.youtube.com/get_video?fmt=5&video_id={ID}&t={SIGNATURE}
The complete URI to get the FLV video is:
http://www.youtube.com/get_video?fmt=5&video_id=KmtzQCSh6xk&t=vjVQa1PpcFOSvCcjdAYSc3ZQgK-6EG9yQM7RLSYqJk4%3D
You can use this information to help you get the signature and ID you need to download the FLV programatically. Whether it's doing a simple String.Find for the value "t": or using RegEx, it should be simple to find until they change it.

Categories