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

42 Ansichten (letzte 30 Tage)
Matt Reaves
Matt Reaves am 19 Feb. 2015
Kommentiert: Emma D'Esopo am 8 Feb. 2021
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?

Antworten (2)

TripleCaffeine
TripleCaffeine am 23 Nov. 2017
Bearbeitet: TripleCaffeine am 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 am 16 Dez. 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 Kommentare
Walter Roberson
Walter Roberson am 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.
Emma D'Esopo
Emma D'Esopo am 8 Feb. 2021
Ahh, major oversight indeed. Thank you, Walter!

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

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

Start Hunting!

Translated by