Page 1 of 1

Start Capturing From S-Video

PostPosted: Fri Oct 25, 2013 4:56 pm
by eavci
I am trying to figure it out more than 3 days, but I can't established yet.

I want to capture from my Capture Card's S-Video connection (has Composite and S-Video Inputs) without using VideoCaptureDeviceForm each time.

When my program (C#) executed, I need to feed my VideoSourcePlayer with S-Video Source.

Please give a working code using VideoInput, CrossbarVideoInput or what type of code is needed.

Best Regards.

Re: Start Capturing From S-Video

PostPosted: Sun Oct 27, 2013 11:09 am
by andrew.kirillov
VideoCaptureDeviceForm is just a form aimed to help you to select video device and choose it's crossbar settings and resolution. You can do this all in your code using properties of the VideoCaptureDevice. Check source code of the VideoCaptureDeviceForm to see how it is done.

Re: Start Capturing From S-Video

PostPosted: Tue Oct 29, 2013 7:11 pm
by eavci
Sorry but, still I can't figured it out :(

Code: Select all
VideoCaptureDevice VideoKaynagi = new VideoCaptureDevice(VideoKaynaklari[GoruntuYakalamaKartiIndexNo-1].MonikerString);

VideoKaynagi.NewFrame  += new NewFrameEventHandler(VideoYeniKare);
VideoKaynagi.DesiredFrameSize = new Size(karegenislik, kareyukseklik);
VideoKaynagi.DesiredFrameRate = 25;
VideoKaynagi.CrossbarVideoInput = <Need how to set this property>

Re: Start Capturing From S-Video

PostPosted: Wed Oct 30, 2013 10:20 am
by andrew.kirillov
eavci wrote:still I can't figured it out :(

So reading documentation is not something you've used to do?

Re: Start Capturing From S-Video

PostPosted: Wed Oct 30, 2013 5:34 pm
by eavci
andrew.kirillov wrote:So reading documentation is not something you've used to do?

I read that document at least 100 times. But my coding skills isn't so good.

Documentation says;
"VideoInput CrossbarVideoInput { get; set; }"

I tried;

* VideoKaynagi.CrossbarVideoInput = (0,2);
* VideoKaynagi.CrossbarVideoInput = Videoinpt(0,2);
* VideoKaynagi.CrossbarVideoInput = {0,2};
* VideoKaynagi.CrossbarVideoInput = Videoinput{0,2};
* VideoKaynagi.CrossbarVideoInput = new Videoinput(0,2);
* Videoinput Girdi = new Videoinput;
***
**
*

But I can't write it right :(

As I say, my programming skills isn't that good. I just want someone give a simple working example :/

Re: Start Capturing From S-Video

PostPosted: Thu Oct 31, 2013 7:51 am
by andrew.kirillov
OK, documentation must be hard. VideoCaptureDivece.AvailableCrossbarVideoInputs gives array of available video inputs. VideoCaptureDivece.CrossbarVideoInput accepts what? - yes video input. So combine those two together:
Code: Select all
VideoKaynagi.CrossbarVideoInput  = CrossbarVideoInput.AvailableCrossbarVideoInputs [0];


Of course you need to change 0 with an index of the S-Video input.

Re: Start Capturing From S-Video

PostPosted: Thu Oct 31, 2013 9:08 pm
by eavci
andrew.kirillov wrote:OK, documentation must be hard. VideoCaptureDivece.AvailableCrossbarVideoInputs gives array of available video inputs. VideoCaptureDivece.CrossbarVideoInput accepts what? - yes video input. So combine those two together:
Code: Select all
VideoKaynagi.CrossbarVideoInput  = CrossbarVideoInput.AvailableCrossbarVideoInputs [0];


Of course you need to change 0 with an index of the S-Video input.


Thanks :-)
This was what I needed. Now I can start capturing from S-Video input directly :-)

Code: Select all
VideoKaynagi.CrossbarVideoInput = VideoKaynagi.AvailableCrossbarVideoInputs[1];

Re: Start Capturing From S-Video

PostPosted: Tue May 21, 2019 7:16 pm
by Frugglehost
Below is what I did in around about way...

Code: Select all

        // Collect supported video sources
        private void EnumeratedSource(VideoCaptureDevice videoDevice) {
           
            //Clear combo box of items.
            cb_Type.Items.Clear();

            //Check if the crossbar sources are available
            if (videoDevice.CheckIfCrossbarAvailable()) {
               
                //Loop through each one to get the name of the items.
                for (int i = 0; i < videoDevice.AvailableCrossbarVideoInputs.Count(); i++) {
                    cb_Type.Items.Add(videoDevice.AvailableCrossbarVideoInputs[i].Type.ToString());
                }
            
            //Default to the 1st one.
            if (cb_Type.Items.Count>1) cb_Type.SelectedIndex = 0;

                //Set the device to match the index of the combo box.
                videoDevice.CrossbarVideoInput = videoDevice.AvailableCrossbarVideoInputs[cb_Type.SelectedIndex];
            }else {
                cb_Type.Enabled = false;
            }

            //Go check Resolutions
            EnumeratedSupportedFrameSizes(videoDevice);
        }