creating thumbnail image through ffmpeg.exe - php

I am creating thumbnail image(small size) from a big image. for same images it unable to create the thumbnail. if i move the image from one place to another it works.
case:
if image x is created in year 2000 and i tried to extract thumbnail from that and let i failed. then i moved the same image to another place and again try to extracted the thumbanil and it successfully extracted the thumbnail. even if i am again transforming the same image to the same place it is working.
Edit: The command is:
C:/xampp/htdocs/jcert6/seyretfiles/tools/converter/ffmpeg.exe
-i "\\myip\knowledge base\videos\user_62\RHSSNet_Image_Library\images\Touchport_II\CD302_14_TPII_17in_PPR_Scanner.jpg"
-y -f mjpeg -s 72x92 -vframes 1
-an c:/xampp/htdocs/jcert6/seyretfiles/uploads/thumbnails/user_62/user_62_tz2jliomkfunsrhd1291976903_0.jpg –
While debugging, I found that if any images do not have created date is not processed by the ffmpeg and generate error image codec parameter.
is it possible to process images without having a create date in ffmpeg???

Check your folder permissions and/or the path to the original file and the thumbnail. If it work by changing the location, this is the problem. Just guessing though cause do not have enough info.

Related

Video from array of images ffmpeg windows php

I have an array of images src.
$src = array("folder1/imagejsbs124.jpg","folder2/image45125hsja.jpg", ");
I want to convert those images into a video.mp4 creating a animated slideshow.
I searched stackoverflow but it didn't work for me. Therefore I asked this personally and hope someone will find an answer.
Try out as given here Create a video slideshow from images.
Simple example to generate a video from some images using ffmpeg can be
ffmpeg -f image2 -i image%d.jpg video.mpg
This will bascically use all images from the current directory (named image1.jpg, image2.jpg .... imagen.jpg) to generate a video named video.mpg.
Using php you can also checkout for FFmpeg-php which i basically a php extension for ffmpeg.
if files are in different directory then use Concatenate:
Create a file concat.txt and then use it as input
file '/path/to/file1'
file '/path/to/file2'
file '/path/to/file3'
ffmpeg -f concat -i concat.txt video.mpg

Converting MP3 to Video with Single/Multiple images as video with PHPVideoToolkit

Just started using PHPVideoToolkit and I'm looking to take an MP3 and convert it to a video. I want to have a single image as the video with the audio playing.
On the Google Code page https://code.google.com/p/phpvideotoolkit/ it says it can assemble a video stream from a set of separate video images so I know it's possible but I cannot figure out how from the GitHub documentation.
The documentation found in the documentation directory of the repository appear to be empty.
Help is much appreciated
You can use ffmpeg
Turning Images into Video
ffmpeg -f image2 -i image%d.jpg video.mpg
This command will transform all the images from the current directory (named image1.jpg, image2.jpg) to a video file named video.mpg.
Playing music in the video
ffmpeg -i song.wav -i video.avi video_finale.mpg
This command will add a song.wav in video.avi and give a final video_final.mpg

using ffmpeg for mp3 to ogg conversion

Am new to php. With some of the reference to the posts on Stackoverflow, i've tried out the method to convert an mp3 audio file to ogg simultaneously while uploading to the server, initially i checked on my localhost, i always got an output int(1) in response for var_dump($output), but i cant see the ogg converted file saved anywhere in folder. Can any please guilde, its urgent. My questions are:
1) Do i need to provide path for both input and output files, if yes then, did i mention properly in code here.
2) where exactly i need to save/place the entire ffmpeg folder / ffmpeg.exe
3) Are all the path mentioned w.r.t the input and output file proper in code here ?
passthru("/admin/ffmpeg32/bin/ffmpeg.exe -i audioUpload/".$_FILES['audio_file']['name']." -vcodec libtheora -acodec libvorbis -target ./ffmpeg32/ogg/$file_name".".ogg",$output);
var_dump($output);

Create Thumbnail from Office Files, Videos, Images with PHP

My company is building an internal app where they need to upload videos (most probably almost all of them in MP4 format), PDF files, Word, Excel, PowerPoint, Images (jpg, png, etc) and then it should be able to make a thumbnail out of it. I have had a look at other questions here but they are too old and some of the recommended services were too old and not being updated.
I would love to know your suggestions. I heard that with Images I might be able to use ImageMagik, and also heard of FFMPEG once that could retrieve a still image from a video (I saw this when I tried to build a site with Drupal).
Thanks in Advance
I used this command to create thumbnails from videos with ffmpeg:
/path/to/ffpeg -i /path/to/video_file -vcodec mjpeg -vframes 1 -an -f rawvideo -r 1 -ss <time> -s <size> -y /path/to/save_image.jpg
# <time> with format hh:mm:ss
# <size> with format WIDTHxHEIGHT (ex: 240x320)

First Capturing thumbnail from a Video using php?

I have an upload functionality on my site. And i want the php script to take out a random frame from the uploaded video, and save it as an image. Is that possible?please guide me how can i get first capture image in video upload in php
Thanks for Advance.
You need ffmpeg installed on your server.
With that, use the exec() function:
exec('ffmpeg -i /path/to/your/video.avi -f image2 -vframes 1 /path/to/thumbnail.jpg');
Take a look at the Flowplayer Tutorial or the ffmpeg documentation for more options

Categories