How to convert a GIF file to a AVI file?

19 ビュー (過去 30 日間)
Anjan Goswami
Anjan Goswami 2020 年 5 月 26 日
コメント済み: shawn luo 2024 年 3 月 14 日
I want to convert a GIF file to a video file (AVI or mp4). How can I do that using MATLAB?
  4 件のコメント
Adam Danz
Adam Danz 2020 年 5 月 26 日
An example of a loop is given in the documentation for the im2frame function.
Anjan Goswami
Anjan Goswami 2020 年 5 月 26 日
編集済み: Anjan Goswami 2020 年 5 月 26 日
Sorry sir, I have gone through the example loop but it is not convincing for my case. The number of images was already mentioned as Eight in the example. However, how can I know the number of images of my gif animation. Also, are you recommending to use im2frame to convert the images of the gif animation to movie frames and then calling all frames to write a video? Sorry for my ignorance.

サインインしてコメントする。

採用された回答

Adam Danz
Adam Danz 2020 年 5 月 26 日
I've written a function that converts GIF --> AVI based on Walter's 2018 answer.
gif2avi(file) will convert the gif file to avi and will save it to your current directory. See the documentation for that function for additional inputs.
Let me know if you have an problems.
  5 件のコメント
Anjan Goswami
Anjan Goswami 2020 年 5 月 26 日
Thank you, sir.
shawn luo
shawn luo 2024 年 3 月 14 日
but usually the size of my converted avi files (from gif ) are much bigger than that of the original gif file, like 400MB compared to 2MB, is this normal ? I use the 2.0.0 version

サインインしてコメントする。

その他の回答 (0 件)

製品


リリース

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by