Click here to Skip to main content
15,886,780 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,
i am using ffmpeg tool for generating thumbnail from video file, My code is given below
C#
string imagargs = " -i \"" + inputPath + "\\" + fileName.Remove(fileName.IndexOf(".")) + ".flv" + "\" -f image2 -ss 1 -vframes 1 -s 280x200 -an \"" + imgpath + "\\" + fileName.Remove(fileName.IndexOf(".")) + ".jpg" + "\"";


but this argument does not work for flv files. Can anybody provide the perfect argument?
thanks in advance.
Posted

1 solution

C#
// For 3 seconds
string imageArgs = "-i " + flvfilein + " -an -ss 00:00:03 -s 120×90 -vframes 1 -f mjpeg " + thumbOut.Split('.')[0] + ".jpg";


C#
//example:
ffmpeg -i video.flv -an -ss 00:00:03 -s 120*90 -vframes 1 -f mjpeg thumbOut.jpg
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900