hi,
参照Multich_tristream_fullfeature.c 从camerLink里获得张yuv420sp,chId=2是已设置成JPG编码格式,其他通道chId=0或chId=1,如何更改参数使该幅图像编码成jpg图像,请TI方面的高手帮忙解决…
Ternence_Hsu:
你好;
你在Multich_tristream_fullfeature.c 修改 VENC_PRIMARY_CHANNELS 的值为 0 就可以了;
这样3路编码全部都会是按照 jpeg 进行编码的
lu xinjian:
回复 Ternence_Hsu:
修改了Multich_tristream_fullfeature.c 里的 VENC_PRIMARY_CHANNELS 的值为 0,有两处
1,
MULTICH_INIT_STRUCT(EncLink_CreateParams, encPrm); { EncLink_ChCreateParams *pLinkChPrm; EncLink_ChDynamicParams *pLinkDynPrm; VENC_CHN_DYNAMIC_PARAM_S *pDynPrm; VENC_CHN_PARAMS_S *pChPrm;
//for (i = 0; i < VENC_PRIMARY_CHANNELS; i++)//这一处修改为
for (i = 0; i < 0; i++)/
2,
//for (i = VENC_PRIMARY_CHANNELS; i < (VENC_CHN_MAX – 1); i++) //修改为
for (i = 0; i < 0; i++)
编译后运行出现这种故障
ln: /etc/localtime: File existsln: /etc/localtime: File existsApproDrvInit: 7queue id:131076TimeOut occure in boot_proc.Program exit.TimeOut occure in boot_proc.Program exit
另一种在ti_venc.h里修改
#define VENC_PRIMARY_CHANNELS (0)//(2)
编译后也出现上面结果
请问具体什么修改?
Chris Meng:
回复 lu xinjian:
你好,
你能否尝试修改下面的编码格式都为JPEG?
/* Video Encoder Link params */ MULTICH_INIT_STRUCT(EncLink_CreateParams, encPrm); { EncLink_ChCreateParams *pLinkChPrm; EncLink_ChDynamicParams *pLinkDynPrm; VENC_CHN_DYNAMIC_PARAM_S *pDynPrm; VENC_CHN_PARAMS_S *pChPrm; for (i = 0; i < VENC_PRIMARY_CHANNELS; i++) { pLinkChPrm = &encPrm.chCreateParams[i]; pLinkDynPrm = &pLinkChPrm->defaultDynamicParams; pChPrm = &gVencModuleContext.vencConfig.encChannelParams[i]; pDynPrm = &pChPrm->dynamicParam; switch(gUI_mcfw_config.demoCfg.codec_combo) { case 0: pLinkChPrm->format = IVIDEO_H264HP; break; //"SINGLE_H264" case 1: pLinkChPrm->format = IVIDEO_MPEG4SP; break; //"SINGLE_MPEG4" case 2: pLinkChPrm->format = IVIDEO_MJPEG; break; //"SINGLE_JPEG" case 3: pLinkChPrm->format = (i==0)? IVIDEO_H264HP:IVIDEO_MJPEG; break; //"H264_JPEG" case 4: pLinkChPrm->format = (i==0)? IVIDEO_MPEG4SP:IVIDEO_MJPEG; break; //"MPEG4_JPEG" case 5: pLinkChPrm->format = (i==0)? IVIDEO_H264HP:IVIDEO_H264HP; break; //"DUAL_H264" case 6: pLinkChPrm->format = (i==0)? IVIDEO_MPEG4SP:IVIDEO_MPEG4SP; break; //"DUAL_MPEG4" case 7: pLinkChPrm->format = (i==0)? IVIDEO_H264HP:IVIDEO_MPEG4SP; break; //"H264_MPEG4" case 8: pLinkChPrm->format = (i==0)? IVIDEO_H264HP:IVIDEO_H264HP; break; //"TRIPLE_H264" case 9: pLinkChPrm->format = (i==0)? IVIDEO_MPEG4SP:IVIDEO_MPEG4SP; break; //"TRIPLE_MPEG4" default: pLinkChPrm->format = IVIDEO_H264HP; }
lu xinjian:
回复 Chris Meng:
hi,你好
修改一处
MULTICH_INIT_STRUCT(EncLink_CreateParams, encPrm); { EncLink_ChCreateParams *pLinkChPrm; EncLink_ChDynamicParams *pLinkDynPrm; VENC_CHN_DYNAMIC_PARAM_S *pDynPrm; VENC_CHN_PARAMS_S *pChPrm;
for (i = 0; i < VENC_PRIMARY_CHANNELS; i++)//i < VENC_PRIMARY_CHANNELS { pLinkChPrm = &encPrm.chCreateParams[i]; pLinkDynPrm = &pLinkChPrm->defaultDynamicParams;
pChPrm = &gVencModuleContext.vencConfig.encChannelParams[i]; pDynPrm = &pChPrm->dynamicParam; gUI_mcfw_config.demoCfg.codec_combo = 2;//修改了一处 switch(gUI_mcfw_config.demoCfg.codec_combo) { case 0: pLinkChPrm->format = IVIDEO_H264HP; break; //"SINGLE_H264" case 1: pLinkChPrm->format = IVIDEO_MPEG4SP; break; //"SINGLE_MPEG4" case 2: pLinkChPrm->format = IVIDEO_MJPEG; break; //"SINGLE_JPEG" case 3: pLinkChPrm->format = (i==0)? IVIDEO_H264HP:IVIDEO_MJPEG; break; //"H264_JPEG" case 4: pLinkChPrm->format = (i==0)? IVIDEO_MPEG4SP:IVIDEO_MJPEG; break; //"MPEG4_JPEG" case 5: pLinkChPrm->format = (i==0)? IVIDEO_H264HP:IVIDEO_H264HP; break; //"DUAL_H264" case 6: pLinkChPrm->format = (i==0)? IVIDEO_MPEG4SP:IVIDEO_MPEG4SP; break; //"DUAL_MPEG4" case 7: pLinkChPrm->format = (i==0)? IVIDEO_H264HP:IVIDEO_MPEG4SP; break; //"H264_MPEG4" case 8: pLinkChPrm->format = (i==0)? IVIDEO_H264HP:IVIDEO_H264HP; break; //"TRIPLE_H264" case 9: pLinkChPrm->format = (i==0)? IVIDEO_MPEG4SP:IVIDEO_MPEG4SP; break; //"TRIPLE_MPEG4" default: pLinkChPrm->format = IVIDEO_H264HP; }
编译后还会出现这种故障现象,可能是还有其他的地方没有更改好
[host] Server Socket created with ID <23>queue id:0queue id:32769 [m3vpss ] Call to VNF_LINK_CMD_UPDATE_DCC -1queue id:0ln: /etc/localtime: File existsln: /etc/localtime: File existsApproDrvInit: 7queue id:131076TimeOut occure in boot_proc.Program exit.
Chris Meng:
回复 lu xinjian:
你好,
请问你是否保留了对VENC_PRIMARY_CHANNELS的修改?如果是,能否还原VENC_PRIMARY_CHANNELS的值,然后看看。
lu xinjian:
回复 Chris Meng:
是在原文件基础上修改,出现的故障现象
lu xinjian:
回复 lu xinjian:
保留了
for (i = 0; i < VENC_PRIMARY_CHANNELS; i++)//的VENC_PRIMARY_CHANNELS不变
更改
//for (i = VENC_PRIMARY_CHANNELS; i < (VENC_CHN_MAX – 1); i++)为
for (i = 0; i < (VENC_CHN_MAX – 1); i++)
也会上面出现的故障
另外一种方式把全局VENC_PRIMARY_CHANNELS更改定义为0也同样出现上面故障现象
按道理说是可以的,是否有初始化变量没同步改?
lu xinjian:
回复 lu xinjian:
如果按appro里面设置为单jpg输出格式,有没有作如下更改
for (i = 0; i < VENC_PRIMARY_CHANNELS; i++)//i < VENC_PRIMARY_CHANNELS { pLinkChPrm = &encPrm.chCreateParams[i]; pLinkDynPrm = &pLinkChPrm->defaultDynamicParams;
pChPrm = &gVencModuleContext.vencConfig.encChannelParams[i]; pDynPrm = &pChPrm->dynamicParam; gUI_mcfw_config.demoCfg.codec_combo = 2;//修改了一处 switch(gUI_mcfw_config.demoCfg.codec_combo) {
编译都不影响,用VLC能看到MJPEG流
运行提示发出的流如下
Initializing……done initializingPlay this stream using the URL: rtsp://192.168.1.168:8555/PSIA/Streaming/channels/0?videoCodecType=MJPEG
(We use port 8302 for optional RTSP-over-HTTP tunneling.)ApproDrvInit: 9queue id:131076Initializing……done initializingPlay this stream using the URL: rtsp://192.168.1.168:8556/PSIA/Streaming/channels/2?videoCodecType=H.264
(We use port 8303 for optional RTSP-over-HTTP tunneling.)ApproDrvInit: 2queue id:131076Initializing……done initializingPlay this stream using the URL: rtsp://192.168.1.168:8553/PSIA/Streaming/channels/1?videoCodecType=MPEG4
其中
rtsp://192.168.1.168:8553/PSIA/Streaming/channels/1?videoCodecType=MPEG4
rtsp://192.168.1.168:8556/PSIA/Streaming/channels/2?videoCodecType=H.264
这两个流用VLC是不能显示异常
用ps命令查看后台的进程仍有3个
601 root 67000 S ./wis-streamer -s 602 root 90444 R ./wis-streamer -s 603 root 67000 S ./wis-streamer -s
请问开机软件如何设置为单一的jpeg或多个都为jpg参数设置?而wis-streamer -s是在哪里开启相应的进程?