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 12-24-2012, 09:09 AM   PM User | #586
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 bbrog View Post
Hi, been mostly getting problems with http://www.youtube.com/watch?v=MNvvzOpgOdo from this artist and this song.
I was able to convert that video with no problems. Are you getting any errors in the corresponding FFmpeg log file? Any AJAX errors (check AJAX response text for error codes)?
__________________
Regards, R.J.
chump2877 is offline   Reply With Quote
Old 12-24-2012, 07:23 PM   PM User | #587
bbrog
New Coder

 
Join Date: Jun 2012
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
bbrog is an unknown quantity at this point
Nope, no errors at all. I cleared my cache on my computer and seems to be working fine now.
bbrog is offline   Reply With Quote
Old 01-01-2013, 02:54 AM   PM User | #588
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
New version

Hello everyone,

I have just finished updating the paid-for version of my software. New in this version:
  1. Added volume control slider to conversion form in “show more options” section
  2. Added css file for index.php and ringtone.php styles
  3. Changed character encoding to utf-8
  4. Fixed a bug that caused conversion to 3GP format to fail when volume is set to anything other than 256 (the normal/default setting)

The following files were changed/added:
  1. config.class.php updated
  2. index.php updated
  3. ringtone.php updated
  4. VideoConverter.class.php updated
  5. css/styles.css new

All previous customers who have purchased the paid-for version of my app are receiving this new, updated version via the e-mail addresses that you provided at Tradebit.com.

Please report any issues with either the paid-for version or the free version in this forum thread. Your feedback is encouraged.

Thanks!
__________________
Regards, R.J.
chump2877 is offline   Reply With Quote
Users who have thanked chump2877 for this post:
Luckyplaya (01-01-2013)
Old 01-01-2013, 03:53 AM   PM User | #589
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
Here's a helpful tip for you guys:

To find out what codecs are installed on your server and/or with your version of FFmpeg, type the following into a command line:

Quote:
ffmpeg -codecs
In Linux, you should be able to type this at any command prompt. In Windows, you will need to "cd" into the directory that contains ffmpeg.exe.

Hope it helps! And wishing you all a Happy New Year!
__________________
Regards, R.J.
chump2877 is offline   Reply With Quote
Old 01-02-2013, 02:48 AM   PM User | #590
Luckyplaya
New Coder

 
Join Date: Sep 2012
Location: Germany
Posts: 32
Thanks: 8
Thanked 1 Time in 1 Post
Luckyplaya is an unknown quantity at this point
I want to change something on the style but do not know how to do it.

It is this issue appear

|-------------|
| screenshot--| Name: The Video Name
| from video --| Format: MP3 or whatever was chosen
|-------------| Status: 0 - 100% (without Progressbar)

and when the conversion is completed

|-------------|
| screenshot--| Name: The Video Name
| from video --| Format: MP3 or whatever was chosen
|-------------| Status: Success

Download or Create a Ringtone

how can I do it? can you help me?
Luckyplaya is offline   Reply With Quote
Old 01-02-2013, 07:20 AM   PM User | #591
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:
Format: MP3 or whatever was chosen
To get the file type/extension:

In index.php, you can get the value of $_POST['ftype'] and then access the corresponding key of Config::_convertedFileTypes array, i.e.:

PHP Code:
echo $ftypes[$_POST['ftype']]['fileExt']; 
Quote:
Status: 0 - 100% (without Progressbar)
To eliminate progress bar and just show percentage:

In css/styles.css, you will need to edit #progress-bar and #progress styles.

In index.php, change this line:

PHP Code:
echo '<div id="progress-bar"><div id="progress">0%</div></div>'
...to ...

PHP Code:
echo '<div id="progress-bar">Status: <div id="progress">0%</div></div>'
And change this line in updateVideoDownloadProgress javascript function:
Code:
progress.style.width = progress.innerHTML = parseInt(percentage) + '%';
...to...
Code:
progress.innerHTML = parseInt(percentage) + '%';
And change this line in updateConversionProgress javascript function:

Code:
progress.style.width = progress.innerHTML = parseInt(retVals[1]) + '%';
...to...

