Error in AVVideoSettingsCompressed

Анастасия Зорина 0 Reputation points
2024-08-15T15:54:13.65+00:00
videoSettings = new AVVideoSettingsCompressed
{
    Codec = AVVideoCodec.H264,
    Width = 1078,
    Height = 1645,
};
var assetWriterInput = new AVAssetWriterInput("video", videoSettings);

Error: {ObjCRuntime.ObjCException: Objective-C exception thrown. Name: NSInvalidArgumentException Reason: *** -[AVAssetWriterInput initWithMediaType:outputSettings:sourceFormatHint:] Output settings dictionary is valid
How to solve this problem?

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,469 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Michael Taylor 54,311 Reputation points
    2024-08-15T18:30:37.9866667+00:00

    You are passing bad data. See here where someone had the exact same problem and was given a solution that seemed to work.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.