leandromoreira / ffmpeg-libav-tutorial

FFmpeg libav tutorial - learn how media works from basic to transmuxing, transcoding and more. Translations: πŸ‡ΊπŸ‡Έ πŸ‡¨πŸ‡³ πŸ‡°πŸ‡· πŸ‡ͺπŸ‡Έ πŸ‡»πŸ‡³ πŸ‡§πŸ‡·
https://github.com/leandromoreira/ffmpeg-libav-tutorial
BSD 3-Clause "New" or "Revised" License
9.78k stars 937 forks source link

Series of Images From Video #83

Closed smoil-ali closed 3 years ago

smoil-ali commented 3 years ago

Hi,It is not the issue, but i want to know how can we extract images from video like in editing apps that a horizontal list of images appeared.I did little bit testing on frames ,but how can we know that a video contain how many images ? and number of frames a video contain is more than 1500 of 1 minute video.so can you guide me!!!!!!!!?

leandromoreira commented 3 years ago

@smoil-ali hi, you can use ffmpeg:

ffmpeg -y -i video.mp4 pictures_%3d.jpg
smoil-ali commented 3 years ago

@leandromoreira thanks for reply ,but i am talking about extracting image from video using c language and ffmpeg libraries.

leandromoreira commented 3 years ago

you can base your code on chapter 3 and change the output to be "pic_%d.jpg"

smoil-ali commented 3 years ago

i almost did that in android .but now i am stuck on something that i have video of 0.2 seconds , total number of frames is 74 , fps = 59/2 , i want to use seek functionality , for example i want to show frame for every second and i want get that frame by seek function to seconds.but it is not working ,i dont know why? in simple words i want to perform functionality like performed by this command ffmpeg -i input.flv -vf fps=1 out%d.png

wait a moment !!! is there any way that we can get coded program behing the command????

leandromoreira commented 3 years ago

https://github.com/FFmpeg/FFmpeg/blob/master/fftools/ffmpeg.c