I have searched all over the Google and StackOverFlow, but still did not find a solution for this.
I want to generate video thumbnail of all mp4 video files in a directory and name the thumbnails as "filename.mp4".jpg
I have ffmpeg and ffmpeg-php installed on my server. I also succeeded in creating thumbnails of one file at a time.
So this is the situation, I have a directory named uploads which has lots of mp4 videos. Now, when I run the script, thumbnail of size 100x100 shoud be created automatically and placed in another folder "skrin". Eg: xxx.mp4 should have xxx.mp4.jpg has the thumb name.
IMPORTANT: My filenames have spaces, single quotes, brackets etc in their file names. So the script should be able to handle this.
Could some one help me ? I use the following shell command in php using exec to generate thumb of an individual video.
I want to generate video thumbnail of all mp4 video files in a directory and name the thumbnails as "filename.mp4".jpg
I have ffmpeg and ffmpeg-php installed on my server. I also succeeded in creating thumbnails of one file at a time.
So this is the situation, I have a directory named uploads which has lots of mp4 videos. Now, when I run the script, thumbnail of size 100x100 shoud be created automatically and placed in another folder "skrin". Eg: xxx.mp4 should have xxx.mp4.jpg has the thumb name.
IMPORTANT: My filenames have spaces, single quotes, brackets etc in their file names. So the script should be able to handle this.
Could some one help me ? I use the following shell command in php using exec to generate thumb of an individual video.
Code:
[h=2][SIZE=3]exec("/usr/local/bin/ffmpeg -itsoffset -105 -i 'xxx haha.mp4' -vcodec mjpeg -vframes 1 -an -f rawvideo -s 100x100 'xxx haha.mp4.jpg'");[/SIZE][/h]
Comment