Results 1 to 5 of 5

Thread: Converting video file in real time by using PHP and ffmpeg

  1. #1
    Join Date
    Jan 2012
    Posts
    56

    Converting video file in real time by using PHP and ffmpeg

    hi friends I am having particular query and I wanted to discuss with the users of this particular friend. Currently I am using PHP script with ffmpeg in order to convert the flv videos to mp3. The entire process is taking lots of time to complete. I was wondering that ffmpeg should provide the converted mp3 in real-time so that you will be able to begin with the downloading of the file and the conversion process is running into background. Any useful information in this particular situation will be highly appreciated. Thanks a lot in advance.

  2. #2
    Join Date
    Jul 2011
    Posts
    634

    Re: Converting video file in real time by using PHP and ffmpeg

    After going through the problem of yours I am suggesting following steps which will be help to get the requirement of yours.
    • First of all the user would upload the flv file on the website of yours.
    • Once user is completed with the uploading process a row should be inserted into the table of the database which should be called as ‘pending_conversions’ and it should have the status ‘UPLOADED’. Also in that table use ID or file name should be stored. The user should get a message on the screen having message ‘your video has been uploaded and is being converted. You will receive an email when it is finished.’
    • separate PHP script which supposed to perform the conversion would be fired by CRON after every X minute.
    • The conversion script would check pending_conversions for the row which is having UPLOADED status. In case script founds any the conversion process has been started.
    • Before doing the lengthy process of conversion it would update the row of that particular table with the changing the status to CONVERTING.
    • After the completion of the conversion the status should be changed to COMPLETE in the table.
    • Once the entire process is completed an email notification has been sent to the user that conversion process has been completed and simply provide a link to download the file which has been converted.
    • Also you can make use of widgets such as AJAX to get the status of conversion process after x seconds for the user who has logged in. it would be useful for the users who are going to website and if the conversion process is completed then they are going to notified about the same.

  3. #3
    Join Date
    Jul 2011
    Posts
    623

    Re: Converting video file in real time by using PHP and ffmpeg

    Well looking at the situation if your users wanted to begin downloading a MP3 file before the completion of the conversion process. Then you should simply provide the MP3 download link to the end user once the FLV-to-MP3 conversion process is started. But before doing that make sure that new MP3 file is supposed to be exist. However I am not having any idea whether above mentioned thing would work for you. in case you are not able to push your download then you can make use of AJAX on the timer so that you can test whether the MP3 file is existing.

  4. #4
    Join Date
    Aug 2011
    Posts
    695

    Re: Converting video file in real time by using PHP and ffmpeg

    You will not be able to get real time procession or you can say conversion once the file is uploaded. The best solution which I can tell you that you should use cron as conversion would take sufficient amount of time. Particularly when the file is big enough. There will not be any need of reaching the maximum amount of execution time for the script and also you will not get the conversion fail.

  5. #5
    Join Date
    Mar 2010
    Posts
    145

    Re: Converting video file in real time by using PHP and ffmpeg

    You will be able to do real time conversion if and only if it is allowed by the conerversion code which you are using. Interent explorer is not encrypted by zend/ioncube and using loop somewhere in the game. it is converting 10Kb at a given time into the loop. You will be able print out 10Kb which has been convereted by the browser by using loop. If the process is pause then there will not be any output for downloading the data and client would wait for the same. when you wanted to test the download scenario I recommend that you should go for Flashget. It will help you know about what is happening in the header.

Similar Threads

  1. Replies: 3
    Last Post: 22-04-2012, 06:28 PM
  2. Real time Video chat in FMS
    By Efigenio in forum Technology & Internet
    Replies: 5
    Last Post: 14-02-2010, 06:14 AM
  3. Replies: 2
    Last Post: 07-02-2010, 12:48 AM
  4. Replies: 2
    Last Post: 06-02-2010, 05:35 AM
  5. Converting Video file to FLV
    By Ameya in forum Windows Software
    Replies: 2
    Last Post: 28-01-2009, 11:47 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,536,102.47559 seconds with 17 queries