Streaming with libVlc 1.0.0-prel?

This forum is about all development around libVLC.
LexaLow
Blank Cone
Blank Cone
Posts: 12
Joined: 31 Jul 2008 16:50

Streaming with libVlc 1.0.0-prel?

Postby LexaLow » 23 Apr 2009 17:53

I use this API calls:

m_pMedia = libvlc_media_new (m_pLibVlc, pName, &m_vlcExc);
m_pMediaPlayer = libvlc_media_player_new_from_media (m_pMedia, &m_vlcExc);
libvlc_media_release (m_pMedia);
libvlc_media_player_play (m_pMediaPlayer, &m_vlcExc);

It works fine when my input is a file (pName). But it doesn't work when it is a stream like this
rtp://@224.0.0.21:1234

The error message is:
main access error: no access module matched "rtp"
main input error: open of `rtp://@224.0.0.21:1234' failed: no access module matched "rtp"
main input error: Your input can't be opened

What I have to change for this?

Thanks in advance
lexalow

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: Streaming with libVlc 1.0.0-prel?

Postby Jean-Baptiste Kempf » 24 Apr 2009 00:38

please, MORE messages.
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.

LexaLow
Blank Cone
Blank Cone
Posts: 12
Joined: 31 Jul 2008 16:50

Re: Streaming with libVlc 1.0.0-prel?

Postby LexaLow » 24 Apr 2009 08:54

Ok, here more code about my test:

libvlc_exception_t m_vlcExc;
libvlc_instance_t * m_pLibVlc;
libvlc_media_player_t * m_pMediaPlayer;
libvlc_media_t * m_pMedia;

/* FUNCTION ******************************************************************/
bool VlcLib::Check4Exc (libvlc_exception_t *pExc)
{
if (libvlc_exception_raised (pExc))
{
strncpy (m_szError, libvlc_exception_get_message(pExc), sizeof (m_szError) - 1);
DIAG1(TM_ERROR,"VlcLib::Check4Exc exception raised %s", m_szError);
fprintf (stderr, "Check4Exc error: %s\n", m_szError);
return false;
}
libvlc_exception_clear (pExc);
*m_szError = 0;
return true;
}

/* FUNCTION ******************************************************************/
bool VlcLib::VLCInit (void)
{
libvlc_exception_init (&m_vlcExc);
m_pLibVlc = libvlc_new (0, 0, &m_vlcExc);
if (!m_pLibVlc || !Check4Exc (&m_vlcExc))
{
DIAG(TM_ERROR,"VlcLib::VLCInit libvlc_new failed");
m_iError = ERROR_LIBVLC_NEW;
return false;
}
return true;
}

/* FUNCTION ******************************************************************/
bool VlcLib::CreateMediaPlayer (const char *psz_MRL)
{

DIAG1(TM_INFO,"VlcLib::CreateMediaPlayer with %s +++", psz_MRL);
m_pMedia = libvlc_media_new (m_pLibVlc, psz_MRL, &m_vlcExc);
if (!Check4Exc (&m_vlcExc))
{
DIAG(TM_ERROR,"VlcLib::CreateMediaPlayer failed");
m_iError = ERROR_LIBVLC_CREATEMEDIA;
return false;
}
m_pMediaPlayer = libvlc_media_player_new_from_media (m_pMedia, &m_vlcExc);
if (!Check4Exc (&m_vlcExc))
{
DIAG(TM_ERROR,"VlcLib::CreateMediaPlayer failed");
m_iError = ERROR_LIBVLC_CREATEMEDIA;
return false;
}
libvlc_media_release (m_pMedia);
DIAG(TM_INFO,"VlcLib::CreateMediaPlayer ---");
return true;
}

/* FUNCTION ******************************************************************/
bool VlcLib::PlayMediaPlayer (void)
{
DIAG(TM_INFO,"VlcLib::PlayMediaPlayer +++");
libvlc_media_player_play (m_pMediaPlayer, &m_vlcExc);
if (!Check4Exc (&m_vlcExc))
{
DIAG(TM_ERROR,"VlcLib::Play libvlc_playlist_play failed");
m_iError = ERROR_LIBVLC_PLAY;
return false;
}
DIAG(TM_INFO,"VlcLib::PlayMediaPlayer ---");
return true;

}

The call sequence is:
VLCInit ():
CreateMediaPlayer ("rtp://@224.0.0.21:1234");
PlayMediaPlayer (void);

My system is debian lenny 64bit. The input stream is an ATSC RTP-MPEG2-TS. When I use the vlc-gui it works. I'll try to debug. But hints are welcome :wink:

LexaLow
Blank Cone
Blank Cone
Posts: 12
Joined: 31 Jul 2008 16:50

Re: Streaming with libVlc 1.0.0-prel?

Postby LexaLow » 24 Apr 2009 11:51

Here more messages.
Start with command line and it plays:

$ ./vlc -v rtp://@224.0.0.21:1234
VLC media player 1.0.0-pre1 Goldeneye
[0x13ba1e8] main libvlc warning: cannot load module `/home/usr/vlc//lib/vlc/demux/liblive555_plugin.so' (/home/usr/vlc//lib/vlc/demux/liblive555_plugin.so: undefined symbol: _ZTI9HashTable)
[0x13ba1e8] main libvlc warning: cannot load module `/home/axel/vlc/build/modules/demux/.libs/liblive555_plugin.so' (/home/axel/vlc/build/modules/demux/.libs/liblive555_plugin.so: undefined symbol: _ZTI9HashTable)
[0x13ba1e8] main libvlc warning: cannot load module `/home/axel/vlc/build/modules/access/.libs/libdvdnav_plugin.so' (/home/axel/vlc/extras/contrib/lib/libdvdread.so.4: undefined symbol: dvdcss_interface_2)
[0x16a4998] main demux warning: cannot load module `/home/usr/vlc//lib/vlc/access/libdvdnav_plugin.so' (/home/axel/vlc/extras/contrib/lib/libdvdread.so.4: undefined symbol: dvdcss_interface_2)
[0x16a4998] main demux warning: no access_demux module matching "file" could be loaded
[0x13ba1e8] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
libdvbpsi error (PSI decoder): TS discontinuity (received 4, expected 0) for PID 0
libdvbpsi error (PSI decoder): TS discontinuity (received 9, expected 0) for PID 80
libdvbpsi error (PSI decoder): TS discontinuity (received 8, expected 0) for PID 64
[0x16abe98] ts demux warning: first packet for pid=81 cc=0x6
libdvbpsi error (PSI decoder): TS discontinuity (received 9, expected 0) for PID 48
[0x16abe98] ts demux warning: first packet for pid=49 cc=0x6
[0x16abe98] ts demux warning: first packet for pid=65 cc=0xa

Start with my test with libvlc, it doesn't work:

1166:106235 vlclib 0 VlcLib::VLCInit +++
1166:106240 vlclib 0 VlcLib::VLCInit command arg1 -v
1166:106243 vlclib 0 VlcLib::VLCInit command arg2 rtp://@224.0.0.21:1234
[0x25bb5a8] main libvlc warning: cannot load module `/home/usr/vlc//lib/vlc/demux/liblive555_plugin.so' (/home/usr/vlc//lib/vlc/demux/liblive555_plugin.so: undefined symbol: _ZTI9HashTable)
[0x2784418] main demux warning: no access_demux module matching "file" could be loaded
1166:161774 recode 0 ERROR Recode::Run VLCInit
1166:161788 vlclib 0 VlcLib::CreateMediaPlayer with rtp://@224.0.0.21:1234 +++
1166:161828 vlclib 0 VlcLib::CreateMediaPlayer ---
1166:161834 vlclib 0 VlcLib::PlayMediaPlayer +++
1166:168526 vlclib 0 VlcLib::PlayMediaPlayer ---
1166:168537 recode 0 Run ---
[0x278d288] main demux warning: cannot load module `/home/usr/vlc//lib/vlc/access/librtp_plugin.so' (/home/usr/vlc//lib/vlc/access/librtp_plugin.so: undefined symbol: gcry_cipher_setkey)
[0x278d288] main demux warning: no access_demux module matching "rtp" could be loaded
[0x278d538] main access error: no access module matched "rtp"
[0x27849b8] main input error: open of `rtp://@224.0.0.21:1234' failed: no access module matched "rtp"
[0x27849b8] main input error: Your input can't be opened
[0x27849b8] main input error: VLC is unable to open the MRL 'rtp://@224.0.0.21:1234'. Check the log for details.

