Originally posted by Anshul
View Post
FFMPEG usefull codes
Collapse
X
-
there is no risk to use exec if you are not careless.. and sometime it becomes necessary to execute shell command
-
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-ffmpegOriginally posted by Anshul View Postits nt a gud idea to unable exec or shell commands bt they can perform grt things
Leave a comment:
-
its nt a gud idea to unable exec or shell commands bt they can perform grt things
Leave a comment:
-
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.mp3Tags: None
Leave a comment: