PHP media player - php

I would like to know how to create a media player that will load songs from a specific folder and shuffles the songs and plays them. I have basic knowledge in HTML.

Perhaps you're looking for an application that plays music such as:
PHP Music JukeBox
netjukebox
They are both coded in PHP. There is also one for WordPress.

You could accomplish this more easily by using client side scripting, i.e. Javascript + Flash. For the actual audio player, I strongly recommend SoundManager 2, it has a great Javascript interface and good documentation.
Using this model, you use Javascript to choose a song to play, and pass its path to SoundManager, which will load it from the server and play it.

Related

JW Player, I am trying to create a live stream radio using existing mp3 files

I am trying to create a live radio using the existing mp3 files (I have the links saved in a MYSQL database). Using a player like jw player, or any player that can suit my needs. Is there any ways that a PHP script can generate a random playlist for a user and as he reach the end of that playlist, the script would generate another playlist and continue playing without stopping.
Thanks in advance for your help :)
Why not use one of the many existing software packages for doing this? Take a look at Ices, or one of the many other SHOUTcast auto-dj programs.
You would use the JWPlayer Javascript API to update the file that's being played by JW.
http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/12540/javascript-api-reference

Which language should I use if I want to embed a simple app on a web page?

I'm thinking about setting up a website (based on WordPress) to host video tutorials on interpreting CT scans.
In addition to simply letting the visitor view PowerPoint presentation videos, I'm keen on writing some sort of simple app that I can embed in the blog to allow the visitor to scroll through a series of images (i.e. a scan).
I usually code in REALbasic or Objective-C. I have some experience with PHP. What are my language options for making an interactive embeddable image viewer in a blog? The website needs to be able to be viewed on an iPad as well as normal desktop browsers.
Javascript.
Pick up jQuery, or a similar Javascript framework. It will help you get down to business faster.
What you are asking has nothing to do with server-side coding. It is all client-side. Because of that, your choices are something to do with a plugin (such as Flash), or Javascript. If you want it to work on an iPad, Flash and other plugins are out.
Since you need your image viewer to work on the iPad, ActionScript3, hence, Flash is out of the picture. I would use JavaScript as per the examples on the Apple HTML5 advocacy site, using the canvas element to render the viewer.
I would lean towards a javascript solution. There are loads of libraries out there that will give you a kickstart. If you know some example works of what you are thinking about doing, we can give you pros and cons for serverside vs. client side languages. Additionally, you can use html5 for a lot, but then again it depends on what exactly you are wanting to do.

Quicktime to Flash using PHP ? And chapters

For a client, i need to write a complex application used to stream tv episodes in flash format, at least, the player will be in flash.
It's a first for me, and i've a lot of question, since i don't really know about streaming.
But well, first, here is the constraints :
Mac server (might be migrated to linux)
PHP5
Flash
external library could be used with PHP
What i need to do at first, is to write some app (php, python, shell), or find one to convert over 500 quicktime videos to be able to be read within a flash player.
Then, i'll a back office, to add videos with meta data (the meta data will be simple html inputs), and, here is an important part of the project, the ability to generate chapters for each video (manually), the client will choose the start of a chapter, give it a name.
My questions :
Is there any flash player able to do that ? or will i have to use 'playlist' such as youtube to simulate chapters ?
Will it be easy to use the quicktime video within a flash player ?
What would be your advices for such application ?
Thanks
You're probably going to want to install and run ffmpeg to convert quicktime movs to flv or f4v. You may be able to add cue points (chapters) by using something like FLVtool.

Merging (mixing, not concatenating) audio files dynamically

I just need to be pointed in the right direction - I can research after knowing the best tools.
The idea is to have a list of audio tracks (guitars, bass, vocals...etc) which are uploaded by different users. I want a user to be able to select which tracks to listen back to then dynamically generate a new stream/file of the selected tracks which is played back or downloaded.
I have no idea where to start (use php to select tracks send to flash for playback?, or do I send it to a command line function? write some java?). It is essentially a very basic social web based DAW (digital audio workstation).
Thanks
Al
On the server side you can use php or java to feed the basic audio files, and to manage them (admin).
On the client side, you may have to write a flash application for playing those files. I preety sure flash knows basic mixing.
Basic playback in flash is easy to do. You need to learn some ActionScript 3.0 (there are tutorials with action script 2.x, but they are deprecated, as AS 2.x is not compatible with AS 3.x), and you need some designer skills to create the interface.
This tutorial may work, there are a lot of resources out there
http://www.thetechlabs.com/3d/create-a-as3-mp3-player-with-papervision3d-spectrum-display/

PHP Video Editing and Streaming

I am developing online video streaming website on PHP.
I need two functionalities:
Need to add title/text at bottom of the video dynamically.
Need to add background music to video dynamically.
Is it possible with PHP or any available open source library?
Can anyone guide me or provide links to this type of library ?
Thanks.
Editing video with PHP is an extremely bad idea. This idea very closely approximates impossible. At best you would need to decode the video which would be brutally slow in php.
If I had to tackle this problem, I would try to add the title and background music in the player, not to the video file itself. If you're streaming the video it is likely that you're using Flash or some other client-side player. You would need to write the player (or perhaps modify an existing one, there are several available) to add another layer over top of the movie for the title, and an audio track.
Slightly more hare-brained, but still easier than rewriting video in php, would be to layer a transparent image generated in php over top of the player using css and javascript, and embedding the audio in the page. This paragraph contains a terrible idea.
php doesn't provide any video oriented stuff to perform, but there is one CMS namely Kaltura, is designed and implemented in doing these kindaa stuff. Search it , download it and play it.
You can make your own player in Flash and add a default watermark. You don't need PHP for that.

Categories