how can i play a video file in asp.net in c#? - c#

I want to play a video file without any installed plugin for example. File extensions include .mov, .flv, .avi, or another. How can i play a video file but i won't user must be to install flash player and how can i play mp3 file in Asp.net in C#? I installed visual studio 2010 ultimate.

You have two options:
HTML5 video
<video src="movie.avi" controls>
<!-- The msg if browser doesn't have HTML5 video support -->
</video>
<object> for Windows Media player/QuickTime etc.
The first option will let you embed nicely the video, but will limit the user base(less than a half of browsers have HTML 5 support). Second option force the user to download the app.

This is what you want : Play video in asp.net using C#

Related

Playing audio file from directory in ASP.NET

I have Gridview when i click play it will play audio file it will get directory from database and play the audio by opening windows media player it working fine in visual studio i am using System.Diagnostics.Process in my code.I hosted application in IIS where OS is Windows 7 when i try to play its not opening windows media player and not playing audio file.
I had seen suggestions in Internet where i need to give permission to IIS admin Service to interact with desktop applications but i hadn't seen any IIS admin Service in Services.msc.
Any one can suggest me
Instead of calling a desktop application, you can use javascript or the HTML audio tag.
There's a js library called Howler (https://github.com/goldfire/howler.js/), it makes easier to play audio from the browser.
In your gridview, you can have a column that has a button to play the audio, this button has an attribute that contains the audio path
Something like this:
<button data-audiosrc="pathtoaudio.mp3">Play audio</button>
Then you use this tag to call the howler to play the audio.
This is one approach.
Another one is to publish these files to an IIS web application and you can call it by the browser http://AudioIISApp/youraudio.mp3 (for example), will open another tab, so the user can listen or download.
This second is more easy and faster to implement!

Orchard CMS 1.4 Cant upload .avi, .mp4, .flv using Orchard Media

I am creating module for video management. I researched everythingand know how to do that, but coped with strange problem. I will use standard Media Capabilities of orchard. I mean i click Media -> Add Media and choose file to upload to server. When i choose .wmv(and other not video formats) all works fine, but then i tried to upload .avi, .mp4, .flv it gives me - Error 101 (net::ERR_CONNECTION_RESET): The connection was reset. I have tried in different machines and different window(windows 7 and winows 8), in defferent browsers(firefox and chrome), but the same problem.
Please help.
Regards,
Dima.
Please raise the IIS size limit setting: http://msdn.microsoft.com/en-us/library/ms689462(v=VS.90).aspx

What format should I convert my home video to for web and mobile?

I have a c# mvc4 twitter bootstap appharbor web site. Currently I use Vimeo but I want to do it myself. I want to convert to an html5 & mobile friendly format and need to know the best format to use and what I can use to convert to from a straight home filmed DVD
There is actually no single "best" format. You will need to use different formats depending on the devices / browsers you intend to support.
From Zencoder - How Many Formats Do I Need For HTML4 Video:
Minimally, you must use MP4 + H.264, with AAC or MP3. MP4 video plays natively in Safari, Chrome, and IE9 (Vista/Windows 7). It is also your best option for a Flash video fallback, and plays natively on many devices (iOS, Android, Blackberry, PSP, Xbox, PS3, etc.). Use H.264 High Profile for the best quality, or Baseline profile if you want the same video to be playable on mobile devices.
Beyond that, use either WebM + VP8 or Ogg + Theora with Vorbis audio for other browsers. WebM works in Firefox (4+), Chrome (6+ or Chromium), and Opera (10.60+), and Ogg works in Firefox (3.5+), Chrome (3+), and Opera (10.54+).

Embedding Flash Movie in WPF Application

I would like to embed a Flash Movie in WPF Applicaion. preferably via the activeX control that is also used in internet explorer.
additionally i want to get and send parameters to this flash movie.
i am using VC# express.
i used 'AxShockwaveFlashObjects' library to play flash(.swf) files

How to integrate Adobe Flash Media Server into Asp.Net application to record audio?

I would like to try to create an Asp.Net C# application to record audio online using Adobe Flash Media Server. Could you please tell if it is doable, and suggest what I could start with?
Thanks.
There are some options to you:
Microphone access in Silverlight via Flash and JavaScript
Accessing Web Camera and Microphone
Audio recorder Silverlight 4 sample
Sorry, that this is not a Adobe Flash Media Server, but I hope it will be helpful for doing what you want.

Categories

Resources