is it possible to get an h.264 progressive stream file output from an interlaced NTSC camera using GStreamer?

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

is it possible to get an h.264 progressive stream file output from an interlaced NTSC camera using GStreamer?

2,280 Views
erwinw
Contributor III

I've tried several GStreamer plug-ins so far, but haven't figured out how to get a progressive h.264 file from an interlaced video camera source.

I am able to display an encoded h.264 stream using:
gst-launch-0.10 filesrc location=<path to file> ! mfw_vpu_decoder ! mfw_v4lsink

I tried to output the uncompressed YUV stream to a file using:
gst-launch-0.10 filesrc location=<path to file> ! mfw_vpu_decoder ! mfw_v4lsink dump-location=<output file>
but I get a 'Device or resource busy' error during pthread_destroy.

I also tried the following:
gst-launch-0.10 mfw_v4lsrc ! mfw_deinterlacer !  mfw_vpu_encoder ! filesink location=<output file>
to no avail.

Do you know if it's possible to get an h.264 progressive stream file output from an interlaced NTSC camera using GStreamer?
Also, I noticed the version of GSTreamer that ltib installed was 0.10, but the latest version on GStreamer's website is 1.0. Should/can I update to 1.0? Are there any known patches for the Freescale plug-ins/codecs that I need to apply?

5 Replies

1,151 Views
LeonardoSandova
Specialist I

Hi Erwin,

as a work-around for this pipeline:

     gst-launch-0.10 filesrc location=<path to file> ! mfw_vpu_decoder ! mfw_v4lsink dump-location=<output file>

You can try

     gst-launch filesrc location=./fsl-clip-1080p.264 ! mfw_vpudecoder ! multifilesink location=`pwd`/"frame%d"

Now, regarding the de-interlace problem,  what is the log when the above pipeline is executed:

     export GST_DEBUG=GST_ELEMENT_FACTORY:3

      gst-launch mfw_v4lsrc ! mfw_deinterlacer !  mfw_vpu_encoder ! filesink location=<output file>


Can you please share a raw interlaced file (perhaps a few frames) so I can test this file on my side? You can produce the latter using


     gst-launch mfw_v4lsrc num-buffers=100 ! filesink location=interlaced.yuv

0 Kudos

1,151 Views
erwinw
Contributor III

From the tech support at Freescale:

>Do you know if it's possible to get an h.264 progressive stream file

>output from an interlaced NTSC camera using GStreamer?

Sorry GStreamer does not support interlaced input, customer should add such support himself.

>Also, I noticed the version of GSTreamer that ltib installed was 0.10,

>but the latest version on GStreamer's website is 1.0.

>Should/can I update to 1.0? Are there any known patches for the

>Freescale plug-ins/codecs that I need to apply?

Sorry, no patches are available.

Please accept our apologies for any inconvenience this may cause.

1,151 Views
johnw
Contributor III

I believe that what FSL tech support was trying to say was that their plugin for v4l2 source does not support an interlaced input.  This does not mean it could not be modified to support it.  That also depends on the V4L2 driver for the IPU, and if that driver supports deinterlacing.

0 Kudos

1,151 Views
johnw
Contributor III

Erwin Wolniewitz wrote:

From the tech support at Freescale:

>Do you know if it's possible to get an h.264 progressive stream file

>output from an interlaced NTSC camera using GStreamer?

Sorry GStreamer does not support interlaced input, customer should add such support himself.

This is actually not true.  gstreamer itself does not impose a limitation and actually does provide support for deinterlacing.  http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good-plugins/html/gst-plugins-g...

>Also, I noticed the version of GSTreamer that ltib installed was 0.10,

>but the latest version on GStreamer's website is 1.0.

>Should/can I update to 1.0? Are there any known patches for the

>Freescale plug-ins/codecs that I need to apply?

Sorry, no patches are available.

Please accept our apologies for any inconvenience this may cause.

There are some API differences between 1.0 and 0.10.xx that are important.  I don't believe that FSL plans to migrate their gst plugins to 1.0 anytime soon, but that doesn't mean that someone else couldn't do it themselves.

I don't have an i.MX53 board handy, but gst-inspect on an i.MX6 does seem to pertain only to progressive inputs (e.g. CMOS image sensors).

0 Kudos

1,151 Views
johnw
Contributor III

Hi Erwin,

I haven't tried an interlaced input, but I have been able to capture progressive input using something like this:

gst-launch mfs_v4lsrc <options>  ! vpuenc ! mp4mux ! filesink location=<filename>

What platform are you using?  Sabre-Lite?  SDB?  What inputs are providing an interlaced input stream?  How can one replicate your setup?

John