how to play an flv in streaming - php

I need to play an flv in streaming in a website build on a php/apache2/mysql CMS.
I like a lot http://www.visionstreetwear.com website and i would like to use this layout with a flv as header.

I believe you can't do 'true' flash video streaming without paying for streaming service from the hosting provider.
If you don't have that, you can alternatively do 'progressive streaming' of the flv file. See this article on Adobe website about how to create flash file that can do it.
http://help.adobe.com/en_US/Flash/10.0_UsingFlash/WSCF589773-11F1-4bc4-AE7C-6C2507601A98.html#WS740DCAFD-531F-4674-9741-F518EEC90EC8
What I have done before, is to create a swf file that works as a container for video which contains some actionscript to play external video file, store video on the web server, then feed external data to tell swf which movie file to play and where the movie file is located.

You could look at red5 (http://red5.org/) if you need real streaming.
If you just want to play a flv, maybe you could look at flowplayer as a base?
Good luck!

Related

How to stream remote mp4 videos using apache and php

I have a laravel website on shared hosting and some videos on a cloud storage.
What do I need to hide direct links and stream videos on my website?
The videos are for sell and somebody might download them without paying. so every time that a user wants to see a video, I generate a random link and use it in video src. I generate random string and pass it to a function. The function finds video link and uses curl to get and play video (PHP stream remote video file) but it's not good enough. If it is possible to stream videos from another source, what do I need to do it right?
Do I need a streaming server? is apache good enough? what should I learn?

Get YouTube audio stream on-the-fly

I am trying to get an audio stream (in mp3 format with fixed quality) from a YouTube video in PHP.
Notice that I cannot use FFMPEG and also i do not want to save the mp3 on my server, but I need only the audio stream (on the fly use).
Do you have any code or script? I have used many, but the half needs FFMPEG and the other saves the mp3 file in the server.
My plan is to hit on the browser:
http://host.com/process.php?url=<youtubeurl>
and get the audio stream in the page in variable that creating every time
&stream = ......;
It's not PHP, but we've open sourced a simple all-in-one node.js/CoffeeScript web app that can download a YouTube videos from a URL and then convert the video into an MP3 using ffmpeg.
github / demo / blog

Record video on browser and upload to LAMP server

I have tried a lot of things out there: red5, jquery webcam, html5 ... but none of these solution record a video and leave it ready to upload to a server.
Is there anyway (html5, flash, whatever ... the better cross-broswer solution, the best) to upload video (+ audio!) and upload the result to a server (I guess through AJAX) ?
Summarize:
jQueryWebcam (https://github.com/infusion/jQuery-webcam): it has flash video, uploads to a server image, not a video
Eric Bidelman's solution (http://ericbidelman.tumblr.com/post/31486670538/creating-webm-video-from-getusermedia):records video in html5 and allows you to download (so you can upload
to a server), but no audio !
Red5 (http://www.red5-recorder.com/services.php): paid services, not
uploading in free version :(
DMV (https://github.com/rwldrn/dmv): it just captures a photo ... besides not cross-browser
I have developed video recording solutions for the better part of the last 5 years and contributed a lot to fixing video recording bugs in Red5.
There are currently 2 production ready technical solutions for recording audio and video on the web. One for desktop and one for mobile.
On desktop you will need a Flash application that sits embedded in a web page, captures the visitors webcam and mic, encodes the raw video and audio data and streams it as it is recorded (through rtmp) to a media server.
You have at least 3 options for the media server:
Red5 is free and open source (btw. recording works out of the box in Red5)
Wowza ($65/month)
Adobe Media Server Pro ($4500)
The media server receives (again through streaming/rtmp not through http) the data and, depending on the codec used on the client, saves it to mp4, flv or f4v files.
This Flash client + media server recording process - which has worked pretty well since Flash Player 6 in 2002 - will most likely replaced by the HTML5 alternative named MediaStream Recorder (not yet implemented fully by any browser).
On mobile you can use HTML Media Capture (explained here with screenshots) to record video using the device's native video recording app and codecs. HTML Media Capture records locally (on the device) and then you upload (normal HTTP upload process) the file to the web server.
A commercial solution that implements both (Flash client + media server on desktop and HTML Media Capture on mobile) is HDFVR.
You could use something like binary download via javascript.
Here is one example
As you have not much info about video protocols i cant give you better answer
you can try this library, RecordRTC. It generates a blob file to put in video source and you can upload this file later to your server.
RecordRTC Library
This library is a container for other libraries, like Whammy for video, Recorderjs for audio and jsGif for gifs.
You can use Whammy library for record videos too:
Whammy

how to create a thumbnail of uploaded video file in php without ffmpeg?

Is there any possiblity to create a thumbnail of uploaded video file in php without using ffmpeg.
Most server side scripts rely on ffmpeg, so if you can't use that you can either upload the video to an external service but that would mean sending the whole file OR you could try creating them client-side in the browser -- Generate thumbnails from video files using HTML5's video tag and canvas
If however you can't use ffmpeg for installtion reasons you could look at a wrapper -- It currently provides FFmpeg-PHP emulation in pure PHP so you wouldn't need to compile and install the module.
In the past I have used this website to do video conversion and create thumbnails. It works very well and have both free and paid plans.
The system consists of several "robots" that do different jobs. These robots can read your videos if you put them in a public folder with an URI or Amazon S3 for example. The actions that the robot must do are defined in "templates" in JSON and have a PHP SDK. Have a look at the docs.
P.S: I'm not related with transloadit, seems like I am a commercial guy...

PHP. Requirements. For creating a live video streaming

Our aim is to create a live video streaming site for each individual paid registered user only by php platform.
I need video camera to take videos and i want to know function flow.I dont know where i have to start.
What are all things needed? Especially live video uploading using ordinary video camera. I have found http://www.videowhisper.com/?p=PHP+Live+Streaming This is the site, i exactly needed. Unfortunately but its camera option only includes "webcam only". I would like input video camera instead of webcam.
I need suggestions for requirements to create the site.
I need to stream live video for each paid user. That includes flash player content.
Uploading and video control by admin side. Only live links is shared to customers.
i think it is nothing about PHP, but something about JAVA.
You can use Red5 as media server, and users watch videos via flash player. You also can take videos with flash.
Found an interesting link on it: http://en.wikipedia.org/wiki/Push_technology
And Symfony 2.1 is going to handle streamed responses: http://symfony.com/doc/current/components/http_foundation.html#streaming-a-response, but is not stable yet.

Categories