Code:
progress.innerHTML = parseInt(retVals[1]) + '%';
Quote:
and when the conversion is completed
To do that, it's a little tricky. There isn't an easy way to explain how to do that, but I assure you, it is possible. You need to play with the javascript in updateConversionProgress function and possibly in window.onload event handler as well. It's a matter of toggling the display of elements that you want to be visible and those that you want hidden, following video conversion, via javascript.

Edit: I hope that helps a little bit. That should get you going in the right direction. As you can see, there is more going on here than just changing the CSS styles.

If you need me to write the code for you, then I will need to charge you for the additional work and time spent. Unfortunately, I've got too much going on here at the moment to do the work for free.
__________________
Regards, R.J.

Last edited by chump2877; 01-02-2013 at 07:30 AM..
chump2877 is offline   Reply With Quote
Users who have thanked chump2877 for this post:
Luckyplaya (01-02-2013)
Old 01-02-2013, 04:08 PM   PM User | #592
Luckyplaya
New Coder

 
Join Date: Sep 2012
Location: Germany
Posts: 32
Thanks: 8
Thanked 1 Time in 1 Post
Luckyplaya is an unknown quantity at this point
Thanks

you have a pn
Luckyplaya is offline   Reply With Quote
Old 01-08-2013, 10:37 PM   PM User | #593
phpLover7
New Coder

 
Join Date: Jan 2013
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
phpLover7 is an unknown quantity at this point
Hello
this is payed script

i have big probleme the script can't convert

error log

[08-Jan-2013 16:19:42 America/Chicago] PHP Warning: Division by zero in /home/youmpcom/public_html/VideoConverter.class.php on line 130
[08-Jan-2013 16:20:27 America/Chicago] PHP Warning: Division by zero in /home/youmpcom/public_html/VideoConverter.class.php on line 130
[08-Jan-2013 16:20:27 America/Chicago] PHP Warning: Division by zero in /home/youmpcom/public_html/VideoConverter.class.php on line 130
phpLover7 is offline   Reply With Quote
Old 01-08-2013, 11:03 PM   PM User | #594
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 phpLover7 View Post
Hello
this is payed script

i have big probleme the script can't convert

error log

[08-Jan-2013 16:19:42 America/Chicago] PHP Warning: Division by zero in /home/youmpcom/public_html/VideoConverter.class.php on line 130
[08-Jan-2013 16:20:27 America/Chicago] PHP Warning: Division by zero in /home/youmpcom/public_html/VideoConverter.class.php on line 130
[08-Jan-2013 16:20:27 America/Chicago] PHP Warning: Division by zero in /home/youmpcom/public_html/VideoConverter.class.php on line 130
Those warnings are inconsequential. You can turn them off via this line at the top of index.php:

PHP Code:
ini_set('display_errors',0); 
Please search this forum thread for ways to troubleshoot why the software isn't converting. I have covered ways to do this many times before. It is very likely that you are experiencing issues that others have also experienced in the past.

That said, please post a FFmpeg log file from one of your failed conversions. The source of your problem could be almost anything, but we can start there.
__________________
Regards, R.J.
chump2877 is offline   Reply With Quote
Old 01-08-2013, 11:12 PM   PM User | #595
phpLover7
New Coder

 
Join Date: Jan 2013
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
phpLover7 is an unknown quantity at this point
Fmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers
built on Jan 29 2012 23:55:02 with gcc 4.1.2 20080704 (Red Hat 4.1.2-51)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
libavutil 50.15. 1 / 50.15. 1
libavcodec 52.72. 2 / 52.72. 2
libavformat 52.64. 2 / 52.64. 2
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.19. 0 / 1.19. 0
libswscale 0.11. 0 / 0.11. 0
libpostproc 51. 2. 0 / 51. 2. 0
[matroska @ 0x604c8b0]Estimating duration from bitrate, this may be inaccurate

