realtime transcoding with php alone?

Discussion in 'PHP' started by ps3ubo, May 16, 2010.

  1. #1
    hi,

    i used wget & ffmpeg.. but this is not realtime :(
    there are sites like mp3ify.com that convert mp3 to flv directly from youtube without uploading it to there server... i was wondering is there a php script that can extract the audio from a video file, then use header functions to download it??

    maybe there is a alternative.. like cgi or perl or something :S idk..

    regards,
     
    ps3ubo, May 16, 2010 IP
  2. mfscripts

    mfscripts Banned

    Messages:
    319
    Likes Received:
    4
    Best Answers:
    8
    Trophy Points:
    90
    Digital Goods:
    3
    #2
    You'll need to use something like ffmpeg to do it since it's not supported directly within PHP. You could use PHP to call ffmpeg though via system()/exec()
     
    mfscripts, May 16, 2010 IP
  3. roopajyothi

    roopajyothi Active Member

    Messages:
    1,302
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    80
    #3
    The OP Said already he used the ffmpeg :)
     
    roopajyothi, May 16, 2010 IP
  4. mfscripts

    mfscripts Banned

    Messages:
    319
    Likes Received:
    4
    Best Answers:
    8
    Trophy Points:
    90
    Digital Goods:
    3
    #4
    Yes, I'm confirming that's the only option.
     
    mfscripts, May 17, 2010 IP
  5. ps3ubo

    ps3ubo Peon

    Messages:
    204
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    but sites like mp3ify.com can do it 'realtime' ffmpeg is not realtime.. it converts a file from the server to a new file on the server :/ not a php header attachment converting it realtime :(
     
    ps3ubo, May 21, 2010 IP
  6. Trikun3

    Trikun3 Peon

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I recall modules in PHP like php-ffmpeg that allowed you to convert the file within PHP without calling it in system() or exec(). I've never looked into it to solve a problem I've had, so that's all I can say about it.
     
    Trikun3, May 22, 2010 IP
  7. mfscripts

    mfscripts Banned

    Messages:
    319
    Likes Received:
    4
    Best Answers:
    8
    Trophy Points:
    90
    Digital Goods:
    3
    #7
    To me it looks like mp3ify.com converts it to a file on the server, then you click the 'download' button to retrieve the file. Either way, you could use exec() or system() to call ffmpeg when the user requests it, store it on the server and remove it after a period of time, say 10 minutes. This would give the same impression of being encoded dynamically for the user.
     
    mfscripts, May 22, 2010 IP