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
https://forums.phpfreaks.com/topic/70999-video-encoding/#findComment-356990
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
https://forums.phpfreaks.com/topic/70999-video-encoding/#findComment-357407
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
https://forums.phpfreaks.com/topic/70999-video-encoding/#findComment-357740
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.