I ask google about this,but didn't find anything usefull.
Is there a way to creat web app in flex that will convert video to flv,after that video is uploaded to the server?Can this be done with flex,if can,do I still need to install ffmpeg on server?
Tnx for response.
You should convert server side anyway. This will allow you to validate the upload.
I agree with the other post that you probably should perform the conversion server side. Since you don't have a great grasp of the difference between container formats and video formats yet, creating custom client side code might get difficult since you're going to have to get a little closer to the metal.
Given that, there are some people who are doing conversion on the fly client side for certain video formats to FLV within the flash client. MKVLoader is a pretty nifty project where they use the new appendBytes(bytes) method that is now available as of Flash 10.1 on the NetStream object to convert MKV to FLV in the client. This is a really cool trick, but you'll run into problems as soon as you want to support another format.
ffmpeg supports so many formats, it would be silly not to use it. Since you mention that the video will get to your server anyway, you might as well convert it on the server before storing it.
Related
I have a website that displays videos. It seems to work OK with 5 minute "webm" and "mp4" videos that are referenced by the HTML5 video tag. But if I ever use long videos, I'm worried that the website would be overwhelmed. The website uses ASP.net, and I did find an article on the topic of progressive download of large files with asp.net. However, I don't know if getting small packets of files interferes with the user doing a "seek" (e.g. dragging the control bar position to a point he is interested in, for instance). I also don't know if it would stream pages that don't need to be streamed.
Is there any way to solve the problem of too much video data being sent over the internet at once, and overwhelming either my server or the user's PC?
This should help you: Streaming MP4 video through .NET HTML5
Seeking and buffering is handled by the player itself, and yes when you seek to a new point in the video it will automatically just request those parts of the video.
There isn't a way to do adaptive streaming of HTML5 videos, but you shouldn't have to worry about seeking in long videos. Modern web servers allow browsers to request chunks of a file, so if a user is watching a very long video and skips right to the middle, the browser will stop downloading from the beginning and start retrieving the video file from the spot they skipped to. Contrast this with the early days of Flash video, when you have to wait for the whole beginning of a video file to download in sequence to get to the middle part you want to watch.
There are, however, a few things you can do to conserve bandwidth and keep your server happy.
First, if a user has started watching a video and is done with it, you can make sure the browser doesn't continue to download the rest of that large file. For example, this may happen if you're switching through multiple videos on a single page or if you're using a framework like Ember.js or Backbone to navigate through multiple "pages" without actually point your browser to a new URL.
If you pause a video and remove it from the DOM, the browser might still be downloading it. But you can stop that with code like this:
video.src = "";
video.load();
Also, consider storing your video files on a CDN. That way, the server that's running your ASP scripts, communicating with your database and handling other related logic is not also responsible for serving up those large files. There are other benefits as well, like having separate and more efficient headers and having servers in multiple locations that are geographically closer to your users.
HTML5 introduces the MediaStream API, which is meant to capture and stream video and audio data, primarily intented to get access to local media devices, e.g. a webcam. But using the MediaStream object concatenated with XHR you should be able to provide video streaming without further plugins. The browser support is not widspread right now and in not-up-to-date versions of Firefox and Chromium, you have to enable it via some sort of setting (e.g. about:flags in Chromium).
I don't know of any working implementation for streaming video from a server, I just played around with webcam data recently. I think that it is possible (somewhen even with broad browser support ;-). Be aware that HTML5 consists of many different API's most of which you would normally use via JS.
See also: http://www.html5rocks.com/en/tutorials/webrtc/basics/?redirect_from_locale=de#toc-mediastream
I'm writing a web app in Scala using the Play framework. I'd like to be able to push some binary data to my web server from another machine I'm using to do number crunching. I'd like to do this over http. Can anyone suggest the best way to do each side? Ideas that have occurred to me so far are:
Send the data up as a file upload via the usual play form processing. Nice on the (web) server side, but I'm not sure what libraries to use for pushing the data up from the (number crunching) client. In C/C++ I'd consider using Curl.
Send the data up as raw POST with the binary attached and encoded appropriately. Not sure how to do either side.
I've done each of the above on several occasions in Python and C++ (although not recently enough to remember how!), but am not a web dev (but a more general sw engineer) and have only ever had control of one side before - so have no idea what the best way to do this is.
Any thoughts appreciated.
Alex
It depends what platform (and language) you're already using for the number-crunching client part. If that 'client' is also using the Play framework (or at least has access to the libraries), then there are some very helpful tools for accessing web services; (see here also).
I have been searching and cannot find a solution yet.
I want to also add cuepoints to a live recording video as it is incoming.
I have a live feed incoming from a VideoDisplay object in my Flex Air app, and I would like to be able to record the video/audio of this and save it to disk and/or upload to server.
Is this possible? If so, would it be possible to add CuePoints to the video as it is being streamed live? Right now I am just trying to record a live stream from my VideoDisplay.
Any help is appreciated...
Thanks
-K
You should check out this cool utility class that can encode FLV directly to disk from an Air application. I think it does sound as well. I'm not sure if it does CuePoints, but it's open source so you could always just add that functionality in :)
Have a look at the responses to this post. There are some solutions to try out. You will need a streaming server like Red5 or something else.
I will try and look for the code that adds cue points on the fly, have it somewhere.
How do I record video to a local disk in AIR?
Also look at this post, which answers some of your questions:
http://www.zeropointnine.com/blog/updated-flv-encoder-alchem/
I'm trying to (HTTP) upload a binary file programmatically from within VBA. I intend to put an ASPX page on the server to accept the file and certain additional parameters.
I know there are lots of nice ways to do that (e.g. use web service instead of aspx), but my constraint is that it must run in VBA (in an excel file), and that I cannot install any additional components on the client.
So I guess I'll use WinHTTP, and I've found several examples to post form data, but not to post a binary file. I probably need to base64 the file contents?
So my questions are:
Do I need to do the encoding manually or can I make WinHTTP do that?
Is there a better utility to use than WinHTTP? (Remember I don't want to install any additional software, it must be shipped with WinXP Pro, Office 2007 or a .NET framework, e.g.)
Is there a better way to go, e.g. using ASP.NET web services?
Thx, chiccodoro
You may use base64 but typically writing binary is easier.
The hurdle you have to leap is constructing a valid multi-par/form POST. This is completely possible using WinHTTP, although I have not done it in years and am not tooled to provide sample code, it is not trivial.
You can reference the following articles for examples of how to do this with C# HttpWebRequest. The WinHTTP api is a bit different of course but the salient points to take away from the articles is the structure of the POST body.
C# File Upload with form fields, cookies and headers (by yours truly)
UploadFileEx: C#'s WebClient.UploadFile with more functionality (a bit more procedural and may be easier to suss out the format)
Typically I provide sample code, but as I said, I do not have any stone-age tools set up right now ;-).
HTH
I am wondering if there is any codes sample for ASP.NET with Voice recording.
Ok, Basically, i want to create a web page that allow user to click a record button and record his voice thru his/her microphone and then convert it into mp3 file, then i want to click PLAY button to play what was recorded.
I have searched google alot and cannot find any codes that code do just that.
I have seen site that can do just that and it is using FLASH with RoR (i think).
Is there any way to record voice using ASP.NET?
I dont care if it need to combine with FLASH with ASP.NET, as long as it is possible.
Thanks.
EDIT:
Stephen M. Redd,
Appreciate your input. Yes, i know there is no simple way to accomplish what i am asking for. I also have researched and google alot on this question. Yes,I have come to know the best way to do this is through using FLASH with either FMS or RED5 (open source).
So i am trying to figure out how to write a simple FLASH (.swf) that i can record voice and then save into mp3 format to RED5 server.
Do you know or can you provide any directions to what i am asking above?
1) Tutorial on Microphone class in FLASH (i am reading some basic implementation from a book called "FLASH Actionscript in a classroom", which doesnt tell me how to record voice but ONLY how to use microphone object in FLASH)
2) Tutorial on how to setup and use RED5 (FMS is NOT an option due to its cost)
3) how to integrate 1) and 2) with asp.net and javascript (if there is any flashvars that the FLASH microphon .swf i can access so that ASP.NET can be used with javascript)
Thanks.
EDIT 2:
I cant consider to accept an answer BECAUSE none of them has provided a good answer.
Take a look on my question and read the comments i got, and you will see that my question was NOT being provided a good answer.
My question is to find a web-based Audio/Voice recorder so that the users can record their voice on the site.
To better convey what i exactly asked for, take a look at www.snapvine.com or www.pubclip.com . Both of them provide a way for users to record their voice right on the webpage.
So, i am looking for a FLASH component (.swf) similar to what they offer to integrate with my site.
EDIT 3:
This voice/microphone recording thing seem to be a challenging project for most developers.
I guess this means i am all alone.
I think this is something that would have to be done with Flash.
This guy appears to have some examples of doing voice recording in Flash, with code samples:
http://fms.denniehoopingarner.com/
There is no simple way to do this kind of thing. Standard web technologies based on HTTP and HTML just don't have the features. HTTP doesn't work well with moving audio data, and HTML and Javascript are not able to talk directly to the hosting OS or hardware resources like the microphone.
There are 3rd party browser plug-ins and applets that you may be able to use via a web application to do this kind of thing.
Most people use Flash and the Flash Media Server to do audio input via the web.
There are also some Java applets that have similar capabilities such as the ListenUp SDK (I have not used this, so it isn't an endorsement).
There is a lot of discussion on this topic related to Microsoft Silverlight, but as I understand it voice and camera inputs from the client side are not supported as of Silverlight 2, though it may get put into Silverlight 3. There is a good bit of information about how to use the necessary Flash bits within a Silverlight application though. For more info on that, check out this post.
ASP.net is a Server-Side Technology, but voice recording is done Client side. So regardless if you use ASP.net, PHP, Ruby on Rails or Cobol, you can't do it directly.
What you need is a Client-Side Application that works together with the Server Side to accomplish this. I do not know if Silverlight can do Microphone recording, but Flash can. This is apparently quite easy using the Flash Media Interactive Server, but normally you should be able to do this without, i.e. just by having a Flash Application doing the recording and then Uploading it to the server.
Hi Sam in Silverlight 4 it is possible to record voice from microphone and webcams.
Just follow the blog.
http://blog.ondrejsv.com/post/Audio-recorder-Silverlight-4-sample.aspx
Good Luck