Seems stream 0 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 25.00 (25/1)
Input #0, matroska, from 'videos/1357514090_50ea056acba830.37915406.flv':
Metadata:
doctype : webm
Duration: 00:04:03.98, start: 0.000000, bitrate: N/A
Stream #0.0(eng): Video: 0x0000, 1920x1080, PAR 1:1 DAR 16:9, 1k fps, 25 tbr, 1k tbn, 1k tbc
Stream #0.1: Audio: vorbis, 44100 Hz, stereo, s16
Output #0, mp3, to 'output/Gotye_-_Somebody_That_I_Used_To_Know_feat_Kimbra_-_official_video_uuid-50ea05f593779.mp3':
Metadata:
TSSE : Lavf52.64.2
Stream #0.0: Audio: libmp3lame, 44100 Hz, stereo, s16, 128 kb/s
Stream mapping:
Stream #0.1 -> #0.0
Press [q] to stop encoding
size= 136kB time=8.72 bitrate= 128.0kbits/s
size= 288kB time=18.44 bitrate= 128.0kbits/s
size= 453kB time=28.97 bitrate= 128.0kbits/s
size= 616kB time=39.44 bitrate= 128.0kbits/s
size= 768kB time=49.16 bitrate= 128.0kbits/s
size= 951kB time=60.87 bitrate= 128.0kbits/s
size= 1117kB time=71.47 bitrate= 128.0kbits/s
size= 1336kB time=85.52 bitrate= 128.0kbits/s
size= 1551kB time=99.27 bitrate= 128.0kbits/s
size= 1732kB time=110.84 bitrate= 128.0kbits/s
size= 1909kB time=122.20 bitrate= 128.0kbits/s
size= 2082kB time=133.28 bitrate= 128.0kbits/s
size= 2262kB time=144.74 bitrate= 128.0kbits/s
size= 2472kB time=158.20 bitrate= 128.0kbits/s
size= 2695kB time=172.46 bitrate= 128.0kbits/s
size= 2919kB time=186.80 bitrate= 128.0kbits/s
size= 3171kB time=202.92 bitrate= 128.0kbits/s
size= 3380kB time=216.35 bitrate= 128.0kbits/s
size= 3591kB time=229.83 bitrate= 128.0kbits/s
size= 3783kB time=242.13 bitrate= 128.0kbits/s
size= 3813kB time=244.04 bitrate= 128.0kbits/s
video:0kB audio:3813kB global headers:0kB muxing overhead 0.000845%
phpLover7 is offline   Reply With Quote
Old 01-08-2013, 11:37 PM   PM User | #596
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
1) Try updating your version of FFmpeg (and/or codecs).
2) See this post for how to troubleshoot AJAX response text of conversion. Note: The paid version has more error checking, so there are more than 3 places an error could occur.
3) What is the URL of your website where the software is installed. I can look at this, but please do #1 and #2 in this list first.
__________________
Regards, R.J.
chump2877 is offline   Reply With Quote
Old 01-09-2013, 12:23 AM   PM User | #597
phpLover7
New Coder

 
Join Date: Jan 2013
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
phpLover7 is an unknown quantity at this point
here www . you4mp3 . com /try/
phpLover7 is offline   Reply With Quote
Old 01-09-2013, 12:45 AM   PM User | #598
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 phpLover7 View Post
here www . you4mp3 . com /try/
please do the following:

Quote:
1) Try updating your version of FFmpeg (and/or codecs).
2) See this post for how to troubleshoot AJAX response text of conversion. Note: The paid version has more error checking, so there are more than 3 places an error could occur.
__________________
Regards, R.J.
chump2877 is offline   Reply With Quote
Old 01-09-2013, 01:16 AM   PM User | #599
phpLover7
New Coder

 
Join Date: Jan 2013
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
phpLover7 is an unknown quantity at this point
oki i will try bro
phpLover7 is offline   Reply With Quote
Old 01-09-2013, 09:01 PM   PM User | #600
phpLover7
New Coder

 
Join Date: Jan 2013
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
phpLover7 is an unknown quantity at this point
Bro can you told Me whats This Probleme here

Try Please
http:// 198.23.149.167 /try/
phpLover7 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 09:42 PM.


Advertisement
Log in to turn off these ads.