在ti8168平台,用DVRRDK_04.01.00.02,对于一些mpeg4的码流格式,硬件解码异常。这些格式我存成码流文件,在ffmpeg下可以正常解码。
rdk的版本为:DVRRDK_04.01.00.02,解码出错打出的消息为:
[m3video] 1365241:WARN
[m3video] DECLINK:ERROR in Declink_mpeg4DecodeFrameBatch.Status[-1]
[m3video] 1365246:DECLINK::links_m3video/iva_dec/decLink_mpeg4.c:[289]::INTERNAL ERROR:-1
[m3video] ALGPROCESS FAILED:STATUS
[m3video] outArgs->viddec3OutArgs.extendedError for channel 0 Error: 0x501400
错误码对应的信息是,没有获取到视频头信息。
对于一些mpeg4,倒是可以解码。就是一部分的mpeg4无法解码。
附件是出错的视频码流,是纯视频码流文件。用ffmpeg的解码命令为: ffplay -i m4v -f in_mp4_err2.mpg4,可以正常解码播放。
这个问题该如何解决?
Chris Meng:
你好,
我使用DVRRDK_04.01.00.02原始代码,可以正常解码你提供的mpeg4码流(700 x 526)。请问你是否对代码做过什么修改?
Siment Lin:
回复 Chris Meng:
你是怎么解码的,因为这个不是264的,你是怎么读取一帧的码流,再送入解码link的呢?我使用ffmpeg的读取码流再送入的。
multich_xxx里面,对解码的配置代码能贴出了我看看吗?
我的代码为:
//dec for (i=0; i<ipcBitsoutHostPrm.inQueInfo.numCh; i++){if( gVdecModuleContext.vdecConfig.decChannelParams[0].isCodec == VDEC_CHN_H264 ){decPrm.chCreateParams[i].format = 9; //IVIDEO_H264HPdecPrm.chCreateParams[i].profile = 3;//IH264VDEC_PROFILE_ANY}else if( gVdecModuleContext.vdecConfig.decChannelParams[0].isCodec == VDEC_CHN_MPEG4 ){decPrm.chCreateParams[i].format = 6;//IVIDEO_MPEG4ASPdecPrm.chCreateParams[i].profile = 0;}else if( gVdecModuleContext.vdecConfig.decChannelParams[0].isCodec == VDEC_CHN_MPEG2 ){decPrm.chCreateParams[i].format = 4;//IVIDEO_MPEG2HPdecPrm.chCreateParams[i].profile = 0;}else if( gVdecModuleContext.vdecConfig.decChannelParams[0].isCodec == VDEC_CHN_MJPEG ){decPrm.chCreateParams[i].format = 24;//IVIDEO_MJPEGdecPrm.chCreateParams[i].profile = 0;
}else{decPrm.chCreateParams[i].format = 9; //IVIDEO_H264HPdecPrm.chCreateParams[i].profile = 3;//IH264VDEC_PROFILE_ANY}decPrm.chCreateParams[i].targetMaxWidth = ipcBitsoutHostPrm.inQueInfo.chInfo[i].width;decPrm.chCreateParams[i].targetMaxHeight = ipcBitsoutHostPrm.inQueInfo.chInfo[i].height;decPrm.chCreateParams[i].defaultDynamicParams.targetFrameRate =gVdecModuleContext.vdecConfig.decChannelParams[i].dynamicParam.frameRate;//30decPrm.chCreateParams[i].defaultDynamicParams.targetBitRate =gVdecModuleContext.vdecConfig.decChannelParams[i].dynamicParam.targetBitRate;//just for dec, not for enc
decPrm.chCreateParams[i].numBufPerCh = gVdecModuleContext.vdecConfig.decChannelParams[i].numBufPerCh; //dec的输出内存, 4 decPrm.chCreateParams[i].dpbBufSizeInFrames = IH264VDEC_DPB_NUMFRAMES_AUTO;decPrm.chCreateParams[i].displayDelay = gVdecModuleContext.vdecConfig.decChannelParams[i].displayDelay;//0decPrm.chCreateParams[i].processCallLevel = VDEC_FRAMELEVELPROCESSCALL; decPrm.chCreateParams[i].tilerEnable = FALSE;//TURE FALSEdecPrm.chCreateParams[i].enableWaterMarking = FALSE;}decPrm.inQueParams.prevLinkId = ipcBitsInVedioId;decPrm.inQueParams.prevLinkQueId = 0;decPrm.outQueParams.nextLink = ipcDecFramesOutVideoId;
从文件中读取一帧,是用ffmpeg读取的。
提示的错误为:
[m3video] 218431:WARN[m3video] DECLINK:ERROR in Declink_mpeg4DecodeFrameBatch.Status[-1][m3video] 218447:DECLINK::links_m3video/iva_dec/decLink_mpeg4.c:[289]::INTERNAL ERROR:-1[m3video] ALGPROCESS FAILED:STATUS[m3video] outArgs->viddec3OutArgs.extendedError for channel 0 Error: 0x501400[m3video] 218448:WARN[m3video] DECLINK:ERROR in Declink_mpeg4DecodeFrameBatch.Status[-1][m3video] 218464:DECLINK::links_m3video/iva_dec/decLink_mpeg4.c:[289]::INTERNAL ERROR:-1[m3video] ALGPROCESS FAILED:STATUS[m3video] outArgs->viddec3OutArgs.extendedError for channel 0 Error: 0x501400[m3video] 218465:WARN[m3video] DECLINK:ERROR in Declink_mpeg4DecodeFrameBatch.Status[-1][m3video] 218484:DECLINK::links_m3video/iva_dec/decLink_mpeg4.c:[289]::INTERNAL ERROR:-1[m3video] ALGPROCESS FAILED:STATUS[m3video] outArgs->viddec3OutArgs.extendedError for channel 0 Error: 0x501400[m3video] 218485:WARN[m3video] DECLINK:ERROR in Declink_mpeg4DecodeFrameBatch.Status[-1][m3video] 218503:DECLINK::links_m3video/iva_dec/decLink_mpeg4.c:[289]::INTERNAL ERROR:-1[m3video] ALGPROCESS FAILED:STATUS[m3video] outArgs->viddec3OutArgs.extendedError for channel 0 Error: 0x501400[m3video] 218503:WARN[m3video] DECLINK:ERROR in Declink_mpeg4DecodeFrameBatch.Status[-1][m3video] 218806:DECLINK::links_m3video/iva_dec/decLink_mpeg4.c:[289]::INTERNAL ERROR:-1
Siment Lin:
回复 Chris Meng:
你是怎么解码的,因为这个不是264的,你是怎么读取一帧的码流,再送入解码link的呢?我使用ffmpeg的读取码流再送入的。
你的multich_xxx里面,对解码的配置代码能贴出来我看看吗?
我的代码为:
//dec for (i=0; i<ipcBitsoutHostPrm.inQueInfo.numCh; i++){if( gVdecModuleContext.vdecConfig.decChannelParams[0].isCodec == VDEC_CHN_H264 ){decPrm.chCreateParams[i].format = 9; //IVIDEO_H264HPdecPrm.chCreateParams[i].profile = 3;//IH264VDEC_PROFILE_ANY}else if( gVdecModuleContext.vdecConfig.decChannelParams[0].isCodec == VDEC_CHN_MPEG4 ){decPrm.chCreateParams[i].format = 6;//IVIDEO_MPEG4ASPdecPrm.chCreateParams[i].profile = 0;}else if( gVdecModuleContext.vdecConfig.decChannelParams[0].isCodec == VDEC_CHN_MPEG2 ){decPrm.chCreateParams[i].format = 4;//IVIDEO_MPEG2HPdecPrm.chCreateParams[i].profile = 0;}else if( gVdecModuleContext.vdecConfig.decChannelParams[0].isCodec == VDEC_CHN_MJPEG ){decPrm.chCreateParams[i].format = 24;//IVIDEO_MJPEGdecPrm.chCreateParams[i].profile = 0;
}else{decPrm.chCreateParams[i].format = 9; //IVIDEO_H264HPdecPrm.chCreateParams[i].profile = 3;//IH264VDEC_PROFILE_ANY}decPrm.chCreateParams[i].targetMaxWidth = ipcBitsoutHostPrm.inQueInfo.chInfo[i].width;decPrm.chCreateParams[i].targetMaxHeight = ipcBitsoutHostPrm.inQueInfo.chInfo[i].height;decPrm.chCreateParams[i].defaultDynamicParams.targetFrameRate =gVdecModuleContext.vdecConfig.decChannelParams[i].dynamicParam.frameRate;//30decPrm.chCreateParams[i].defaultDynamicParams.targetBitRate =gVdecModuleContext.vdecConfig.decChannelParams[i].dynamicParam.targetBitRate;//just for dec, not for enc
decPrm.chCreateParams[i].numBufPerCh = gVdecModuleContext.vdecConfig.decChannelParams[i].numBufPerCh; //dec的输出内存, 4 decPrm.chCreateParams[i].dpbBufSizeInFrames = IH264VDEC_DPB_NUMFRAMES_AUTO;decPrm.chCreateParams[i].displayDelay = gVdecModuleContext.vdecConfig.decChannelParams[i].displayDelay;//0decPrm.chCreateParams[i].processCallLevel = VDEC_FRAMELEVELPROCESSCALL; decPrm.chCreateParams[i].tilerEnable = FALSE;//TURE FALSEdecPrm.chCreateParams[i].enableWaterMarking = FALSE;}decPrm.inQueParams.prevLinkId = ipcBitsInVedioId;decPrm.inQueParams.prevLinkQueId = 0;decPrm.outQueParams.nextLink = ipcDecFramesOutVideoId;
从文件中读取一帧,是用ffmpeg读取的。
提示的错误为:
[m3video] 218431:WARN[m3video] DECLINK:ERROR in Declink_mpeg4DecodeFrameBatch.Status[-1][m3video] 218447:DECLINK::links_m3video/iva_dec/decLink_mpeg4.c:[289]::INTERNAL ERROR:-1[m3video] ALGPROCESS FAILED:STATUS[m3video] outArgs->viddec3OutArgs.extendedError for channel 0 Error: 0x501400[m3video] 218448:WARN[m3video] DECLINK:ERROR in Declink_mpeg4DecodeFrameBatch.Status[-1][m3video] 218464:DECLINK::links_m3video/iva_dec/decLink_mpeg4.c:[289]::INTERNAL ERROR:-1[m3video] ALGPROCESS FAILED:STATUS
Siment Lin:
回复 Chris Meng:
你是怎么解码的,因为这个不是264的,你是怎么读取一帧的码流,再送入解码link的呢?我使用ffmpeg的读取码流再送入的。
multich_xxx里面,对解码的配置代码能贴出了我看看吗?
我的代码为:
//dec for (i=0; i<ipcBitsoutHostPrm.inQueInfo.numCh; i++){if( gVdecModuleContext.vdecConfig.decChannelParams[0].isCodec == VDEC_CHN_H264 ){decPrm.chCreateParams[i].format = 9; //IVIDEO_H264HPdecPrm.chCreateParams[i].profile = 3;//IH264VDEC_PROFILE_ANY}else if( gVdecModuleContext.vdecConfig.decChannelParams[0].isCodec == VDEC_CHN_MPEG4 ){decPrm.chCreateParams[i].format = 6;//IVIDEO_MPEG4ASPdecPrm.chCreateParams[i].profile = 0;}else if( gVdecModuleContext.vdecConfig.decChannelParams[0].isCodec == VDEC_CHN_MPEG2 ){decPrm.chCreateParams[i].format = 4;//IVIDEO_MPEG2HPdecPrm.chCreateParams[i].profile = 0;}else if( gVdecModuleContext.vdecConfig.decChannelParams[0].isCodec == VDEC_CHN_MJPEG ){decPrm.chCreateParams[i].format = 24;//IVIDEO_MJPEGdecPrm.chCreateParams[i].profile = 0;
}else{decPrm.chCreateParams[i].format = 9; //IVIDEO_H264HPdecPrm.chCreateParams[i].profile = 3;//IH264VDEC_PROFILE_ANY}decPrm.chCreateParams[i].targetMaxWidth = ipcBitsoutHostPrm.inQueInfo.chInfo[i].width;decPrm.chCreateParams[i].targetMaxHeight = ipcBitsoutHostPrm.inQueInfo.chInfo[i].height;decPrm.chCreateParams[i].defaultDynamicParams.targetFrameRate =gVdecModuleContext.vdecConfig.decChannelParams[i].dynamicParam.frameRate;//30decPrm.chCreateParams[i].defaultDynamicParams.targetBitRate =gVdecModuleContext.vdecConfig.decChannelParams[i].dynamicParam.targetBitRate;//just for dec, not for enc
decPrm.chCreateParams[i].numBufPerCh = gVdecModuleContext.vdecConfig.decChannelParams[i].numBufPerCh; //dec的输出内存, 4 decPrm.chCreateParams[i].dpbBufSizeInFrames = IH264VDEC_DPB_NUMFRAMES_AUTO;decPrm.chCreateParams[i].displayDelay = gVdecModuleContext.vdecConfig.decChannelParams[i].displayDelay;//0decPrm.chCreateParams[i].processCallLevel = VDEC_FRAMELEVELPROCESSCALL; decPrm.chCreateParams[i].tilerEnable = FALSE;//TURE FALSEdecPrm.chCreateParams[i].enableWaterMarking = FALSE;}decPrm.inQueParams.prevLinkId = ipcBitsInVedioId;decPrm.inQueParams.prevLinkQueId = 0;decPrm.outQueParams.nextLink = ipcDecFramesOutVideoId;
从文件中读取一帧,是用ffmpeg读取的。
提示的错误为:
[m3video] 218431:WARN[m3video] DECLINK:ERROR in Declink_mpeg4DecodeFrameBatch.Status[-1][m3video] 218447:DECLINK::links_m3video/iva_dec/decLink_mpeg4.c:[289]::INTERNAL ERROR:-1[m3video] ALGPROCESS FAILED:STATUS[m3video] outArgs->viddec3OutArgs.extendedError for channel 0 Error: 0x501400[m3video] 218448:WARN[m3video] DECLINK:ERROR in Declink_mpeg4DecodeFrameBatch.Status[-1][m3video] 218464:DECLINK::links_m3video/iva_dec/decLink_mpeg4.c:[289]::INTERNAL ERROR:-1[m3video] ALGPROCESS FAILED:STATUS[m3video] outArgs->viddec3OutArgs.extendedError for channel 0 Error: 0x501400[m3video] 218465:WARN[m3video] DECLINK:ERROR in Declink_mpeg4DecodeFrameBatch.Status[-1][m3video] 218484:DECLINK::links_m3video/iva_dec/decLink_mpeg4.c:[289]::INTERNAL ERROR:-1[m3video] ALGPROCESS FAILED:STATUS[m3video] outArgs->viddec3OutArgs.extendedError for channel 0 Error: 0x501400[m3video] 218485:WARN[m3video] DECLINK:ERROR in Declink_mpeg4DecodeFrameBatch.Status[-1][m3video] 218503:DECLINK::links_m3video/iva_dec/decLink_mpeg4.c:[289]::INTERNAL ERROR:-1[m3video] ALGPROCESS FAILED:STATUS[m3video] outArgs->viddec3OutArgs.extendedError for channel 0 Error: 0x501400[m3video] 218503:WARN[m3video] DECLINK:ERROR in Declink_mpeg4DecodeFrameBatch.Status[-1][m3video] 218806:DECLINK::links_m3video/iva_dec/decLink_mpeg4.c:[289]::INTERNAL ERROR:-1
Siment Lin:
回复 Chris Meng:
你的代码能贴出了吗?
Siment Lin:
回复 Chris Meng:
我试了,demo确实可以解码。
问题解决了,不是rdk这边的问题,是ffmepg的获取帧数据的问题。
smile1:
回复 Siment Lin:
是不是ffmpeg 获取的不是一帧完整的帧数据呢;