I want to stream RTSP using libvlc.

About encoding, codec settings, muxers and filter usage
kor_rayzie
New Cone
New Cone
Posts: 1
Joined: 15 Jul 2019 09:43

I want to stream RTSP using libvlc.

Postby kor_rayzie » 15 Jul 2019 09:54

hello.
I want to stream RTSP using libvlc.

Currently, rasPi uses l4v2 to create RTSP Server and receive data.

But there is a problem.
I would like to use the options in the VLC Media Player [Preferences]-> [Input / Codecs] category.

I want to use the [RTP over RTSP (TCP)] option of the network's [Live555 stream transport].

I am currently using the C ++ language,
Can I use the command line for libvlc_media_add_option () or libvlc_new ()?

Or I'd like to choose an option through another method.

I do not know how to use command.

I really appreciate it if someone tells me how.

Currently I am using C ++ class like this.

CVLCPlayer::CVLCPlayer()
{
m_pInstance = libvlc_new(0, NULL);
m_pMediaPlayer = libvlc_media_player_new(m_pInstance);
m_pEventManager = libvlc_media_player_event_manager(m_pMediaPlayer);

}

int CVLCPlayer::openMedia()
{
m_pMedia = libvlc_media_new_location(m_pInstance, m_strMediaSrc);
if (m_pMedia == NULL){return FALSE;}
else
{
libvlc_media_player_set_media(m_pMediaPlayer, m_pMedia);
return TRUE;
}
}

int CVLCPlayer::playMedia(void)
{
return libvlc_media_player_play(m_pMediaPlayer);
}


Thank you for reading.

unidan
Developer
Developer
Posts: 1493
Joined: 25 Mar 2018 01:00

Re: I want to stream RTSP using libvlc.

Postby unidan » 16 Jul 2019 09:16

Hi, yes you can use libvlc_media_add_option, check what you can set with vlc -H and look at the option for live555


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 33 guests