Michal R

Streaming rescaled videos

Discussion created by Michal R on Mar 6, 2012
Latest reply on Mar 29, 2012 by Michal R


I am trying to stream rescaled, encoded video via ethernet. When I am using this line:

gst-launch-0.10 -vvv mfw_v4lsrc sensor-width=720 sensor-height=576 capture-width=720 capture-height=576 ! mfw_vpuencoder codec-type=std_avc ! video/x-h264,width=720,height=576 ! rtph264pay ! udpsink host= port=1234 sync=false async=true

everything goes fine, but video is interlaced. I can rescale it like this:

gst-launch-0.10 -vvv mfw_v4lsrc sensor-width=360 sensor-height=288 capture-width=360 capture-height=288 ! mfw_vpuencoder codec-type=std_avc ! video/x-h264,width=360,height=288 ! rtph264pay ! udpsink host= port=1234 sync=false async=true

video goes fine, but it is still interlaced. When I perform this procedure:

*** some .c file ***


#define VIDIOC_S_INPUT          _IOWR ('V', 39, int)

int main(int argc, char *argv[])
   int fd, status;
   fd = open("/dev/video0", O_RDWR);
   if(fd == -1)


   status = 1;

    if (ioctl(fd, VIDIOC_S_INPUT, &status) < 0) {
         printf("ioctl failed: %s\n", strerror(errno));
*** end of some .c file ***

video is deinterlaced and streaming it without rescaling is ok. When I try to rescale only messed up video is sent. When I try to display deinterlaced and scaled video on LCD (ex. Using ximagesink) it goes fine.


Do you have any idea how to properly deinterlace and rescale video so encoder is able to handle it? Or maybe you know how to use mfw_deinterlacer plugin because so far according to my experiments and observation it does nothing with video stream.