Comments (2)
Apple reply:
Is the AVAsset a QuickTime movie file (.mov) or an MPEG file (e.g., .mp4)? These correspond to the UTI types AVFileTypeQuickTimeMovie and AVFileTypeMPEG4.
If so, have you tried:
-
open the source file using AVMutableMovie
-
update the metadata using its metadata property and replace with the new or updated AVMetadataItem(s)
-
rewrite the movie header back to the file using the AVMovie method defined in AVMovie.h:
- (BOOL)writeMovieHeaderToURL:(NSURL *)URL fileType:(AVFileType)fileType options:(AVMovieWritingOptions)options error:(NSError * _Nullable * _Nullable)outError;
Use the AVMovieWritingAddMovieHeaderToDestination AVMovieWritingOptions value to rewrite the header to the movie file while leaving existing media data in place. You may want to do this in a copy of the source media file.
There’s a WWDC 2015 session video “Editing Movies in AVFoundation” that introduces the API at https://developer.apple.com/wwdc15/506.
If the AVAsset is for other kinds of files than movie files, please let us know the kinds of assets that are important to you for such support.
from reports.
My reply:
Thanks for sharing. That is very useful. My use-case is editing the metadata of audio (M4A) files. I’ll try to see if it works with audio-only files too.
I do think it would be useful to have an easy to use API on AVAsset for this (and for video). For example, await AVAsset.setMetadata([AVMetadataItem], for url: URL)
.
from reports.
Related Issues (20)
- FB12069584: Check iPhone's battery level from Control Center
- FB7681076: Apps dragged from a non-retina display to a retina display don't preview in retina resolution HOT 1
- FB10316411: Cannot include Live Captions on-screen controls in screenshots
- FB10837391: Menu bar text is doubled in size after unlocking Mac
- FB10849326: Apple Watch should continue sleep tracking after you wake up to catch you falling back asleep
- FB11519699: Sports news confuses two similarly named universities
- FB11711277: Phone cannot call phone numbers with commas
- FB13457371: Unsending a “Happy birthday” iMessage still sends balloons HOT 1
- FB7657943: Mac Catalyst audio apps should implement a mini player
- FB7582792: Mac Catalyst apps do not hide the cursor when scrolling with arrow keys
- FB12099502: Move cursor by a single pixel on a Retina display
- FB12426370: Sentences ending with a period followed by a number aren’t recognized as separate sentences
- FB12703339: Cannot record screen in Music with 9:41 in titlebar, only blue AirPlay icon
- FB13462772: Messages still makes sounds in-app if notification sounds are turned off
- FB9093710: fn key is ignored when posting a CGEvent HOT 1
- FB13723947: PhotoBooth repeatably creates corrupt videos
- FB13727682: SwiftUI scrollable TextFields not rendering correctly in certain autocomplete cases HOT 1
- FB13800080: Recording/microphone does not work as expected when running automated tests HOT 1
- FB13807432: Add .gradient to ShapeStyle
- FB13807436: Expose the underlying color of a view's tint
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reports.