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
Related
I am in need of converting user uploaded gif files to mp4 format in php. Is this possible and if so, how?
The only current solution I have found is by uploading it to an api which would then provide me with a temporary link that I could use. That, however, would be a very bad solution because I would then have to crawl the link to obtain the raw video code. This is necessary as I am later uploading it to a WordPress media library.
Answer: not possible in pure php but is by installing and using ffmpeg on your server.
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?
I am working on a web application where to get the video streaming quality in kbps I am using PHP. I upload MP4 video and need to convert them to 1800kbps, 800kbps and 1000kbps videos.
I have searched the Internet for this but couldn't find any resource.
What do I need to do to measure video streaming quality ?
How can I do this in PHP ?
I like to create the video player to show videos on my website. I made a video player in flash CS5 and actionscript3 to stream the videos on the website.
My videos are often flv or mp4 format.
In the flv files I use flvmdi app to inject the metadata to that ,and for skipping the flv file I use xmoov-php (video player can pass the keyframe number from flv metadat to xmoov-php to create the new flv file from passed keyframe to the last flv keyframe, and return the flv video file on the php header for flash video player to show the video ).
but about mp4 format in Xmoov-php wiki it says:
this file can't support the mp4 format to skiping...!!!
Now I need skiping the mp4 files in my video player (I like my viewers select a part of video before buffering all video on their browser and play it ).
please give me a suggestion to skipping the mp4 file in the php or .net platform
for read mp4 metadata you can use getid3
for skipping see this pages help you
http://forum.videolan.org/viewtopic.php?p=345230#p345230
Reading mp4 files with PHP
opening mp4 via php results in full download before playback
i read Xmoov wiki.
Note: xmoov-php does not support playback of .mp4 files. If you wish
to allow streaming for .mp4 files, we recommend that you use jwplayer
or flowplayer and install any necessary plugins for .mp4 playback.
that mean jwplayer or flowplayer support it by Byte-Range Requests
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!