If you’re using an iOS device to collect data with ArcGIS Field Maps, you may run into an error when attaching large video files to the form. To avoid this problem, you can set up an iOS shortcut to reduce the file size of your video.
Shortcuts on iOS trigger a series of actions that are used to complete a task, such as reducing a video. After creating the shortcut, you can access it from the home screen of your device and from the Share Sheet in iOS, which can be helpful for exporting videos from other apps (e.g., Go Pro’s QUIKC app).
Shortcut on home screen and Share Sheet
In this step-by-step tutorial, you’ll learn how to create a shortcut that reduces the file size of a video and saves it as a new item on your device. We’ve published a public version of this shortcut if you’d like to use it as you follow along.
Note: The screenshots for this post were taken using an iPhone. If you’re using an iPad, the screens will look different.
Step 1—Tap on the Shortcuts app on your device’s home screen.
Alt text: Shortcuts app
Step 2—Once you’re in the app, tap the Add button to start creating a new shortcut.
Alt text: Add button
A builder appears where you can configure and create your shortcut.
New shortcut
Step 3—Change the title of the shortcut by tapping the drop-down menu next to New Shortcut and then tapping Rename. Rename the shortcut to something easily identifiable, such as Reduce Video.
Rename shortcut
Step 4—Tap the Info icon at the bottom of the screen.
Step 5—On the Details tab that appears, enable the Show in Share Sheet toggle button so the shortcut appears on the Share Sheet for other apps.
Shortcut details
Step 6—Tap Add to home Screen.
Here, you can customize how the shortcut appears on the home screen.
Customize shortcut appearance
Step 7—Return to the Shortcuts app.
Now, you’ll add a series of actions that, when triggered, will reduce the file size of a video. The actions will account for two scenarios:
The first action is added by default since you enabled the Show in Share Sheet toggle button.
Default Share Sheet action
Step 8—Tap Images and 18 more and tap Clear to unselect every option. Then enable the Media toggle button.
Unselect everything but Media
This ensures the shortcut will only appear in the Share Sheet when media is being shared (such as videos).
Step 9—In the Search bar, search for and add an If statement to the shortcut.
Add If statement to the shortcut
Step 10—Define the If statement as follows:
Before the shortcut reduces the video size, it will use this statement to determine whether the video is coming from a file’s share sheet, or if the user is selecting a video after tapping the shortcut on the home screen (and then prompts the user to select a video). The statement should look like the following image:
Alt text: Completed If statement
Step 11—Search for and add the Encode Media action.
Select Media and select If Result (which I’ve renamed to Selected Video), so the shortcut encodes the video selected by the user.
Encode Selected Video
Step 12—Next to Size, tap Passthrough and select Ask Each Time so users are prompted to select the new size of the video each item they use the shortcut.
Ask for size each time
Once configured, the Encode action should look like the following:
Configured Encode action
Step 13—Search for and add the Save to Photo Album action and change the action’s Input to Encoded Media.
Step 14—Search for and add the Photos Open Collection action and change Collection to Recents.
The final two actions will save the reduced video file to your recents album and then open that album to the file’s location.
Save and open the video
Step 15—Review your shortcut.
Review the shortcut to make sure your actions are configured properly. We've published a complete version of the shortcut you can use as reference (must be opened on an iOS device).
Step 16—Test your shortcut.
Once you’ve reviewed the shortcut, give it a try! Tap the Reduce Video shortcut from the home screen or share sheet, select the file size to reduce it to, and view the result in your recents photo album.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.