相关疑难解决方法(0)

H.264流的序列/图像参数集的可能位置

我正在研究H.264解码器,我想知道在哪里可以找到SPS和PPS.我的参考文献告诉我那些是在H.264-Stream中编码的NAL单元,但是当我查看一个带有IsoViewer的示例-MP4-File时,它说SPS和PPS在avcC Box中.

这究竟是如何工作的?它如何查找.mkv文件或其他H.264容器?

提前致谢!

parameters mp4 set h.264 mkv

74
推荐指数
1
解决办法
5万
查看次数

在VTDecompressionSessionCreate中解码H264 VideoToolkit API失败,错误为-8971

我正在尝试使用硬件支持的视频工具包解码器编写视频解码器.但是,如果我尝试初始化解码会话,如下面发布的示例,我在调用VTDecompressionSessionCreate时收到错误-8971.谁能告诉我这里做错了什么?

感谢你并致以真诚的问候,

奥利弗

OSStatus status;

int tmpWidth = sps.EncodedWidth();
int tmpHeight = sps.EncodedHeight();
NSLog(@"Got new Width and Height from SPS - %dx%d", tmpWidth, tmpHeight);

const VTDecompressionOutputCallbackRecord callback = { ReceivedDecompressedFrame, self };
status = CMVideoFormatDescriptionCreate(NULL,
                                       kCMVideoCodecType_H264,
                                       tmpWidth,
                                       tmpHeight,
                                       NULL,
                                       &decoderFormatDescription);

if (status == noErr)
{
    // Set the pixel attributes for the destination buffer
    CFMutableDictionaryRef destinationPixelBufferAttributes = CFDictionaryCreateMutable(
                                                                 NULL, // CFAllocatorRef allocator
                                                                 0,    // CFIndex capacity
                                                                 &kCFTypeDictionaryKeyCallBacks, 
                                                                 &kCFTypeDictionaryValueCallBacks);

    SInt32 destinationPixelType = kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange;
    CFDictionarySetValue(destinationPixelBufferAttributes,kCVPixelBufferPixelFormatTypeKey, CFNumberCreate(NULL, kCFNumberSInt32Type, &destinationPixelType));
    CFDictionarySetValue(destinationPixelBufferAttributes,kCVPixelBufferWidthKey, CFNumberCreate(NULL, kCFNumberSInt32Type, &tmpWidth)); …
Run Code Online (Sandbox Code Playgroud)

macos xcode video-processing h.264 ios

9
推荐指数
2
解决办法
6510
查看次数

标签 统计

h.264 ×2

ios ×1

macos ×1

mkv ×1

mp4 ×1

parameters ×1

set ×1

video-processing ×1

xcode ×1