Search code examples
video-capturevideo-processingmatlab

convert video file format matlab


I have many small video clips in different formats (.avi, .mpg, etc). I want to convert all the files to .mp4 format using matlab.

The reason for the conversion is: I am extracting frames from videos and save them as images. but when I use .mpg, .avi formats I am unable to determine the number of frames in each video clip.

So I need to convert the files to .mp4 format. Could you please let me know are there any way to do it using matlab.

Thanks


Solution

  • Make use of FFMpeg to convert and then read the output using MATLAB. for instance;

    ffmpeg -i myfile.avi myfile.mp4
    

    Readme Link