whats is the best way of dealing with php audio and webcam? - php

is thier a guideline of how i can deal with playing around with audios and recording webcams, and what file formats i should use for optimisation, and plus any poplaur modules, plugins and classes that i can use to prevent re-inventing the wheel. im really looking at using this kind of stuff for user generated content. basically im looking for good advice, on how i should deal with kind of stuff? thanks :)) sorry for the broad question?

Take a look at red5. It's a flash streaming server which can record and play back webcam streams. There are also commercial alternatives such as Wowza Media Server and Adobe Flash Media Server. All of these are flash based though. I don't know of any HTML5 based approaches.

Related

Convert higher bitrate mp3 files to lower bitrate in PHP

I developed a system that contains many MP3 files that users can listen to them online/stream, since most of my users are Iranians and Iran internet speed is sucks, I came up with an idea, but I can’t find the right/best way to do that.
I have alots of different berates: 128kps, 192kps, 320kps, etc… I would like to know what’s the best way to remotely convert these files to 32/64kps qualitie, and of course, temporarily.
I mean, after the new file 32kbps generated. After period of time the generated file automatically delete.
I did lots of search before I ask this question, but none of the results answered my question.
BTW, I find the LAME library.
Is there a way to do that with pure PHP?
Is there a way to do that with pure PHP?
Nope. Not at all. PHP is a server-side scripting language that depends on add-ons & external functions. That said, there is a SWFMovie::streamMP3 function, but as the page says, “This function is EXPERIMENTAL.”
You are much better off learning about MP3 streaming software like Mopidity which is a Python-based music server. Might also look into Andromeda which appears to be PHP-based. And such. Reinventing the wheel will not be fun at all. You are better off researching how to use Open Source MP3 streaming software as best as possible & adapt it for your needs.

Continuous play throughout page loads

I am sure this question has been asked but I can't find anything that suits.
I need continuous audio playback throughout page loads. I do not want to use flash or frames and I know this is possible due to the arise of the next soundcloud. Flash is a pain and frames would destroy my navigation buttons etc. You can't even take a look at soundclouds markup so I really have no idea how they've done it but it's impressive.
I would like to know how soundcloud has done this or a way to do this? To be honest I am intrigued by the new soundcloud and would love to take a look at there code but I'm pretty sure that's not going to happen
Soundcloud is probably using the new HTML5 history API for their magic. But implementing this is not as easy as putting your site into an iframe.
Here is a really great introduction to the API: http://diveintohtml5.info/history.html
I am also currently looking at this for a musician site that needs continuous audio playback whilst traversing through the site. If you are developing with Wordpress, I notice there are a few Wordpress themes that have been recently released to support this.
I have a feeling however that the continuous audio functions in these are supplied via Soundcloud - not 100% sure yet until I have a play with them in the coming weeks.

What's your all-in-one web resource optimizer?

I'm working with SmartOptimizer: minify js and css, use css data uris, add far expire headers and other features. (http://farhadi.ir/works/smartoptimizer) It works fine, but i don't know if exists a similiar application with similar or best tools (like Google Closure, CSScaffold,..)
If you're not sure witch is better, what's your favourite??
Thanks for reading, sorry for my english
YSlow ( http://developer.yahoo.com/yslow/ ) will tell you where you can optimize, at least, though it won't solve your problems for you.
WEB optimizer(http://webo.name/) is a great thing. It can not only find issues, but also do some optimizing. However it isn't free for commercial use.
I have a JS and CSS compressor into my editor (Coda.app), and I optimise images with ImageOptim.app. You just have to drag & drop the images, and the app does his job by choosing the best compression throwing it at multiple images libraries.
Note: MAC only

Online video streaming

I want to make a video site in which we can upload the video in any format and display it like youtube. How can I do this? My whole site is in PHP I'm a newbie in the video streaming sp plz be descriptive with your answer
Thanks
First you need a VideoPlayer written in Flash / Actionscript, there are also a lot of free ones arround in the internet, e.g.: FlowPlayer, You also could write you own. You acctually do not net to buy Flash for this. The Flash/Flex compiler mxmlc is available for free. You could also write you Flashvideoplayer in Haxe (also free).
You you do not want the users to switch within the video you could deliver the videos via HTTP, other wise you need an streaming server like: FlashMediaServer (not free). There are also open source alternatives like Red5 or haxeVideo.
You you do not have the video available in the right format you need to encode them: the best tool for this task could be ffmpeg
I suggest looking at the html5 <video> tag, this is probably the simplest way. For an example look at the the one from surfin' safari.
Be aware that some browsers support ogg and others h264, but not both.
Encoding of the video can be made using ffmpeg on the server.
One of my websites does this, and it's a MASSIVE pain.
However, there are websites out there that'll take a video and convert it to an FLV for you (for a price), for example we use a service called Hey!Watch which is reasonably reliable.
If you really want to encode it to flash yourself, you're going to need a full copy of Flash and a LOT of time =]
There is this highly underrated post with 3 great links for open source solutions that are like youtube and fits perfectly your question (and at least another one):
http://www.vidiscript.co.uk/
http://www.phpmotion.com/
http://osshare.sourceforge.net/
I'm posting this here just to point out the links. I think 2 of those 3 questions should be marked as duped anyway.

Interactive SVG - Learning Resources?

Has anyone any reources for learning how to implement SVG with php/mysql (and possibly with php-gtk)? I am thinking of making a top-down garden designer, with drag and drop predefined elements (such as trees/bushes) and definable areas of planting (circles/squares). Gardeners could then track over time how well planting did in a certain area.
I don´t really want to get into flash...
I'm looking for a similar solution, and the two relevant questions here are Scripting SVG and Displaying vector graphics in a browser.
Neither of them give much hope, though, as each browser has different vector capabilities. Dojox.gfx appears to be a cross browser javascript graphics library which may do everything you need, but it won't necesarily do it in SVG. Canvas is gaining a lot of support and interest.
-Adam
Here's what I found I guess in some other question, not sure though.
raphael
It's a javascript library for working with svg.
There's an example, but try using browsershots to see if you are actually happy with the support of browsers (IE for example does not have native svg support).
Me personally have decided not to use svg, rather implement images + js solution as I don't think svg is supported enough nowadays.

Categories