Can not Stream 2Channel Video from capture card

This forum is about all development around libVLC.
jin1818
New Cone
New Cone
Posts: 2
Joined: 13 Nov 2014 02:51

Can not Stream 2Channel Video from capture card

Postby jin1818 » 13 Nov 2014 03:29

I receive input the video source in the capture card that has two hdmi port .

I will attempt to run rtsp streaming to have two video sources .

I already , two of the video file was the rtsp streaming in the following code .

Code: Select all

inst = libvlc_new(0, NULL); libvlc_vlm_add_broadcast(inst, "Server2", "D:\\DEEPSEA_3D.Title1.mp4", "#transcode{vcodec=h264, vb=3000, venc=x264{vbv-maxrate=3000, vbv-bufsize=6000, bpyramid=none, weightp=0}, width=960, height=1080}::rtp{sdp=rtsp://:5545/}", 0, NULL, TRUE, TRUE); libvlc_vlm_add_broadcast(inst, "Server", "D:\\DEEPSEA_3D.Title2.mp4", "#transcode{vcodec=h264, vb=3000, venc=x264{vbv-maxrate=3000, vbv-bufsize=6000, bpyramid=none, weightp=0}, width=960, height=1080}:rtp{sdp=rtsp://:5544/}", 0, NULL, TRUE, TRUE); libvlc_vlm_play_media(inst, "Server"); libvlc_vlm_play_media(inst, "Server2");
It will be streaming well .

However , I changed the input argument to obtain the video from the capture card .
Code that changed the arguments are as follows .

Code: Select all

inst = libvlc_new(0, NULL); libvlc_vlm_add_broadcast(inst, "Server", "dshow:// vdev=\"AVerMedia HD Capture 1\"", "#transcode{vcodec=h264, vb=3000, venc=x264{vbv-maxrate=3000, vbv-bufsize=6000, bpyramid=none, weightp=0}, width=960, height=1080}::rtp{sdp=rtsp://:5545/}", 0, NULL, TRUE, TRUE); libvlc_vlm_add_broadcast(inst, "Server2", "dshow:// vdev=\"AverMedia HD Capture 2\"", "#transcode{vcodec=h264, vb=3000, venc=x264{vbv-maxrate=3000, vbv-bufsize=6000, bpyramid=none, weightp=0}, width=960, height=1080}:rtp{sdp=rtsp://:5544/}", 0, NULL, TRUE, TRUE); libvlc_vlm_play_media(inst, "Server"); libvlc_vlm_play_media(inst, "Server2");
It is only streaming one video .

What are the solutions ?
I expect an answer .

Thank you.

jin1818
New Cone
New Cone
Posts: 2
Joined: 13 Nov 2014 02:51

Re: Can not Stream 2Channel Video from capture card

Postby jin1818 » 13 Nov 2014 07:07

I solved the problem . ,, The value of the incorrect parameters has been a problem .

Code: Select all

const char * const vlmargs[] = { "dshow-vdev=AVerMedia HD Capture 2", }; const char * const vlmargs2[] = { "dshow-vdev=AVerMedia HD Capture 1", }; libvlc_vlm_add_broadcast(inst, "Server", "dshow://", "#transcode{vcodec=h264, vb=3000, venc=x264{vbv-maxrate=3000, vbv-bufsize=6000, bpyramid=none, weightp=0}, width=960, height=1080}::rtp{sdp=rtsp://:5544/}", sizeof(vlmargs2)/ sizeof(vlmargs2[0]), vlmargs2, TRUE, TRUE); libvlc_vlm_add_broadcast(inst, "Server2", "dshow://", "#transcode{vcodec=h264, vb=3000, venc=x264{vbv-maxrate=3000, vbv-bufsize=6000, bpyramid=none, weightp=0}, width=960, height=1080}:rtp{sdp=rtsp://:5545/}", sizeof(vlmargs)/ sizeof(vlmargs[0]), vlmargs, TRUE, TRUE); libvlc_vlm_play_media(inst, "Server"); libvlc_vlm_play_media(inst, "Server2");

SaundersB
Blank Cone
Blank Cone
Posts: 16
Joined: 30 Dec 2016 15:44

Re: Can not Stream 2Channel Video from capture card

Postby SaundersB » 10 Jan 2017 00:11

Thank you very much for this.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 15 guests