The Video Toolbox framework (VideoToolbox.framework) includes direct access to hardware video encoding and decoding in iOS and OSX.
Questions tagged [video-toolbox]
117 questions
1
vote
0 answers
VTDecompressionSessionCreate gives error -12911
I am using Video toolbox to decode H264 frames received via RTSP. Everything goes well, but after 5 days of usage (without restarting the phone) I get error -12911 when trying to create a new decompression session. It doesn't recover if I delete and…

Beny Cosma
- 86
- 5
1
vote
0 answers
How to extract motion vectors from H.264 AVC CMBlockBufferRef after VTCompressionSessionEncodeFrame
I'm trying read or understand CMBlockBufferRef representation of H.264 AVC 1/30 frame.
The buffer and the encapsulating CMSampleBufferRef is created by using VTCompressionSessionRef.
https://gist.github.com/petershine/de5e3d8487f4cfca0a1d
H.264 data…

petershine
- 3,190
- 1
- 25
- 49
1
vote
1 answer
Extracting H.264 NAL Units from a MPEG transport stream?
How can I extract the H.264 NAL units from an MPEG Transport Stream on the iOS platform? Is there anything in the VideoToolbox or AVFoundation that can help me with this? Do I have to parse the stream myself?

John Fowler
- 3,173
- 3
- 18
- 31
1
vote
1 answer
VTCompressionSessionEncodeFrame error code -12902
I have a function that takes a CVImageBufferRef and passes it to my VTCompressionSession for processing.
The VTCompressionSession is started and my call to VTCompressionSessionCreate is successful.
I am retrieving a video URL from the photo library…

JuJoDi
- 14,627
- 23
- 80
- 126
1
vote
0 answers
Video playback Mirroring prevention workaround
Environment
Xcode @ OS-X Yosemite
iOS App @ Obj-C
Use-case
Quicktime mirroring session is set between the iOS & the OSX (How do I set up a mirroring session between iOS 8 and Yosemite? )
A 3rd party SDK is integrated with the iOS app
The SDK is…

NadavRub
- 2,520
- 27
- 63
1
vote
0 answers
Memory leak in CVPixelBufferPoolCreatePixelBuffer
At the moment I am debugging some code. What it does it reads movie file into frames array, applies some transformations to the frames and compiles everything back to the video file. I have fixed all memory leaks which were called by myself the…

tna0y
- 1,842
- 3
- 16
- 33
1
vote
0 answers
iOS: VideoToolBox decompress h263 Video abnormal
I am working on H263 decompression with VideoToolBox.but when decoding 4CIF video stream, the output pixel data are all 0 value, and there is no error info.
I don't know why this happened, as video stream with CIF resolution is decompressed…

Ian Harris
- 11
- 3
0
votes
0 answers
Does VTDecompressionSession support smoothing frames via presentationTimestamp (to fix stuttering)
I noticed the API for VT decompression (VTDecompressionSessionDecodeFrameWithOutputHandler) takes a presentationTimestamp, and there is also an argument kVTDecodeFrame_EnableTemporalProcessing that is used to reorder frames.
I am having a problem…

Locksleyu
- 5,192
- 8
- 52
- 77
0
votes
0 answers
decode H264 B frame without timeStamp
I use videoToolBox to decode H264 and use metal to render it.
I found the B frames in the raw stream, but when I watch out the value of the callback function presentTimeStamp.valid, it returns false.
how I could decode h264 using videoToolBox in…

shan yu
- 3
- 2
0
votes
0 answers
ffmpeg transparent HVEC video from alpha matte and color video
I have an alpha.mp4 (alpha matte video) and a color.mp4 (color video). How do I use ffmpeg to make a transparent HVEC (.mov) video?
I can combine with ffmpeg to make a .webm file following the instruction here:
https://www.unscreen.com/api under…

James
- 65
- 1
- 8
0
votes
1 answer
Error Code -8969 Decoding, and AVCC Contents
I am writing a RTSP client with Flutter SDK that is also using the Apple VideoToolKit API for the HW decoder. I will refrain from posting code at the moment because I think it would just be easier to explain.
I'm using wireshark to inspect contents…

cap
- 45
- 1
- 11
0
votes
1 answer
Copying Image Buffer Output From Video Frame Decompression Callback
I am new to Swift and need to utilize VideoToolBox API for H264 decoder. My application is written with Flutter SDK and am utilizing MethodChannel() class for invoking Swift functions. To decode frames, function VTDecompressionSessionDecodeFrame()…

cap
- 45
- 1
- 11
0
votes
1 answer
VideoToolbox hardware encoded I frame not clear on Intel Mac
When I captured video from camera on Intel Mac, used VideoToolbox to hardware encode raw pixel buffers to H.264 codec slices, I found that the VideoToolbox encoded I frame not clear, causing it looks like blurs every serveral seconds. Below are…

Smeegol
- 2,014
- 4
- 29
- 44
0
votes
0 answers
Memory leak creating a CVPixelBuffer in Swift using VTPixelTransferSessionTransferImage
I am using VTPixelTransferSessionTransferImage to modify the size and pixel format of a CVPixelBuffer. I am struggling to get to the bottom of a memory leak using this code block.
I have found several similar issues but all of the solutions are…

DanM
- 121
- 8
0
votes
0 answers
How to compress an HDR video
I have been trying to use VTCompressionSession to compress an HDR video recorded on iPhone - but it comes out as very "washed out". I tried using HEVC codec as well, but that still gives me the same result.
Any ideas on how to do this?

user3500462
- 125
- 7