FFMPEG usefull codes

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    FFMPEG usefull codes

    You Can Send This commands in PHP with exec() or shell_exec()



    Getting infos from a video file

    ffmpeg -i video.avi

    Turn X images to a video sequence

    ffmpeg -f image2 -i image%d.jpg video.mpg

    Turn a video to X images

    ffmpeg -i video.mpg image%d.jpg

    Extracting sound from a video, and save it as Mp3

    ffmpeg -i source_video.avi -vn -ar 44100 -ac 2 -ab 192 -f mp3 sound.mp3

    Convert a wav file to Mp3

    ffmpeg -i son_origine.avi -vn -ar 44100 -ac 2 -ab 192 -f mp3 son_final.mp3

    Convert .avi video to .mpg

    ffmpeg -i video_origine.avi video_finale.mpg


    Convert .avi to animated gif(uncompressed)

    ffmpeg -i video_origine.avi gif_anime.gif

    Mix a video with a sound file

    ffmpeg -i son.wav -i video_origine.avi video_finale.mpg

    Convert .avi to .flv

    ffmpeg -i video_origine.avi -ab 56 -ar 44100 -b 200 -r 15 -s 320x240 -f flv video_finale.flv


    bite rate convertor

    ffmpeg -i $file -b 128 -y output.mp3

    #2
    its nt a gud idea to unable exec or shell commands bt they can perform grt things

    Comment


      #3
      Originally posted by Anshul View Post
      its nt a gud idea to unable exec or shell commands bt they can perform grt things
      if you dont have php-ffmpeg there is no way around exec if you want to use ffmpeg on your server, and i think with exec you can use more advanced commands than with php-ffmpeg
      Advertise your mobile site for FREE with AdTwirl

      Comment


        #4
        right man bcoz vhook water mark command only work with exec()

        Comment


          #5
          dude your server should support to php-ffmpeg .

          Comment


            #6
            Originally posted by Anshul View Post
            its nt a gud idea to unable exec or shell commands bt they can perform grt things
            there is no risk to use exec if you are not careless.. and sometime it becomes necessary to execute shell command
            Follow me @ksg91 | My Blog: http://ksg91.com | Nokia Blog: http://NokiaTips.in

            Comment

            Working...
            X