Newbie here. This is my input.mp4 video, according to VLC:
codec
: H265 – MPEG-4 AVC (part 10) (avc1)Encoder
: Lavf58.29.100FPS
: 70.476432Resolution
: 1824 x 1216Duration
: 0m31s
I need to convert the video into a sequence of images. Is it possible to predict given the information above, how many frames I will get?
I tried two methods:
- Using OpenCV (basically with the command
cv2.imwrite(name, frame, [cv2.IMWRITE_TIFF_COMPRESSION, 1])
) - Using ffmpeg (
ffmpeg -i input.mp4 $filename%05d.tiff
)
With OpenCV I get 2246 TIFF files (~14 GB). With ffmpeg I get more than 17k TIFF files but I had to stop the operation (see below) when it had already generated ~49GB of files.
You can tell that I am not an expert in this since initially I thought that my conversion should be 2185 TIFF files (from 2185 frames, i.e. FPS
times Duration
). But then I read another post and changed my expectation.
Anyway, is there a reliable way to know how many frames I should expect when exporting my video in a lossless file format?
Detail about ffmpeg: I had to stop the operation because it was taking forever and finding lots of duplicates (I don't know why, will make a separate post). Last lines shown in the operation were as follow:
More than 1000 frames duplicatedN/A time=00:00:01.04 bitrate=N/A dup=976 drop=0 speed=0.0308x
More than 10000 frames duplicated/A time=00:00:10.74 bitrate=N/A dup=9989 drop=0 speed=0.0265x
frame=17673 fps= 26 q=-0.0 Lsize=N/A time=00:00:17.67 bitrate=N/A dup=16428 drop=0 speed=0.0262x