VideoWriter Profiles Missing ("The specified profile is not valid.")

135 views (last 30 days)
Hello, I'm trying to run some code on a new computer, and my video writer software is not working. I would like to create a VideoWriter object with the 'Grayscale AVI' profile, but "The specified profile is not valid." When I run VideoWriter.getProfiles(), I only have 'Motion Jpeg AVI' and 'Uncompressed AVI'. Where do I get the other standard profiles?

Answers (2)

TripleCaffeine
TripleCaffeine on 23 Nov 2017
Edited: TripleCaffeine on 23 Nov 2017
This is an old question but I just came across the same problem. most of this info is taken from the videowriter() help file.
'Profile' in this case means video encoding format e.g. '.avi' etc. check to see if you have it in two places. if your file name has the extension in it then you may not need the extra extension -> this is valid and works (2017a)
v = VideoWriter('newfile.avi');
Taking the available help file profile info you can choose from the following:
'Archival' Motion JPEG 2000 file with lossless compression
'Motion JPEG AVI' AVI file using Motion JPEG encoding
'Motion JPEG 2000' Motion JPEG 2000 file
'MPEG-4' MPEG-4 file with H.264 encoding (systems with Windows 7 or later, or Mac OS X 10.7 and later)
'Uncompressed AVI' Uncompressed AVI file with RGB24 video
'Indexed AVI' Uncompressed AVI file with indexed video
'Grayscale AVI' Uncompressed AVI file with grayscale video profile sets default values for video properties such as VideoCompressionMethod.

Bui Mai Quynh Linh
Bui Mai Quynh Linh on 16 Dec 2020
Have the same problems. I need 'MPEG-4', while my profiles only have:
Archival Video file compression with JPEG 2000 codec with lossless mode enabled.
Grayscale AVI An AVI file with Grayscale Video Data
Indexed AVI An AVI file with Indexed Video Data
Motion JPEG 2000 Video file compression with JPEG 2000 codec.
Motion JPEG AVI An AVI file with Motion JPEG compression
Uncompressed AVI An AVI file with uncompressed RGB24 video data
  3 Comments
Walter Roberson
Walter Roberson on 7 Jan 2021
MPEG-4 MPEG-4 file with H.264 encoding (systems with Windows 7 or later, or macOS 10.7 and later)
Notice that does not mention Linux.

Sign in to comment.

Categories

Find more on Convert Image Type in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!