problem with streaming when using libvlc 3.0.6

This forum is about all development around libVLC.
bingjingshi
New Cone
New Cone
Posts: 3
Joined: 21 Feb 2019 13:11

problem with streaming when using libvlc 3.0.6

Postby bingjingshi » 22 Feb 2019 08:00

Hello,
I have a program using vlc win32 sdk + MFC in VS2010。The OS is WIN7, it works well in vlc2.2.8。
the sout option is

Code: Select all

"--sout=#duplicate{dst=udp{dst=127.0.0.1:1234},dst=display} " "--sout-keep"
Now I want to use vlc3.0.6 sdk, vlc.exe can also work well, Using libvlc sdk in the program it can display the video ,but can't stream out .
what's the problem?
Any input would be greatly appreciated!

Rémi Denis-Courmont
Developer
Developer
Posts: 15266
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: problem with streaming when using libvlc 3.0.6

Postby Rémi Denis-Courmont » 22 Feb 2019 17:15

I'm not sure how you are passing sout options, but streaming output was never supported in LibVLC - so you must have been relying on unsupported and undocumented behaviour that for a reason or other stopped working.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

bingjingshi
New Cone
New Cone
Posts: 3
Joined: 21 Feb 2019 13:11

Re: problem with streaming when using libvlc 3.0.6

Postby bingjingshi » 25 Feb 2019 14:35

I'm not sure how you are passing sout options, but streaming output was never supported in LibVLC - so you must have been relying on unsupported and undocumented behaviour that for a reason or other stopped working.
This is my code,It work well in 2.2.8

Code: Select all

int vlc_argc = 0; char *vlc_argv[20]; CString str; str.Format("udp://@:5000"); vlc_argv[vlc_argc++] = "--network-caching=150"; vlc_argv[vlc_argc++] = "--sout=#duplicate{dst=udp{dst=127.0.0.1:1234},dst=display}"; vlc_argv[vlc_argc++] = "--sout-keep"; libvlc_instance_t *p_instance1 = libvlc_new(vlc_argc, vlc_argv); libvlc_media_t *p_media1 = libvlc_media_new_location(p_instance1, str); libvlc_media_player_t *p_media_player1=libvlc_media_player_new_from_media(p_media1); libvlc_media_player_set_hwnd(p_media_player1,dlg->GetDlgItem(IDC_STATIC_DISPLAY)->GetSafeHwnd()); libvlc_media_player_play(p_media_player1); while (1) { if (dlg->m_Quit) { break; } Sleep(1000); } libvlc_media_player_stop(p_media_player1); libvlc_media_player_release(p_media_player1); libvlc_media_release(p_media1); return 0;

Rémi Denis-Courmont
Developer
Developer
Posts: 15266
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: problem with streaming when using libvlc 3.0.6

Postby Rémi Denis-Courmont » 25 Feb 2019 17:22

Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

LookingAhead
New Cone
New Cone
Posts: 5
Joined: 06 Nov 2012 06:14

Re: problem with streaming when using libvlc 3.0.6

Postby LookingAhead » 12 Jul 2019 09:20

Hi! I had a similar problem. My solution: '--sout' should be moved to libvlc_media_add_option() for VLC 3 and 4 versions;
For example:

Code: Select all

libvlc_media_add_option(p_media1, ":sout=#duplicate{dst=udp{dst=127.0.0.1:1234},dst=display}");


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 11 guests