vlc streaming vs libvlc streaming

About encoding, codec settings, muxers and filter usage
kuro6
New Cone
New Cone
Posts: 8
Joined: 20 Jun 2016 02:53

vlc streaming vs libvlc streaming

Postby kuro6 » 04 Jul 2016 14:05

Hi,

this problem is so weird, i am here to get some help.
vlc streaming is always works, but source code using libvlc still didn't worked.
i don't know the reason?

source rtsp stream url:
rtsp://xxx.xxx.xxx.xxx:554/test.sdp

in vlc player, i have had to set rtsp stream using wizard gui to re-stream, like this:

Code: Select all

:sout=#transcode{vcodec=h264,scale=0.5,acodec=none}:rtp{sdp=rtsp://:8554/test.sdp} :sout-keep
and in source code using libvlc, like this:

Code: Select all

... const char *sout = "#transcode{vcodec=h264,scale=0.5,acodec=none}:rtp{sdp=rtsp://:8554/test.sdp}"; const char *params[] = { ":sout-keep" }; libvlc_instance_t * vlc = libvlc_new(0, NULL); libvlc_vlm_add_broadcast(vlc, media_name, "rtsp://xxx.xxx.xxx.xxx:554/test.sdp", sout, 1, params, true, false); libvlc_vlm_play_media(vlc, media_name); ...
Last edited by kuro6 on 05 Jul 2016 03:08, edited 1 time in total.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: vlc streaming vs libvlc streaming

Postby Jean-Baptiste Kempf » 04 Jul 2016 18:19

Why are you using vlm?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

kuro6
New Cone
New Cone
Posts: 8
Joined: 20 Jun 2016 02:53

Re: vlc streaming vs libvlc streaming

Postby kuro6 » 05 Jul 2016 02:13

you are right, i don't have to.
if i have to modify the streaming data, just video filter for it.

but, libvlc's license is LGPL, may be that is reason.

kuro6
New Cone
New Cone
Posts: 8
Joined: 20 Jun 2016 02:53

Re: vlc streaming vs libvlc streaming

Postby kuro6 » 05 Jul 2016 02:59

libvlc source code,

Code: Select all

const char *sout = "#transcode{vcodec=h264,scale=0.5,acodec=none}:rtp{sdp=rtsp://:8554/test.sdp}"; const char *params[] = { ":sout-keep" }; libvlc_instance_t * vlc = libvlc_new(0, NULL); libvlc_vlm_add_broadcast(vlc, media_name, "rtsp://xxx.xxx.xxx.xxx:554/test.sdp", sout, 1, params, true, false);
localhost (127.0.0.1) shows the stream, but in other computer(local network: 192.168.x.x),
data transferred, but not decoded.

Tools -> Media Information -> Codec

Code: Select all

Stream 0 Codec: H264 -MPEG-4 AVC (part 10) (h264) Resolution: 368x256 //not shown in other computer Display resolution: 368x246 //not shown in other computer Frame rate: 12 //not shown in other computer Decoded format: Planar 4:2:0 YVU //not shown in other computer
and i ran linux version vlc client

working version sdp (vlc)

Code: Select all

v=0 o=- 15790958616157550832 15790958616157550832 IN IP4 MSDN-SPECIAL s=Unnamed i=N/A c=IN IP4 0.0.0.0 t=0 0 a=tool:vlc 2.2.5 a=recvonly a=type:broadcast a=charset:UTF-8 a=control:rtsp://192.168.xxx.xxx:8554/test.sdp m=video 0 RTP/AVP 96 b=RR:0 a=rtpmap:96 H264/90000 a=fmtp:96 packetization-mode=1;profile-level-id=42c00c;sprop-parameter-sets=Z0LADNoFwh+b/wFxAXAQAAADABAAAAMBiPFCqg==,aM4PyA==; a=control:rtsp://192.168.xxx.xxx:8554/test.sdp/trackID=0

not working sdp (libvlc)

Code: Select all

v=0 o=- 15790959369669001244 15790959369669001244 IN IP4 MSDN-SPECIAL s=Unnamed i=N/A c=IN IP4 0.0.0.0 t=0 0 a=tool:vlc 2.2.5 a=recvonly a=type:broadcast a=charset:UTF-8 a=control:rtsp://192.168.xxx.xxx:8554/test.sdp m=video 0 RTP/AVP 96 b=RR:0 a=rtpmap:96 H264/90000 a=fmtp:96 packetization-mode=1;profile-level-id=64000c;sprop-parameter-sets=Z2QADKzZQXCH5v/AXEBcBAAAAwAEAAADAGI8UKZY,aOvjyyLA; a=control:rtsp://192.168.xxx.xxx:8554/test.sdp/trackID=0

kuro6
New Cone
New Cone
Posts: 8
Joined: 20 Jun 2016 02:53

Re: vlc streaming vs libvlc streaming

Postby kuro6 » 05 Jul 2016 03:44

i think i found the reason,
adjusting libvlc venc parameters shows me the streams( stream quality is not good though).

i guess that libvlc transcode encoding is not mature,
so vlc decoder couldn't doing it's job.


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 37 guests