Page 1 of 1

How to stream realtime encoded video/audio stream using LibVLC?

Posted: 07 Aug 2020 19:33
by pango
My program realtime generate H264(or HEVC) video stream,and AAC audio stream, so how can I stream them using LibVLC? Should I use imem module?

Re: How to stream realtime encoded video/audio stream using LibVLC?

Posted: 10 Aug 2020 09:14
by mfkl

Re: How to stream realtime encoded video/audio stream using LibVLC?

Posted: 12 Aug 2020 17:08
by pango
Now I'm using ffmpeg to mux video/audio stream into ts stream firstly,and then use libvlc_new_media_callbacks() to feed my ts stream to libvlc,it works fine, but has below problems:

- I put the media instance created by libvlc_new_media_callbacks() into a player instance,the player can play the stream,but the delay time is too long,it is 1.5s at least,how can I short the delay?

- What's the mrl of the media created by libvlc_new_media_callbacks()? I want to stream the ts stream over network using libvlc_vlm_add_broadcast(),but the api require the mrl of input media,I had tried using "imem://" as mrl,but I failed,vlc log report it can not find input module for "imem://", so what's the mrl of the media?

Re: How to stream realtime encoded video/audio stream using LibVLC?

Posted: 12 Aug 2020 18:19
by RĂ©mi Denis-Courmont
libvlc_new_media_callbacks() media cannot be represented by a MRL. The function pointers are not serial data afterall.