Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7761269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T14:05:36+00:00 2026-06-01T14:05:36+00:00

My basic requirement is to capture video using UIImagePickerController. The recording of video should

  • 0

My basic requirement is to capture video using UIImagePickerController. The recording of video should automatically stop after recording 10 seconds of video.

I am getting pretty weird error on iPad 2 (iOS ver 4.3) – “This movie format is not supported” when the video reaches its maximum duration on iPad2.

Here is my piece of code. The code works absolutely fine on iPhone, but gives – “This movie format is not supported” when the video reaches its maximum duration on iPad2.

Any help will be greatly appreciated.

(void) launchCamera : (BOOL) bAlbum         
    {   
    UIImagePickerController * pImgPicker = [[UIImagePickerController alloc] init];  
    pImgPicker.delegate = self;

    pImgPicker.mediaTypes =[UIImagePickerController availableMediaTypesForSourceType:pImgPicker.sourceType];
    if(m_bRecordVideo)
    {
        pImgPicker.sourceType = UIImagePickerControllerSourceTypeCamera;
        [pImgPicker setVideoQuality: UIImagePickerControllerQualityTypeMedium];
        [pImgPicker setCameraCaptureMode: UIImagePickerControllerCameraCaptureModeVideo];
        [pImgPicker setVideoMaximumDuration:10];
    }
    else
    {
        pImgPicker.sourceType = UIImagePickerControllerSourceTypeCamera;
        [pImgPicker setCameraCaptureMode: UIImagePickerControllerCameraCaptureModePhoto];
    }

    [self presentModalViewController:pImgPicker animated:YES];
    [pImgPicker release];
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T14:05:38+00:00Added an answer on June 1, 2026 at 2:05 pm

    I found the solution to above problem.

    The following line fixed the issue.

    pImgPicker.mediaTypes = [[[NSArray alloc] initWithObjects:(NSString*) kUTTypeMovie, nil] autorelease];

    Here is the updated code.

    -(void) launchCamera : (BOOL) bAlbum
    {
        UIImagePickerController * pImgPicker = [[UIImagePickerController alloc] init];
        pImgPicker.delegate = self;
    
        pImgPicker.mediaTypes =[UIImagePickerController availableMediaTypesForSourceType:pImgPicker.sourceType];
        if(m_bRecordVideo) 
        {
            pImgPicker.sourceType = UIImagePickerControllerSourceTypeCamera;
            pImgPicker.mediaTypes = [[[NSArray alloc] initWithObjects:(NSString*) kUTTypeMovie, nil] autorelease];
    
            [pImgPicker setVideoQuality: UIImagePickerControllerQualityTypeMedium];
            [pImgPicker setCameraCaptureMode: UIImagePickerControllerCameraCaptureModeVideo];
            [pImgPicker setVideoMaximumDuration:10];
        }
        else
        {
            pImgPicker.sourceType = UIImagePickerControllerSourceTypeCamera;
            [pImgPicker setCameraCaptureMode: UIImagePickerControllerCameraCaptureModePhoto];
        }
    
        [self presentModalViewController:pImgPicker animated:YES];
        [pImgPicker release];
    }
    

    Thanks,
    –Prem

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Entity Framework 4 in my project. One basic requirement is to
I am building a basic profiler for an open source project. One requirement is
Basic problem: We are currently busy developing a C# MVC3 web application, and after
I want to make an flipping card object which has three sides, basic requirement
What are the basic system requirement for installing asp.net mvc 2 application. Edited:- If
I have a pretty basic app flow that is quite linear, so it fits
I am writing a webpage for online quiz. The basic requirement I have is
My basic requirement is to draw a circle inside a BorderContainer with the layout
What are the default ./configuration option for PHP? My basic requirement is PDO and
I am trying to integrate Twitter into my application. My basic requirement is to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.