Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 23 of 79 FirstFirst ... 1321222324253373 ... LastLast
Results 331 to 345 of 1174
Like Tree5Likes

Thread: YouTube-to-MP3 conversion - PHP class and script

  1. #331
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,778
    Thanks
    19
    Thanked 155 Times in 146 Posts
    A note to anyone trying to install my app:

    You should install the latest "stable" version of FFmpeg!! Do NOT install/build FFmpeg from the latest source code using git or github! If you do, then you are asking for problems...
    Regards, R.J.

    ---------------------------------------------------------

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!

  2. #332
    New Coder
    Join Date
    May 2012
    Posts
    61
    Thanks
    1
    Thanked 0 Times in 0 Posts
    ok man i but it linux version can you tell me which hosting site best for it..and whats package

  3. #333
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,778
    Thanks
    19
    Thanked 155 Times in 146 Posts
    Quote Originally Posted by blacktiger786 View Post
    ok man i but it linux version can you tell me which hosting site best for it..and whats package
    Any hosting company that fulfills these requirements:

    SERVER REQUIREMENTS. . .

    1) Linux, Windows, or XAMPP/WAMP server
    2) For commercial servers: Shared, Dedicated, and VPS hosting supported
    3) Apache or IIS
    4) PHP 5.3+
    5) cURL enabled
    6) ffmpeg.exe for Windows & XAMPP/WAMP; ffmpeg-php enabled for Linux
    7) That's it!

    You'll probably also want at least a dedicated cloud or regular dedicated server, and at least 100 mbps internet speed for downloading youtube videos to the server.

    I like Ubuntu 11.10+, so that's the OS I would use. But it will work on other Linux versions.

    See the distribution README and SETUP files for more info on server setup/configuration.
    Regards, R.J.

    ---------------------------------------------------------

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!

  4. #334
    New Coder
    Join Date
    May 2012
    Posts
    61
    Thanks
    1
    Thanked 0 Times in 0 Posts
    please tell me how set download links resumable links

  5. #335
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,778
    Thanks
    19
    Thanked 155 Times in 146 Posts
    Quote Originally Posted by blacktiger786 View Post
    please tell me how set download links resumable links
    I don't understand the question
    Regards, R.J.

    ---------------------------------------------------------

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!

  6. #336
    New Coder
    Join Date
    May 2012
    Posts
    61
    Thanks
    1
    Thanked 0 Times in 0 Posts
    i want some changes
    1.. when i convert the video after converting its give me download links
    but when i download from idm this link its not give me full speed and no resume able link in idm.. i want its resume able..

    2...
    after converting link place in output folder i am right...
    but this link not deleted... i want any link converting after its deleted automatic after one hour..

    its is possible please tell me...

  7. #337
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,778
    Thanks
    19
    Thanked 155 Times in 146 Posts
    See my responses in gray:

    Quote Originally Posted by blacktiger786 View Post
    i want some changes
    1.. when i convert the video after converting its give me download links
    but when i download from idm this link its not give me full speed and no resume able link in idm.. i want its resume able..

    What is 'idm'? Dailymotion? Is there a specific video that is giving you problems?

    Can you be more specific about the speed issue you are having?

    I don't understand what you mean by 'resume-able' link. Are you referring to a download link?


    2...
    after converting link place in output folder i am right...
    but this link not deleted... i want any link converting after its deleted automatic after one hour..

    The paid-for version of the software come with a file, schedule.php. Please set this up as a cron job on your server (scheduled task on server) that runs every hour.

    The config file, config.class.php, has a configuration constant called _MAX_AGE_FILES which indicates the maximum age of converted files before they should be deleted. Every time schedule.php runs, it will compare the age of converted files in the 'output' folder to _MAX_AGE_FILES, and if the age of files is greater than _MAX_AGE_FILES, then they will be deleted. By default, _MAX_AGE_FILES is set to 86400 seconds, or one day.

    Here is a tutorial for how to configure and schedule cron jobs via SSH: http://www.thesitewizard.com/general/set-cron-job.shtml. If you have cPanel and crontab scheduling is enabled, then SSH is not required. In that case, find the cron icon in cPanel and proceed from there.


    its is possible please tell me...
    Last edited by chump2877; 05-29-2012 at 03:23 PM.
    Regards, R.J.

    ---------------------------------------------------------

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!

  8. #338
    New Coder
    Join Date
    May 2012
    Posts
    61
    Thanks
    1
    Thanked 0 Times in 0 Posts
    i want show yes on idm with multiply connection
    but i no resume capability with 1 connection


  9. #339
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,778
    Thanks
    19
    Thanked 155 Times in 146 Posts
    Quote Originally Posted by blacktiger786 View Post
    i want show yes on idm with multiply connection
    but i no resume capability with 1 connection
    It sounds like the code is working for you, but you want to add some additional functionality. (I'm having a hard time understanding your English, so I hope that is the case.)

    Theoretically (since I have not yet tried this myself), to get the kind of information you've depicted in your screenshot, you'll likely need to leverage one of cURL's callback functions:



    You should be able to access the current cURL resource inside one of those functions (as well as some additional information). I would try running curl_getinfo() on the cURL resource inside one of these callbacks to see if I could glean some file transfer information there.

    Again, I have not tried this, but that would be my approach. And this will only get you information regarding the video download from YouTube - not information about the FFmpeg conversion.

    Regarding the ability to stop and resume the conversion process: Why do you need this? At the moment, I don't know how I would address something like that.
    Edit: There appears to be some promising approaches here. You'll have to do some testing to see what does and doesn't work. And this only relates to stopping/restarting the cURL download process - not the FFmpeg conversion process.

    And what do you mean by "multiple connection"? Do you want to convert more than one file at one time? And only for Dailymotion videos?
    Last edited by chump2877; 05-30-2012 at 06:43 PM.
    Regards, R.J.

    ---------------------------------------------------------

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!

  10. #340
    New Coder
    Join Date
    Jan 2012
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hello again. I have a strange problem. My site works fine with converting a video to mp3,mp4,3gp , BUT when i try to convert video to .AVI i have a problem. My site generate .AVI file but it is empty (0 bytes). I am using that code to convert videos to .AVI:
    ffmpeg -i downloaded_video -ar 44100 -ab 256k -b 2000k new_file.avi

    Where can be tha problem? I use this code to generate mp4 and works:

    ffmpeg -i downloaded_video -ar 44100 -ab 192k -b 1000k new_file.mp4

    I run that script on Ubuntu 12.04 Desktop and have problem only with AVI formats. Any ideas ?

  11. #341
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,778
    Thanks
    19
    Thanked 155 Times in 146 Posts
    What is the output of the ffmpeg log file after attempting conversion to .avi? My guess is that you need to use the right codec for .avi -- either it's not installed or it isn't being specified in the ffmpeg command.

    For the ffmpeg command, assuming you have installed the relevant codecs, try one of the following:

    Code:
    ffmpeg -i downloaded_video -vcodec libxvid -ar 44100 -ab 256k -b 2000k new_file.avi
    
    ffmpeg -i downloaded_video -vcodec libx264 -ar 44100 -ab 256k -b 2000k new_file.avi
    Also, the log file may be formatted differently when converting to video formats (as opposed to just .mp3 audio)...Does the conversion progress bar still work?
    Last edited by chump2877; 06-02-2012 at 12:34 PM.
    Regards, R.J.

    ---------------------------------------------------------

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!

  12. #342
    New Coder
    Join Date
    Jan 2012
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This is log file, when generate .AVI file:

    Code:
    ffmpeg version 0.8.1-4:0.8.1-0ubuntu1, Copyright (c) 2000-2011 the Libav developers
      built on Mar 22 2012 05:09:06 with gcc 4.6.3
    This program is not developed anymore and is only provided for compatibility. Use avconv instead (see Changelog for the list of incompatible changes).
    [flv @ 0x74e9c0] Estimating duration from bitrate, this may be inaccurate
    Input #0, flv, from 'http://media05.vbox7.com/s/b1/b1fb2562.flv':
      Metadata:
        hasMetadata     : true
        hasVideo        : true
        hasAudio        : true
        lasttimestamp   : 249
        lastkeyframetimestamp: 247
        videosize       : 7923960
        audiosize       : 4115870
        datasize        : 12041615
        metadatacreator : flvmeta 1.0.10
        audiodelay      : 0
        canSeekToEnd    : false
        hasCuePoints    : false
        hasKeyframes    : true
      Duration: 00:04:08.96, start: 0.033000, bitrate: 379 kb/s
        Stream #0.0: Video: h264 (High), yuv420p, 960x720, 251 kb/s, 30 tbr, 1k tbn, 60 tbc
        Stream #0.1: Audio: aac, 44100 Hz, stereo, s16, 128 kb/s
    [buffer @ 0x756bc0] w:960 h:720 pixfmt:yuv420p
    Incompatible sample format 's16' for codec 'ac3', auto-selecting format 'flt'
    [ac3 @ 0x75a8a0] invalid bit rate
    Output #0, avi, to 'test.avi':
        Stream #0.0: Video: mpeg4, yuv420p, 960x720, q=2-31, 2000 kb/s, 90k tbn, 30 tbc
        Stream #0.1: Audio: ac3, 44100 Hz, stereo, flt, 2000 kb/s
    Stream mapping:
      Stream #0.0 -> #0.0
      Stream #0.1 -> #0.1
    Error while opening encoder for output stream #0.1 - maybe incorrect parameters such as bit_rate, rate, width or height

  13. #343
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,778
    Thanks
    19
    Thanked 155 Times in 146 Posts
    Code:
    [ac3 @ 0x75a8a0] invalid bit rate
    
    Error while opening encoder for output stream #0.1 - maybe incorrect parameters such as bit_rate, rate, width or height
    That tells me that there is something wrong with the bit rate for the audio track of the converted avi file.

    Also in your ffmpeg command:

    Code:
    ffmpeg -i downloaded_video -ar 44100 -ab 256k -b 2000k new_file.avi
    ...the -b flag (bitrate) seems to be overriding the -ab flag (audio bitrate)

    Try one of these commands instead:

    Code:
    ffmpeg -i downloaded_video -ar 44100 -ab 256k -vb 2000k new_file.avi
    
    ffmpeg -i downloaded_video -ar 44100 -b 256k new_file.avi
    
    ffmpeg -i downloaded_video -ar 44100 new_file.avi
    Regards, R.J.

    ---------------------------------------------------------

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!

  14. #344
    New Coder
    Join Date
    Jan 2012
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you that help me :

    Code:
    ffmpeg -i downloaded_video -ar 44100 -ab 256k -vb 2000k new_file.avi

  15. #345
    New Coder
    Join Date
    Jan 2012
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Now i find another problem. When i try to convert flv to 3gp with this command:
    Code:
    ffmpeg -i downloaded_video  -b 100k -r 25 -s 320x240 -ab 128 -f flv -y new_file.3gp
    This command generate perfect 3gp file, but without sound. Any ideas ?


 
Page 23 of 79 FirstFirst ... 1321222324253373 ... LastLast

LinkBacks (?)

  1. 07-21-2014, 05:32 PM
  2. 07-12-2014, 05:59 PM
  3. 06-26-2014, 03:39 PM
  4. 05-31-2014, 09:13 PM
  5. 04-24-2014, 07:53 PM
  6. 04-19-2014, 10:22 AM
  7. 04-04-2014, 08:33 PM
  8. 04-04-2014, 01:58 AM
  9. 03-28-2014, 06:03 AM
  10. 03-20-2014, 06:11 PM
  11. 03-16-2014, 01:22 AM
  12. 03-08-2014, 04:56 PM
  13. 03-07-2014, 06:21 PM
  14. 03-01-2014, 12:48 PM
  15. 02-22-2014, 08:40 PM
  16. 02-22-2014, 12:02 AM
  17. 02-21-2014, 08:15 PM
  18. 02-21-2014, 12:00 AM
  19. 02-20-2014, 08:37 PM
  20. 02-20-2014, 06:53 PM
  21. 02-20-2014, 03:21 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •