Go Back   CodingForums.com > :: Server side development > PHP > Post a PHP snippet

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rating: Thread Rating: 7 votes, 5.00 average.
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-22-2011, 10:30 PM   PM User | #31
DangerD
New to the CF scene

 
Join Date: May 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
DangerD is an unknown quantity at this point
@chump2877, very impresive... thanks for the code =)
DangerD is offline   Reply With Quote
Old 05-23-2011, 09:56 PM   PM User | #32
expertmac
New Coder

 
Join Date: Mar 2011
Posts: 11
Thanks: 1
Thanked 0 Times in 0 Posts
expertmac is an unknown quantity at this point
Hello,
I am trying to make faster this script but i fail,can you tell me how can improve script speed? now mp3 convert time is 3min & i want max 1min or less so how can do this?

waiting for reply


thanks for this awesome script
expertmac is offline   Reply With Quote
Old 05-23-2011, 10:07 PM   PM User | #33
chump2877
Senior Coder

 
chump2877's Avatar
 
Join Date: Dec 2004
Location: the U.S. of freakin' A.
Posts: 2,530
Thanks: 15
Thanked 128 Times in 121 Posts
chump2877 is on a distinguished road
You might be interested in this: http://www.codingforums.com/showthread.php?t=225446

That's the only potential way I can think of to increase the speed of conversion. And I don't know exactly how that could be accomplished because I haven't tried anything like that (yet).

If you figure this out, please share with the rest of us
__________________
Regards, R.J.
chump2877 is offline   Reply With Quote
Old 05-24-2011, 06:54 AM   PM User | #34
expertmac
New Coder

 
Join Date: Mar 2011
Posts: 11
Thanks: 1
Thanked 0 Times in 0 Posts
expertmac is an unknown quantity at this point
ya if i got any solution i will share...here i got same...

script is not take time for convert file...file convert speed is good but download speed is slow i also working on this issue, if you got any solution to improve download speed then please share.




Thanks
expertmac is offline   Reply With Quote
Old 05-24-2011, 10:01 AM   PM User | #35
chump2877
Senior Coder

 
chump2877's Avatar
 
Join Date: Dec 2004
Location: the U.S. of freakin' A.
Posts: 2,530
Thanks: 15
Thanked 128 Times in 121 Posts
chump2877 is on a distinguished road
Quote:
Originally Posted by expertmac View Post
file convert speed is good but download speed is slow
Well, you'll notice that the FLV video download is performed by PHP cURL extension. So, while I don't have an exact answer for you, the first thing I would do is search these keywords in Google.

This might help a little. If zlib decompression is faster than cURL download speeds, you might try downloading a compressed version of the video and then decompressing the file on the server. I don't know if it would improve speed significantly (or even if it will work), but it's worth a try.

Also, you could check out the cURL flags in general to see if there are any there that could improve performance in this case.
__________________
Regards, R.J.

Last edited by chump2877; 05-24-2011 at 10:04 AM..
chump2877 is offline   Reply With Quote
Old 05-25-2011, 12:22 AM   PM User | #36
Inigoesdr
Super Moderator


 
Inigoesdr's Avatar
 
Join Date: Mar 2007
Location: Florida, USA
Posts: 3,601
Thanks: 2
Thanked 397 Times in 390 Posts
Inigoesdr is a jewel in the roughInigoesdr is a jewel in the roughInigoesdr is a jewel in the rough
cURL is just an HTTP client, so the speed is mostly limited by the connection on the machine that is running it. Also note that zlib compression has to be supported by the server(YouTube) in order to take advantage of the compression using cURL.
Inigoesdr is offline   Reply With Quote
Old 06-11-2011, 06:57 PM   PM User | #37
Elements
New to the CF scene

 
Join Date: Aug 2009
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Elements is an unknown quantity at this point
How can I use this with ffmpeg installed on server instead on windows.

thanks
Elements is offline   Reply With Quote
Old 06-12-2011, 04:57 AM   PM User | #38
chump2877
Senior Coder

 
chump2877's Avatar
 
Join Date: Dec 2004
Location: the U.S. of freakin' A.
Posts: 2,530
Thanks: 15
Thanked 128 Times in 121 Posts
chump2877 is on a distinguished road
Quote:
Originally Posted by Elements View Post
How can I use this with ffmpeg installed on server instead on windows.