It seams, that in this way the librtp_plugin is needed and in the commad line case not. I had build the extras/contrib libraries without gcrypt, becourse compile problems with old debian libraries.
Is there a way to play with libvlc api without grypt module (like command line above)?

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

Re: Streaming with libVlc 1.0.0-prel?

Postby Rémi Denis-Courmont » 26 Apr 2009 17:13

Code: Select all

[0x278d288] main demux warning: cannot load module `/home/usr/vlc//lib/vlc/access/librtp_plugin.so' (/home/usr/vlc//lib/vlc/access/librtp_plugin.so: undefined symbol: gcry_cipher_setkey) [0x278d288] main demux warning: no access_demux module matching "rtp" could be loaded
Your RTP plugin was not linked properly.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

LexaLow
Blank Cone
Blank Cone
Posts: 12
Joined: 31 Jul 2008 16:50

Re: Streaming with libVlc 1.0.0-prel?

Postby LexaLow » 29 Apr 2009 16:45

thanks for your hint. I had trouble with the libgcrypt version. Debian lenny gets the 1.4.2 vlc 1.0.0-pre1 wants 1.4.3 and the download link for that did not exist. Now I built the pre2 (with libgcrypt 1.4.4) and it works. I transcode a ATSC HD (1080i) RTP-MPEG2 ip stream to H.264 AAC RTP MPEG2-TS stream. It works super. As the last one question to the output module: Is it already possible to configure the output for a rtp stream without a MPEG2-TS container, only with the pes nals?

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

Re: Streaming with libVlc 1.0.0-prel?

Postby Rémi Denis-Courmont » 29 Apr 2009 18:22

If you don't specify mutx=ts, then VLC will stream AVC or whatever elementary stream as directly over RTP
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 25 guests