Skip to content

Instantly share code, notes, and snippets.

@samsonjs
Created September 27, 2024 17:41
Show Gist options
  • Save samsonjs/7d30573cfecebbef63488a45945bc4cd to your computer and use it in GitHub Desktop.
Save samsonjs/7d30573cfecebbef63488a45945bc4cd to your computer and use it in GitHub Desktop.
AVFoundation error on spatial videos
Failed to append audio sample buffer CMSampleBuffer 0x1360948c0 retainCount: 3 allocator: 0x1fc343380
invalid = NO
dataReady = YES
makeDataReadyCallback = 0x0
makeDataReadyRefcon = 0x0
formatDescription = <CMAudioFormatDescription 0x30353c420 [0x1fc343380]> {
mediaType:'soun'
mediaSubType:'lpcm'
mediaSpecific: {
ASBD: {
mSampleRate: 48000.000000
mFormatID: 'lpcm'
mFormatFlags: 0x9
mBytesPerPacket: 24
mFramesPerPacket: 1
mBytesPerFrame: 24
mChannelsPerFrame: 6
mBitsPerChannel: 32 }
cookie: {(null)}
ACL: {(null)}
FormatList Array: {
Index: 0
ChannelLayoutTag: 0xffff0000
ASBD: {
mSampleRate: 48000.000000
mFormatID: 'lpcm'
mFormatFlags: 0x9
mBytesPerPacket: 24
mFramesPerPacket: 1
mBytesPerFrame: 24
mChannelsPerFrame: 6
mBitsPerChannel: 32 }}
}
extensions: {(null)}
}
sbufToTrackReadiness = 0x0
numSamples = 8192
outputPTS = {0/48000 = 0.000}(based on outputPresentationTimeStamp)
sampleTimingArray[1] = {
{PTS = {0/48000 = 0.000}, DTS = {INVALID}, duration = {1/48000 = 0.000}},
}
sampleSizeArray[1] = {
sampleSize = 24,
}
dataBuffer = {
CMBlockBuffer 0x30303cfc0 totalDataLength: 196608 retainCount: 1 allocator: 0x1fc343380 subBlockCapacity: 2
[0] 196608 bytes @ offset 128 Buffer Reference:
CMBlockBuffer 0x30303d0e0 totalDataLength: 196968 retainCount: 1 allocator: 0x1fc343380 subBlockCapacity: 2
[0] 196968 bytes @ offset 0 Memory Block 0x10d6f4000, 196968 bytes (custom V=0 A=0x0 F=0x1a40d51a8 R=0x303d384b0)
}
to
input <AVAssetWriterInput: 0x3000292d0, mediaType = soun, outputSettings = {
AVFormatIDKey = 1633772320;
AVNumberOfChannelsKey = 2;
AVSampleRateKey = 44100;
}>
Finished encoding audio
Finished encoding video
error: writeFailure(Optional(Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSLocalizedFailureReason=An unknown error occurred (-12780), NSLocalizedDescription=The operation could not be completed, NSUnderlyingError=0x300cb2a60 {Error Domain=NSOSStatusErrorDomain Code=-12780 "(null)"}}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment