Jump to content

video encoding


dilum

Recommended Posts

Firsty, exec expects a string so the code would be...

 

<?php exec('ffmpeg -i video.avi -ar 22050 -ab 32 -f flv -s 320x240 video.flv'); ?>

 

Secondly, wav and mp3 are not video formats.

 

Lastly, and I say it again. Your question has nothing to do with php. Your in the wrong place.

Link to comment
Share on other sites

You know, it's not like these guys have a personal collection of commands that they can just look through to find the one you need. They had to look through man pages, read `ffmpeg --help`, and whatever else they could find. You can do it too. It never hurt to do a little searching yourself.

Link to comment
Share on other sites

Thanks all guys,

        i found the code,

 

            <?php    exec("ffmpeg -i ".$VIDEO_PATH.$video." -acodec mp3 -ar 22050 -ab 32 -f flv ".$VIDEO_PATH.$filename.".flv"); ?>

 

            $VIDEO_PATH - directory name initial file included

            $video - video file name(initial v filename)

 

            $filename - new file name (eg. fun) 

         

            using this we can convert any video file to .flv file.

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.