3

I grabbed frame in RGB24 format but when i convert it to Bitmap image is not like what VMR is showing and it's cropped I'm trying to grab frame from DVB-S device using DirectShow BDA the channel resolution is 720x576 but i get 704x480???

Hesam Faridmehr
  • 1,176
  • 8
  • 20
  • The APIs you are referring to work reliably and as expected. The problem you are having is taking place because you do something wrong, and you need to post more details to understand what is wrong exactly. – Roman R. Jun 07 '15 at 17:09
  • What kind of details do you need? – Hesam Faridmehr Jun 07 '15 at 20:27
  • You need to show how you set the streaming up, or how other would guess what are you doing with the graph. – Roman R. Jun 08 '15 at 06:05
  • is not the graph image i provided enough? and what do you mean by streaming up? – Hesam Faridmehr Jun 08 '15 at 09:40
  • so tell me what should i provide exactly? cuz i didn't get it from your last comment – Hesam Faridmehr Jun 08 '15 at 09:51
  • You need to look at the connection MediaType to get the correct values for the width and height in th callback. Why do you have different Video-Decoders in your graph? And shouln't there be Null-Renderer after the SampleGrabber? – CPlusSharp Jun 08 '15 at 10:27
  • All the MediaTypes are 704x480 and samplegrabber works without null renderer. Microsoft video decoder mediatypes are videoinfo2 and i can't grab them with sample grabber cuz it just supports videoinfo – Hesam Faridmehr Jun 08 '15 at 10:33
  • Does the VideoTee or the Mpeg2-Demux also set this width/height in its output pin or just the mainconcept? What size does the Mircosoft Mpeg2 Decoder set on it's output? – CPlusSharp Jun 08 '15 at 10:45
  • Mpeg2-Demux give me Mepg2Video, Video Decoders(mainconcept contains VideoInfo and VideoInfo2 thats why i'm using it) give me different color space such as YUY NV12 RGB24 RGB32 all with 704x480. Color spaces which are VideoInfo2 have aspect 16x9 but i can not grab them with sample grabber – Hesam Faridmehr Jun 08 '15 at 10:57
  • Are you sure the video is cropped and not not stretched? The 720x576 sounds like PAL and the 704x480 more like NTSC. Maybe the MainConcept decoder has a problem. Have you tried to disable or enable the hardware-acceleration in the mainconcept filter? Have you tried to connect the mainconcept to the videorenderer? Is it the same cropped image? – CPlusSharp Jun 08 '15 at 11:07
  • I used FFDShow too and i had the same problem. Yes i connected Mainconcept to VMR and it was working OK. How can i disable or enable the hardware-acceleration in the mainconcept filter? I know i'm doing something wrong but i don't know what – Hesam Faridmehr Jun 08 '15 at 11:18
  • Can you provide sample images, of what you get and what you expected. You can configure the mainconcept decoder with the property page or if you have the sdk with it's IModuleConfig Interface. Is this problem only on this channel or on other channels too? – CPlusSharp Jun 08 '15 at 11:23
  • That's what i expect http://tinypic.com/r/169f8dy/8 and that's what i get http://tinypic.com/r/zmefdt/8 and it occurs in all channels – Hesam Faridmehr Jun 08 '15 at 11:36
  • If you have (supposedly) incorrect resolution in compressed video media type, then apparently you will have it through decoders to renderers. What makes you think you should get 720x576? You should have seen correct resolution at least somewhere in the pipeline, esp. on MPEG-2 TS demultiplexer output pins. – Roman R. Jun 08 '15 at 12:44
  • 1
    Thank you both i finally find the way to make it right it was wrong decoder config :) Thanks a lot – Hesam Faridmehr Jun 08 '15 at 13:12
  • @user1926477 It would be very helpful and appreciated if you could post your solution as an answer to this question, so others in the future can benefit from it :) +1 for the question! – Ian Sep 30 '15 at 11:57

1 Answers1

0

I think problem was with my filters

I just used LVAFilter and connect it to MPEGDemux and then connect SampleGrabber to LAVFilter and set MediaType to RGB24

It solved the problem

Hesam Faridmehr
  • 1,176
  • 8
  • 20