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 8495253
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T23:31:21+00:00 2026-06-10T23:31:21+00:00

Problem: When I record a video in my UIImagePickerController with allowsEditing set to YES,

  • 0

Problem:

When I record a video in my UIImagePickerController with allowsEditing set to YES, and afterwards trim the video by using the trim-interface that comes after video capture, I get returned the original video, instead of the trimmed one.

Setup:

I am using a UIImagePickerController for video capture, with the allowsEditing property set to YES. In the delegate method didFinishPickingMediaWithInfo, I use UIImagePickerControllerMediaURLfrom the info NSDictionary to get the path URL. The official Apple docs don’t mention any Edited video URL unfortunately.

Code:

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
    NSString *mediaType = [info objectForKey: UIImagePickerControllerMediaType];

    if (CFStringCompare ((__bridge CFStringRef) mediaType, kUTTypeMovie, 0)
        == kCFCompareEqualTo) {

        self.tempVideoPath = [[info objectForKey:
                                UIImagePickerControllerMediaURL] path];
    }
}

I realise this question is similar to other ones posted here on SO, but there was no definitive answer why it doesn’t work or why the option is even there. If it is intended like this, I don’t understand why there is an ‘allowsEditing’ property for the picker.

EDIT: In the info dictionary I got back are the following keys:

info: {
    UIImagePickerControllerMediaType = "public.movie";
    UIImagePickerControllerMediaURL = "file://localhost/private/var/mobile/Applications/F12E4608-FE5A-4EE3-B4E2-8F7D2508C4C8/tmp/capture-T0x21d810.tmp.wabFCC/capturedvideo.MOV";
    "_UIImagePickerControllerVideoEditingEnd" = "5.498333333333333";
    "_UIImagePickerControllerVideoEditingStart" = "4.273402690887451";
}

Does this mean we have to trim it ourselves with this data? Then the Apple documentation isn’t very clear about this. If so, do you know a good practice for this?

  • 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-10T23:31:22+00:00Added an answer on June 10, 2026 at 11:31 pm

    take a look at the highlighted answer on this post:

    How to trim the video using AVFoundation

    I think it’s exactly what you want. The answer uses UIImagePickerController too

    Hope it helps,
    Mário

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

Sidebar

Related Questions

Hello i have the following problem, I record a video using red5 like this:
In my application, the user can record a video using the UIImagePickerController, and I
I have an app that allows a user to record a video with UIImagePickerController
I'm facing a problem while deleting a record that is referenced by another table.
Hi i am using rails and active record and there is some problem with
I need to play and record at the same time. The problem is that
My app uses the UIImagePickerController to record a video, and I'm then uploading it
I'm using Devise and I'm trying to set up an invite code that the
I have a project where I need to record a video using DirectShow from
I have an application that has the possibility to record a video and 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.