<div dir="ltr"><div>Thanks a lot Nicolas for your detailed analysis !!</div><div>Unfortunately moving to Gst 1.18+ is not an option for me (custom NVIDIA-based board with the usual lot of NVIDIA-proprietary stuff), therefore I guess I have to give up and move to something else :(</div><div>Thanks again and have a nice day!<br></div><div>Rob<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 28 Oct 2020 at 15:50, Nicolas Dufresne <<a href="mailto:nicolas@ndufresne.ca">nicolas@ndufresne.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Le mercredi 28 octobre 2020 à 12:54 +0100, Rob Heig a écrit :<br>
> Yes, sure, the same as above but it says that the input file is at 25<br>
> Hz and the output of deinterlace is at 50 Hz :(<br>
> On Wed, 28 Oct 2020 at 12:51, Tony Houghton <<a href="mailto:h@realh.co.uk" target="_blank">h@realh.co.uk</a>> wrote:<br>
> > Have you also tried framerate=25/1?<br>
> > <br>
> > On Wed, 28 Oct 2020 at 11:37, Rob Heig <<a href="mailto:robhhh6@gmail.com" target="_blank">robhhh6@gmail.com</a>> wrote:<br>
> > > Thanks for your reply! Yes I've did that, what I get is that<br>
> > > window that gets displayed has two frames one on top of the<br>
> > > other, still doubling the frame rate:<br>
> > > <br>
> > > gst-launch-1.0 -v filesrc location=vvvv.raw ! videoparse<br>
> > > width=768 height=576 format=4 framerate=50/1 interlaced=true !<br>
> > > videoconvert ! deinterlace ! autovideosink<br>
<br>
Appparently videoparse (same for rawvideoparse, it's replacement), only<br>
gives you a boolean for interlacing. While in practice, GStreamer caps<br>
uses an enum, interlace-mode={progressive, interleaved, alternate}.<br>
<br>
The last is only supported in 1.18+ and that method seems to be what<br>
you have in your raw video data according to the field height hack you<br>
have done.<br>
<br>
Progressive content is not interlaved. The most common way to store<br>
interlaced content is "interleaved", what is being assumed by<br>
rawvideoparse. In this mode, top and bottom fields are stored in the<br>
same buffer with full height, you'd have top fields line on even lines,<br>
and bottom field lines on odds lines (you have to set the field-order=<br>
in the caps if you have bottom field first).<br>
<br>
What you seem to have instead of alternate interlaced. In this case,<br>
each fields is passed as an half height image, alternating between<br>
images. This was added recently in gstreamer under a caps setter.<br>
Perhaps the author forgot to update and test with rawvideoparse, but I<br>
would try using upstream caps filter to communicate the settings<br>
properly to the parser (by enabling use-sink-caps property).<br>
<br>
... ! video/x-raw\(format:Interlaced\),interlace-mode=alternate,format=YUY2,width=768,height=576 ! rawvideoparse use-sink-caps=1 ! ...<br>
<br>
Ideally we could deprecate the bookean property and add a new property<br>
"interlace-mode" with the enum inside rawvideoparse. I'm not totally<br>
sure that this caps filter method will actually work. If not, please<br>
open an issue against gst-plugins-good.<br>
<br>
> > > <br>
> > > Setting pipeline to PAUSED ...<br>
> > > Pipeline is PREROLLING ...<br>
> > > /GstPipeline:pipeline0/GstVideoParse:videoparse0/GstRawVideoParse<br>
> > > :inner_rawvideoparse.GstPad:src: caps = video/x-raw,<br>
> > > format=(string)YUY2, width=(int)768, height=(int)576, interlace-<br>
> > > mode=(string)interleaved, pixel-aspect-ratio=(fraction)1/1,<br>
> > > chroma-site=(string)jpeg, colorimetry=(string)bt601,<br>
> > > framerate=(fraction)50/1<br>
> > > /GstPipeline:pipeline0/GstVideoParse:videoparse0.GstGhostPad:src:<br>
> > > caps = video/x-raw, format=(string)YUY2, width=(int)768,<br>
> > > height=(int)576, interlace-mode=(string)interleaved, pixel-<br>
> > > aspect-ratio=(fraction)1/1, chroma-site=(string)jpeg,<br>
> > > colorimetry=(string)bt601, framerate=(fraction)50/1<br>
> > > /GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:src:<br>
> > > caps = video/x-raw, width=(int)768, height=(int)576, interlace-<br>
> > > mode=(string)interleaved, pixel-aspect-ratio=(fraction)1/1,<br>
> > > framerate=(fraction)50/1, format=(string)YV12<br>
> > > /GstPipeline:pipeline0/GstDeinterlace:deinterlace0.GstPad:src:<br>
> > > caps = video/x-raw, width=(int)768, height=(int)576, interlace-<br>
> > > mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1,<br>
> > > framerate=(fraction)100/1, format=(string)YV12<br>
> > > /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0.GstGhostPa<br>
> > > d:sink.GstProxyPad:proxypad2: caps = video/x-raw, width=(int)768,<br>
> > > height=(int)576, interlace-mode=(string)progressive, pixel-<br>
> > > aspect-ratio=(fraction)1/1, framerate=(fraction)100/1,<br>
> > > format=(string)YV12<br>
> > > /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstXvImage<br>
> > > Sink:autovideosink0-actual-sink-xvimage.GstPad:sink: caps =<br>
> > > video/x-raw, width=(int)768, height=(int)576, interlace-<br>
> > > mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1,<br>
> > > framerate=(fraction)100/1, format=(string)YV12<br>
> > > /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0.GstGhostPa<br>
> > > d:sink: caps = video/x-raw, width=(int)768, height=(int)576,<br>
> > > interlace-mode=(string)progressive, pixel-aspect-<br>
> > > ratio=(fraction)1/1, framerate=(fraction)100/1,<br>
> > > format=(string)YV12<br>
> > > /GstPipeline:pipeline0/GstDeinterlace:deinterlace0.GstPad:sink:<br>
> > > caps = video/x-raw, width=(int)768, height=(int)576, interlace-<br>
> > > mode=(string)interleaved, pixel-aspect-ratio=(fraction)1/1,<br>
> > > framerate=(fraction)50/1, format=(string)YV12<br>
> > > /GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:sink:<br>
> > > caps = video/x-raw, format=(string)YUY2, width=(int)768,<br>
> > > height=(int)576, interlace-mode=(string)interleaved, pixel-<br>
> > > aspect-ratio=(fraction)1/1, chroma-site=(string)jpeg,<br>
> > > colorimetry=(string)bt601, framerate=(fraction)50/1<br>
> > > /GstPipeline:pipeline0/GstVideoParse:videoparse0.GstGhostPad:src.<br>
> > > GstProxyPad:proxypad1: caps = video/x-raw, format=(string)YUY2,<br>
> > > width=(int)768, height=(int)576, interlace-<br>
> > > mode=(string)interleaved, pixel-aspect-ratio=(fraction)1/1,<br>
> > > chroma-site=(string)jpeg, colorimetry=(string)bt601,<br>
> > > framerate=(fraction)50/1<br>
> > > Pipeline is PREROLLED ...<br>
> > > Setting pipeline to PLAYING ...<br>
> > > New clock: GstSystemClock<br>
> > > Got EOS from element "pipeline0".<br>
> > > Execution ended after 0:00:03.000241651<br>
> > > Setting pipeline to PAUSED ...<br>
> > > Setting pipeline to READY ...<br>
> > > Setting pipeline to NULL ...<br>
> > > Freeing pipeline ...<br>
> > > <br>
> > > On Wed, 28 Oct 2020 at 12:11, Tony Houghton <<a href="mailto:h@realh.co.uk" target="_blank">h@realh.co.uk</a>><br>
> > > wrote:<br>
> > > > It seems more conventional to refer to the total frame height<br>
> > > > rather than the height of each field, so have you tried using<br>
> > > > "height=576" instead?<br>
> > > > <br>
> > > > On Wed, 28 Oct 2020 at 11:00, Rob Heig <<a href="mailto:robhhh6@gmail.com" target="_blank">robhhh6@gmail.com</a>><br>
> > > > wrote:<br>
> > > > > Hello,<br>
> > > > > I'm trying to deinterlace an interlaced raw video, but<br>
> > > > > despite having spent 2 days on this I am still stuck. The<br>
> > > > > interesting thing is that, by looking at the output of gst-<br>
> > > > > launch, I see weird results:<br>
> > > > > <br>
> > > > > gst-launch-1.0 -v filesrc location=vvvv.raw ! videoparse<br>
> > > > > width=768 height=288 format=4 framerate=50/1 interlaced=true<br>
> > > > > ! videoconvert ! deinterlace ! autovideosink<br>
> > > > > <br>
> > > > > Setting pipeline to PAUSED ...<br>
> > > > > Pipeline is PREROLLING ...<br>
> > > > > /GstPipeline:pipeline0/GstVideoParse:videoparse0/GstRawVideoP<br>
> > > > > arse:inner_rawvideoparse.GstPad:src: caps = video/x-raw,<br>
> > > > > format=(string)YUY2, width=(int)768, height=(int)288,<br>
> > > > > interlace-mode=(string)interleaved, pixel-aspect-<br>
> > > > > ratio=(fraction)1/1, chroma-site=(string)jpeg,<br>
> > > > > colorimetry=(string)bt601, framerate=(fraction)50/1<br>
> > > > > /GstPipeline:pipeline0/GstVideoParse:videoparse0.GstGhostPad:<br>
> > > > > src: caps = video/x-raw, format=(string)YUY2, width=(int)768,<br>
> > > > > height=(int)288, interlace-mode=(string)interleaved, pixel-<br>
> > > > > aspect-ratio=(fraction)1/1, chroma-site=(string)jpeg,<br>
> > > > > colorimetry=(string)bt601, framerate=(fraction)50/1<br>
> > > > > /GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:s<br>
> > > > > rc: caps = video/x-raw, width=(int)768, height=(int)288,<br>
> > > > > interlace-mode=(string)interleaved, pixel-aspect-<br>
> > > > > ratio=(fraction)1/1, framerate=(fraction)50/1,<br>
> > > > > format=(string)YV12<br>
> > > > > /GstPipeline:pipeline0/GstDeinterlace:deinterlace0.GstPad:src<br>
> > > > > : caps = video/x-raw, width=(int)768, height=(int)288,<br>
> > > > > interlace-mode=(string)progressive, pixel-aspect-<br>
> > > > > ratio=(fraction)1/1, framerate=(fraction)100/1,<br>
> > > > > format=(string)YV12<br>
> > > > > /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0.GstGho<br>
> > > > > stPad:sink.GstProxyPad:proxypad2: caps = video/x-raw,<br>
> > > > > width=(int)768, height=(int)288, interlace-<br>
> > > > > mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1,<br>
> > > > > framerate=(fraction)100/1, format=(string)YV12<br>
> > > > > /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstXvI<br>
> > > > > mageSink:autovideosink0-actual-sink-xvimage.GstPad:sink: caps<br>
> > > > > = video/x-raw, width=(int)768, height=(int)288, interlace-<br>
> > > > > mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1,<br>
> > > > > framerate=(fraction)100/1, format=(string)YV12<br>
> > > > > /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0.GstGho<br>
> > > > > stPad:sink: caps = video/x-raw, width=(int)768,<br>
> > > > > height=(int)288, interlace-mode=(string)progressive, pixel-<br>
> > > > > aspect-ratio=(fraction)1/1, framerate=(fraction)100/1,<br>
> > > > > format=(string)YV12<br>
> > > > > /GstPipeline:pipeline0/GstDeinterlace:deinterlace0.GstPad:sin<br>
> > > > > k: caps = video/x-raw, width=(int)768, height=(int)288,<br>
> > > > > interlace-mode=(string)interleaved, pixel-aspect-<br>
> > > > > ratio=(fraction)1/1, framerate=(fraction)50/1,<br>
> > > > > format=(string)YV12<br>
> > > > > /GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:s<br>
> > > > > ink: caps = video/x-raw, format=(string)YUY2, width=(int)768,<br>
> > > > > height=(int)288, interlace-mode=(string)interleaved, pixel-<br>
> > > > > aspect-ratio=(fraction)1/1, chroma-site=(string)jpeg,<br>
> > > > > colorimetry=(string)bt601, framerate=(fraction)50/1<br>
> > > > > /GstPipeline:pipeline0/GstVideoParse:videoparse0.GstGhostPad:<br>
> > > > > src.GstProxyPad:proxypad1: caps = video/x-raw,<br>
> > > > > format=(string)YUY2, width=(int)768, height=(int)288,<br>
> > > > > interlace-mode=(string)interleaved, pixel-aspect-<br>
> > > > > ratio=(fraction)1/1, chroma-site=(string)jpeg,<br>
> > > > > colorimetry=(string)bt601, framerate=(fraction)50/1<br>
> > > > > Pipeline is PREROLLED ...<br>
> > > > > Setting pipeline to PLAYING ...<br>
> > > > > New clock: GstSystemClock<br>
> > > > > ERROR: from element<br>
> > > > > /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstXvI<br>
> > > > > mageSink:autovideosink0-actual-sink-xvimage: Output window<br>
> > > > > was closed<br>
> > > > > Additional debug info:<br>
> > > > > xvimagesink.c(555): gst_xv_image_sink_handle_xevents ():<br>
> > > > > /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstXvI<br>
> > > > > mageSink:autovideosink0-actual-sink-xvimage<br>
> > > > > Execution ended after 0:00:02.956028008<br>
> > > > > Setting pipeline to PAUSED ...<br>
> > > > > Setting pipeline to READY ...<br>
> > > > > Setting pipeline to NULL ...<br>
> > > > > Freeing pipeline ...<br>
> > > > > <br>
> > > > > I would naively expect the deinterlace plugin to take a 50<br>
> > > > > Hz, 720x288 interlaced video and give as output a 25 Hz,<br>
> > > > > 720x576 one.<br>
> > > > > Instead, the resolution stays the same, while the frame rate<br>
> > > > > doubles.... ????<br>
> > > > > I have tested this on gstreamer 1.45 and gstreamer 1.6.<br>
> > > > > Am I missing anything?<br>
> > > > > Thanks in advance for all suggestions!<br>
> > > > > Best,<br>
> > > > > Rob<br>
> > > > > <br>
> > > > > _______________________________________________<br>
> > > > > gstreamer-devel mailing list<br>
> > > > > <a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
> > > > > <br>
> > > > > <a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
> > > > <br>
> > > > <br>
> > > > -- <br>
> > > > TH<br>
> > > > _______________________________________________<br>
> > > > gstreamer-devel mailing list<br>
> > > > <a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
> > > > <a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
> > > _______________________________________________<br>
> > > gstreamer-devel mailing list<br>
> > > <a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
> > > <a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
> > <br>
> > <br>
> > _______________________________________________<br>
> > gstreamer-devel mailing list<br>
> > <a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
> > <a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br>
<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div>