thanks
I haven't tried it. I imagine its pretty similar to the way I've set it up in XAMPP.

Have you tried to set it up on a server? Are you experiencing any specific problems?

If you figure this out, and you notice glaring differences in implementation, then please share with the rest of us.
__________________
Regards, R.J.
chump2877 is offline   Reply With Quote
Old 06-17-2011, 08:34 PM   PM User | #39
Vicar
New to the CF scene

 
Join Date: May 2011
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Vicar is an unknown quantity at this point
What code should I use to make sure that the script works?

The first post okay?

Last edited by Vicar; 06-17-2011 at 08:54 PM..
Vicar is offline   Reply With Quote
Old 06-17-2011, 10:00 PM   PM User | #40
chump2877
Senior Coder

 
chump2877's Avatar
 
Join Date: Dec 2004
Location: the U.S. of freakin' A.
Posts: 2,530
Thanks: 15
Thanked 128 Times in 121 Posts
chump2877 is on a distinguished road
Quote:
Originally Posted by Vicar View Post
What code should I use to make sure that the script works?

The first post okay?
Not sure what your question is. The app is working for me.

Please make sure you followed the instructions carefully and applied the applicable patches.

What specific problems are you experiencing?
__________________
Regards, R.J.
chump2877 is offline   Reply With Quote
Old 06-17-2011, 10:06 PM   PM User | #41
Vicar
New to the CF scene

 
Join Date: May 2011
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Vicar is an unknown quantity at this point
Thanks for the reply, now works.

I followed this post and it works:
http://www.codingforums.com/showpost...11&postcount=6

There is only an error:
when you

includes 'YouTubeToMp3Converter.new.class.php';

you have to do:

includes 'YouTubeToMp3Converter.class.php';

because the files you have listed above are:
- YouTubeToMp3Converter.class.php
- Index.php

Now I try to improve it, after the place in the forum!
Vicar is offline   Reply With Quote
Old 06-17-2011, 10:21 PM   PM User | #42
chump2877
Senior Coder

 
chump2877's Avatar
 
Join Date: Dec 2004
Location: the U.S. of freakin' A.
Posts: 2,530
Thanks: 15
Thanked 128 Times in 121 Posts
chump2877 is on a distinguished road
Quote:
Originally Posted by Vicar View Post
There is only an error:
when you

includes 'YouTubeToMp3Converter.new.class.php';

you have to do:

includes 'YouTubeToMp3Converter.class.php';

because the files you have listed above are:
- YouTubeToMp3Converter.class.php
- Index.php
I will fix that. I meant for the file to actually be named YouTubeToMp3Converter.new.class.php because that class differs from the one that precedes it in this thread. Also, the class you are using only grabs 3GP files, which are lower quality videos, and the resulting MP3 conversion is unreliable and the sound quality is poorer.

I would love to see if you can improve the 2nd version of the code (that manipulates 3GP) -- because it uses the YouTube API, but I would not presently rely on it for optimal results.
__________________
Regards, R.J.
chump2877 is offline   Reply With Quote
Old 06-17-2011, 10:40 PM   PM User | #43
Vicar
New to the CF scene

 
Join Date: May 2011
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Vicar is an unknown quantity at this point
But in that post, the script does not always work?
Vicar is offline   Reply With Quote
Old 06-17-2011, 10:42 PM   PM User | #44
chump2877
Senior Coder

 
chump2877's Avatar
 
Join Date: Dec 2004
Location: the U.S. of freakin' A.
Posts: 2,530
Thanks: 15
Thanked 128 Times in 121 Posts
chump2877 is on a distinguished road
Correct. The functioning version, that produces the best quality, is here: http://www.codingforums.com/showpost...7&postcount=18
__________________
Regards, R.J.
chump2877 is offline   Reply With Quote
Old 06-17-2011, 11:11 PM   PM User | #45
Vicar
New to the CF scene

 
Join Date: May 2011
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Vicar is an unknown quantity at this point
If I download the zip, after what should I do?

The converter works properly at localhost, if I put it on a server not, why?

Last edited by Vicar; 06-18-2011 at 05:10 PM..
Vicar is offline   Reply With Quote
Reply

Bookmarks

Tags
audio, class, conversion, dailymotion, ffmpeg, mp3, php, script, video, youtube

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:32 AM.


Advertisement
Log in to turn off these ads.