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 01-22-2011, 03:35 PM   PM User | #16
talooz
New to the CF scene

 
Join Date: Jan 2011
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
talooz is an unknown quantity at this point
OK, i solved this and I feel kind of dumb because it was so simple...
In plesk go to your domain -> setup -> and run PHP as ISAPI

anyways, i was looking up for solution for
Error in my_thread_global_end(): 1 threads didn't exit
and i got two birds in one hit
talooz is offline   Reply With Quote
Old 03-05-2011, 11:40 AM   PM User | #17
domasgel
New to the CF scene

 
Join Date: Mar 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
domasgel is an unknown quantity at this point
Anyone know why I can get "Error generating MP3 file!".?
domasgel is offline   Reply With Quote
Old 03-06-2011, 12:08 AM   PM User | #18
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
YouTube recently made some changes to the front end of their web site. As a result, a very minor tweak to my class code is required to keep it working properly.

The following code in the SetFlvUrl() method in YouTubeToMp3Converter.class.php:

PHP Code:
        private function SetFlvUrl($file_contents)
        {
            
$vidUrl '';
            if (
eregi('fmt_url_map',$file_contents))
            {
                
$vidUrl end(explode('&fmt_url_map=',$file_contents));
                
$vidUrl current(explode('&',$vidUrl));
                
$vidUrl current(explode('%2C',$vidUrl));
                
$vidUrl urldecode(end(explode('%7C',$vidUrl)));
            }
            
$this->_flvUrl $vidUrl;
        } 
...needs to change like so:

PHP Code:
        private function SetFlvUrl($file_contents)
        {
            
$vidUrl '';
            if (
eregi('fmt_url_map',$file_contents))
            {
                
$vidUrl end(explode('fmt_url_map=',$file_contents));
                
$vidUrl current(explode('&',$vidUrl));
                
$vidUrl current(explode('%2C',$vidUrl));
                
$vidUrl urldecode(end(explode('%7C',$vidUrl)));
            }
            
$this->_flvUrl $vidUrl;
        } 
After doing that, everything should work as it has before! (Please notify me if you experience otherwise.)
Attached Files
File Type: zip 3-5-11.zip (2.8 KB, 760 views)
__________________
Regards, R.J.

Last edited by chump2877; 03-06-2011 at 12:31 AM..
chump2877 is offline   Reply With Quote
Old 03-06-2011, 11:38 AM   PM User | #19
domasgel
New to the CF scene

 
Join Date: Mar 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
domasgel is an unknown quantity at this point
chump2877 Thank you so much
domasgel is offline   Reply With Quote
Old 03-29-2011, 05:57 PM   PM User | #20
Sim
New Coder

 
Join Date: Feb 2009
Posts: 81
Thanks: 1
Thanked 1 Time in 1 Post
Sim is an unknown quantity at this point
I am having some problems with this class..

I always get this:

...Please wait while I try to convert:

preview image

DirtBall Ft Johnny Ritcher-Grind

Error generating MP3 file!

http://www.youtube.com/watch?v=_Vt9wlbzt5E

I look in my video dir and I don't even see teh video file.

Also, my error log says "[29-Mar-2011 11:58:06] PHP Warning: Module 'ffmpeg' already loaded in Unknown on line 0" not sure if this could be the problem



Edit again: I commented the delete video line and the video's there. It just doesn't convert for some reason... ;[
__________________
Online RPG Creator - Create Your Own Online RPG with no programming knoweldge

Last edited by Sim; 03-29-2011 at 06:06 PM..
Sim is offline   Reply With Quote
Old 03-30-2011, 03:02 AM   PM User | #21
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:
my error log says "[29-Mar-2011 11:58:06] PHP Warning: Module 'ffmpeg' already loaded in Unknown on line 0" not sure if this could be the problem
The "Error generating MP3 file!" usually is a sign that something is wrong with your FFmpeg installation, and the above error message seems to reinforce that.

My best guess is that you already have FFmpeg loaded on your server.

See this forum thread: http://motionmods.com/forum/topic?id=690&p=5467

Do you have a copy of FFmpeg already installed in the user/bin/ directory? (Also, how are you running PHP -- what is your server configuration?)

Edit: BTW, I had no problem grabbing the MP3 for that video....
__________________
Regards, R.J.

Last edited by chump2877; 03-30-2011 at 03:04 AM..
chump2877 is offline   Reply With Quote
Old 03-31-2011, 03:03 PM   PM User | #22
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
I am using this script but how can download mp3 file from webpage?
after convert file is stored in mp3 folder but i want download from webpage so how to add link?

Wating for your reply.


Thanks for this nice script!
expertmac is offline   Reply With Quote
Old 03-31-2011, 10:21 PM   PM User | #23
kbluhm
Senior Coder

 
kbluhm's Avatar
 
Join Date: Apr 2007
Location: Philadelphia, PA, USA
Posts: 1,502
Thanks: 2
Thanked 258 Times in 254 Posts
kbluhm will become famous soon enough
Easy: display a link to it and then right-click, save as...
__________________
ZCE
kbluhm is offline   Reply With Quote
Old 04-01-2011, 04:12 AM   PM User | #24
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
I am using this script but how can download mp3 file from webpage?
after convert file is stored in mp3 folder but i want download from webpage so how to add link?

Wating for your reply.


Thanks for this nice script!
You could do what kbluhm suggested, or you could try this: http://www.lmgtfy.com/?q=php+prompt+for+download

You'll find lots of solutions at that link
__________________
Regards, R.J.
chump2877 is offline   Reply With Quote
Old 04-01-2011, 01:50 PM   PM User | #25
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
Done! thanks for reply...i just add download link & its works thanks again
expertmac is offline   Reply With Quote
Old 04-10-2011, 02:31 PM   PM User | #26
unu1
New to the CF scene

 
Join Date: Apr 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
unu1 is an unknown quantity at this point
someone has an idea on Linux version ?
unu1 is offline   Reply With Quote
Old 05-11-2011, 09:10 PM   PM User | #27
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 using this script...its work fine but i want add one more feature.I want add ID3 editor can you help me for that.if you have any tips please give me


thanks
expertmac is offline   Reply With Quote
Old 05-11-2011, 09:26 PM   PM User | #28
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
http://multimedia.cx/eggs/supplying-...with-metadata/
__________________
Regards, R.J.
chump2877 is offline   Reply With Quote
Old 05-22-2011, 05:02 PM   PM User | #29
fatslave
New to the CF scene

 
Join Date: May 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
fatslave is an unknown quantity at this point
heyy , i am unable to infact get the script to fetch video, so i think it gets stuck there .. i can see the thumbnail .. and then nothing happens.. no errors, nothing

i verified that safemode is off for php .. and ffmpeg is working otherwise..

i can see a file of 0kb in videos folders.. and that continues to stay like that !!

Quote:
EDIT: it works, i had to turn on the curl, thanks a lot mate!!

Last edited by fatslave; 05-22-2011 at 05:55 PM..
fatslave is offline   Reply With Quote
Old 05-22-2011, 05:03 PM   PM User | #30
fatslave
New to the CF scene

 
Join Date: May 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
fatslave is an unknown quantity at this point
http://www.youtube.com/watch?v=gWqI0U3pBdA


for testing sake, please verify that this is working for u

Quote:
No need now :P

Last edited by fatslave; 05-22-2011 at 05:55 PM..
fatslave 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 06:21 AM.


Advertisement
Log in to turn off these ads.