mfw_f4lsrc does not work corretly if 'preview=false'

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

mfw_f4lsrc does not work corretly if 'preview=false'

Jump to solution
1,232 Views
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

Labels (3)
1 Solution
765 Views
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.

View solution in original post

3 Replies
766 Views
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.

765 Views
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 Kudos
765 Views
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 Kudos