Audio extraction

This forum is about all development around libVLC.
nimport nawak
New Cone
New Cone
Posts: 7
Joined: 07 Dec 2009 11:43

Audio extraction

Postby nimport nawak » 14 Dec 2009 17:26

I woul like to play a sound from the network (RTP) and be able to use some voice recognition algorithm. Are they any way to reach the audio buffer in libvlc just like with Vmem for the video ?
thanks

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

Re: Audio extraction

Postby Rémi Denis-Courmont » 14 Dec 2009 18:49

There is smem to get data out of the stream output, or the file audio output to write samples to a pipe.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

nimport nawak
New Cone
New Cone
Posts: 7
Joined: 07 Dec 2009 11:43

Re: Audio extraction

Postby nimport nawak » 14 Dec 2009 19:52

thanks for the reply, i'm going to search how i can use it

nimport nawak
New Cone
New Cone
Posts: 7
Joined: 07 Dec 2009 11:43

Re: Audio extraction

Postby nimport nawak » 15 Dec 2009 01:04

So I just found that smem was in vlc 1.1.0 and the audio part was still not here so i wait and see

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

Re: Audio extraction

Postby Rémi Denis-Courmont » 15 Dec 2009 16:11

Duh? the audio file output has been there for at least 7 years.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

wetneb
Blank Cone
Blank Cone
Posts: 16
Joined: 07 Apr 2010 09:35

Re: Audio extraction

Postby wetneb » 07 Apr 2010 10:03

So maybe the header of smem.c should be updated :

Code: Select all

/***************************************************************************** * How to use it ***************************************************************************** * * You should use this module in combination with the transcode module, to get * raw datas from it. This module does not make any conversion at all, so you * need to use the transcode module for this purpose. * * For example, you can use smem as it : * --sout="#transcode{vcodec=RV24,acodec=s16l}:smem{smem-options}" * * Into each lock function (audio and video), you will have all the informations * you need to allocate a buffer, so that this module will copy data in it. * * the video-data and audio-data pointers will be passed to lock/unlock function * * For now, audio is NOT IMPLEMENTED. * ******************************************************************************/
After a dive into VLC's headers, I've got a few questions about this module :

I don't understand how callbacks (prerender and postrender) are working in this module. I suppose they must be defined in the parameters, but how should they be named ? I can't put the names of my C++ functions as raw strings in the parameters, isn't it ? And how can I know which parameters will be passed to my callbacks (their types and their meanings) ?
The last noob question : the header refers to some lock functions : where are they defined ?

Thanks :) !

wetneb
Blank Cone
Blank Cone
Posts: 16
Joined: 07 Apr 2010 09:35

Re: Audio extraction

Postby wetneb » 10 Apr 2010 21:53

No answer ?
It seems that this module has been implemented a long time ago, despite some recent improvements on it. There's no documentation at all about this. Maybe I should send a message to the author(s) of this module, and they would help me to understand its behaviour, so I could write down some explanations or a tutorial. Does anyone knows who did write this code ? It must have been done before the project switched to Git, since I can't find the commit in the log.
I think many people are interrested in using this functionnality, but it's quite hard to find informations about it.

ian168
New Cone
New Cone
Posts: 6
Joined: 12 Nov 2010 13:02

Re: Audio extraction

Postby ian168 » 10 Feb 2011 09:57

Hi all,
I used the smem well in my VC++ project on windows,but cannot work in ios.
Does any one know why smem cannot work in ios??
i built the source code of MobileVLC from http://git.videolan.org/?p=MobileVLC.git;a=summary,the latest version i used.
Or smem cannot work in ios system?

ian168
New Cone
New Cone
Posts: 6
Joined: 12 Nov 2010 13:02

Does smem work well in ios platform?

Postby ian168 » 10 Feb 2011 10:04

In order to get the RTSP video and audio stream raw data,i used the vlc 1.1.5 library on windows,i worked well.
I have tried vmem and smem in my VC++ project and both can work well,and then i tried to implement in iphone.
I built the source code of MobileVLC from http://git.videolan.org/?p=MobileVLC.git;a=summary the latest version,
but smem cannot in ios platform.......Does any one know why smem cannot work in ios?

wetneb
Blank Cone
Blank Cone
Posts: 16
Joined: 07 Apr 2010 09:35

Re: Audio extraction

Postby wetneb » 10 Feb 2011 20:05

Could you describe your problem more accurately ? Do you get errors at compile or run time ?


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 23 guests