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

조회 수: 47 (최근 30일)
Matt Reaves
Matt Reaves 2015년 2월 19일
댓글: Emma D'Esopo 2021년 2월 8일
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?

답변 (2개)

TripleCaffeine
TripleCaffeine 2017년 11월 23일
편집: TripleCaffeine 2017년 11월 23일
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 2020년 12월 16일
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
Walter Roberson
Walter Roberson 2021년 1월 7일
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 2021년 2월 8일
Ahh, major oversight indeed. Thank you, Walter!

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Audio and Video Data에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by