mfw_f4lsrc does not work corretly if 'preview=false'

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

mfw_f4lsrc does not work corretly if 'preview=false'

跳至解决方案
1,265 次查看
RobbieJiang
Contributor IV

Hi all,

We have a platform with MX51/Linux-2.6.31.

The video input is from a TVP5150 chip in Bt.656 mode.

The working pipeline is as follows:

gst-launch mfw_v4lsrc sensor-width=720 sensor-height=288 capture-width=640 capture-height=480 preview=true preview-width=640 preview-height=480 ! 'video/x-raw-yuv, format=(fourcc)NV12, width=640, height=480, framerate=25/1' ! clockoverlay ! mfw_vpuencoder codec-type=std_avc width=640 height=480 ! filesink location=video.264

Everything  goes well with the above pipeline.

However, if we try to set the 'preview' property of mfw_v4lsrc to false,

the pipeline does not report any error, but the image /video we get in the file sink is not correct as desired.

IMHO,  the preview / display module in IPU should not have anything to do with the video capture.

But the fact seems my opinion is wrong.

How to explain this?

Is it possible to disable preview while capturing video?

Robbie

标签 (3)
1 解答
798 次查看
RobbieJiang
Contributor IV

OK. We have solved the problem.

In the source code of mfw_v4lsrc,  VIDIOC_S_CROP is not called when 'preview' property is false.

This ioctl sets the crop region of the active video output, which finally sets the CSIx_ACT_FRM_SIZE register.

After adding such a ioctl call even if 'preview=false' in the source code of mfw_v4lsrc element,

we can get the video stream from mfw_v4lsrc correctly.

在原帖中查看解决方案

3 回复数
799 次查看
RobbieJiang
Contributor IV

OK. We have solved the problem.

In the source code of mfw_v4lsrc,  VIDIOC_S_CROP is not called when 'preview' property is false.

This ioctl sets the crop region of the active video output, which finally sets the CSIx_ACT_FRM_SIZE register.

After adding such a ioctl call even if 'preview=false' in the source code of mfw_v4lsrc element,

we can get the video stream from mfw_v4lsrc correctly.

798 次查看
didier1
Contributor I

hello,

Could you explain the changes you have made, I also have a problem if preview is enabled? (video "rolling")
thank you

0 项奖励
798 次查看
RobbieJiang
Contributor IV

You need to modify the source code of the 'mfw_v4lsrc' element,

by adding a ioctl(VIDOC_S_CROP,xxx) call even when 'preview==false'.

And rebuild the mfw_v4lsrc element, of course.

0 项奖励