Audio and video module

This forum is about all development around libVLC.
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: Audio and video module

Postby Jean-Baptiste Kempf » 17 Dec 2009 01:20

VLC 1.1 will have it.
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.

rmsoto
Blank Cone
Blank Cone
Posts: 21
Joined: 17 Oct 2009 22:12

Re: Audio and video module

Postby rmsoto » 17 Dec 2009 11:02

Thanks J-B,

Do you know when it will be released?

Regards,
Raúl.

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: Audio and video module

Postby Jean-Baptiste Kempf » 22 Dec 2009 09:27

When it is ready.
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.

djsashaz
Blank Cone
Blank Cone
Posts: 16
Joined: 14 Feb 2008 23:27

Re: Audio and video module

Postby djsashaz » 25 Dec 2009 23:20

Maybe someone can help me here..... I've been trying to get the Vu-meter running. I've been able to get the graph up on top of my video. But I can not seem to get the audio levels to do anything.

Here is what I'm using to do it:

Code: Select all

vlc -I rc --video-x 0 --video-y 0 --width 640 --height 480 --rc-host=localhost:12345 --audio-filter=audiobargraph_a --audiobargraph_a-address=localhost --audiobargraph_a-port=12345 --audiobargraph_a-bargraph=0 --sub-filter audiobargraph_v --audiobargraph_v-x=50 --audiobargraph_v-y=25 --audiobargraph_v-alarm=1 mms://my.url
I can get the video, I hear the audio, I get the graph, but it just wont work. I'm using nightly build binary from the 24th of December. Can someone point out to me what I'm doing wrong? I tired a local file too. That doesn't help. I also tried my local ip 192.168.10.10 instead of local host, I get the same result.

Here is a picture, don't laugh at the camera phone shot please.... I can't even begin to explain why.

REMOVED
Last edited by djsashaz on 26 Dec 2009 01:21, edited 1 time in total.

CrapulaX
Blank Cone
Blank Cone
Posts: 35
Joined: 12 Jun 2009 11:43

Re: Audio and video module

Postby CrapulaX » 25 Dec 2009 23:39

Maybe someone can help me here..... I've been trying to get the Vu-meter running. I've been able to get the graph up on top of my video. But I can not seem to get the audio levels to do anything.

Here is what I'm using to do it:

Code: Select all

vlc -I rc --video-x 0 --video-y 0 --width 640 --height 480 --rc-host=localhost:12345 --audio-filter=audiobargraph_a --audiobargraph_a-address=localhost --audiobargraph_a-port=12345 --audiobargraph_a-bargraph=0 --sub-filter audiobargraph_v --audiobargraph_v-x=50 --audiobargraph_v-y=25 --audiobargraph_v-alarm=1 mms://my.url
Your command line seems ok, I tried it but I suspect 2 problems :
a) first, it looks like that the rc interface might have move to "oldrc" ? (may be other developpers have a comment on this)
vlc -I oldrc
b) second, i can not make network sniffing right now but as the messages from audio module to video module
as sent through TCP via RC interface you should be able to see them using wireshark for instance.

The test protocol is like that :
- ensure that the audio bargraph module is loaded correctly
- ensure that tcp messages are sent towards the RC interface
- ensure that rc interface forwards the messages to the video module

I will not be able to make those tests until beginning of january

djsashaz
Blank Cone
Blank Cone
Posts: 16
Joined: 14 Feb 2008 23:27

Re: Audio and video module

Postby djsashaz » 25 Dec 2009 23:50

Yes OLDRC did it...... works great...... Just going to modify the settings a bit. Do you think it will take a lot of cpu if I increase the samples to 1? instead of the default of 4?

CrapulaX
Blank Cone
Blank Cone
Posts: 35
Joined: 12 Jun 2009 11:43

Re: Audio and video module

Postby CrapulaX » 25 Dec 2009 23:57

it depends also if you really need that precision.

If you intend to make a mosaic on a computer :
- keep in mind to choose different ports for each instance of VLC
- you may consider "--ffmpeg-lowres" option to reduce cpu consumption

could you post your "final" working command line ?

djsashaz
Blank Cone
Blank Cone
Posts: 16
Joined: 14 Feb 2008 23:27

Re: Audio and video module

Postby djsashaz » 26 Dec 2009 00:31

I will do that shortly, but I'm also trying to put a marquee in the window..... But when I add the "--sub-filter marq" then I loose the audio bar graph. Whats the best way to have multiple sub filters?

djsashaz
Blank Cone
Blank Cone
Posts: 16
Joined: 14 Feb 2008 23:27

Re: Audio and video module

Postby djsashaz » 26 Dec 2009 01:19

I got it going now..... Just tried it with a couple URL's and it looks great.

Image

Now I was wondering, has anyone come across a way to check for frozen image or frozen video? I would like to trigger alarms the same way but with sensing the video content........ Any help would be awesome.... Merry Christmas everyone !!!

S
Last edited by djsashaz on 28 Dec 2009 20:47, edited 1 time in total.

rmsoto
Blank Cone
Blank Cone
Posts: 21
Joined: 17 Oct 2009 22:12

Re: Audio and video module

Postby rmsoto » 28 Dec 2009 09:49

Hi, great work!!!

Did you compile first the c files of audiobargraph? or just update to the last nightbuild?

Regards,
Raúl.

CrapulaX
Blank Cone
Blank Cone
Posts: 35
Joined: 12 Jun 2009 11:43

Re: Audio and video module

Postby CrapulaX » 30 Dec 2009 10:53

1.1 nighty builds support already those modules.

By the way, I would be very interested in feedbacks when using with multichannel audio

rmsoto
Blank Cone
Blank Cone
Posts: 21
Joined: 17 Oct 2009 22:12

Re: Audio and video module

Postby rmsoto » 31 Dec 2009 19:14

Hi, I'm installing right now 1.1.0 in my ubuntu...as you may know, Iḿ trying to get a mosaic and I will try to use audiobargraph in it....but may be I will need a little bit of help translating the command line to vlm lines....

Here you can find my vlm lines...viewtopic.php?f=14&t=66647

If you can give me a clue about how to show the bargraphs I will apreciate it....I have some streams with 8 audio tracks...

Thanks!
Raúl

djsashaz
Blank Cone
Blank Cone
Posts: 16
Joined: 14 Feb 2008 23:27

Re: Audio and video module

Postby djsashaz » 31 Dec 2009 19:19

I would love to help, but I cant get the mosaic to work on my machine so I could test it..... I dont know what Im doing wrong... Could you post an example or a demo sample of a simple mosaic, and then i can play with it to make it work.

rmsoto
Blank Cone
Blank Cone
Posts: 21
Joined: 17 Oct 2009 22:12

Re: Audio and video module

Postby rmsoto » 31 Dec 2009 19:36

May be the problem is that I'm using multicast ips of our private network...I haven't got any other mosaic here...I will take a look on a simple one.

Thanks...

Well....I've found the next one in the forums:

Code: Select all

new RTL broadcast enabled setup RTL input "udp://@224.168.223.54:2154" setup RTL output #duplicate{dst=mosaic-bridge{id=RTL,width=360,height=288},select=video,dst=bridge-out{id=1},select=audio} new RTL2 broadcast enabled setup RTL2 input "udp://@224.168.223.55:2155" setup RTL2 output #duplicate{dst=mosaic-bridge{id=RTL2,width=360,height=288},select=video,dst=bridge-out{id=2},select=audio} new VOX broadcast enabled setup VOX input "udp://@224.168.223.56:2156" setup VOX output #duplicate{dst=mosaic-bridge{id=VOX,width=360,height=288},select=video,dst=bridge-out{id=3},select=audio} new n-tv broadcast enabled setup n-tv input "udp://@224.168.223.57:2157" setup n-tv output #duplicate{dst=mosaic-bridge{id=n-tv,width=360,height=288},select=video,dst=bridge-out{id=4},select=audio} #Background options new bg broadcast enabled setup bg input "fake://" option "fake-file=C:\Documents and Settings\admin\Escritorio\mosaic\mosaic.png" option "fake-width=720" option "fake-height=576" option "fake-aspect-ratio=16:9" setup bg option sub-filter=mosaic setup bg output #transcode{vcodec=mp2v,vb=4096,scale=1,acodec=mp3,ab=192,channels=4,sfilter=mosaic}:transcode{vcodec=mp2v,vb=4096,scale=1,acodec=mp3,ab=192,channels=4,sfilter='marq{marquee=RTL-%H:%M:%S,x=180,y=260,size=16}:marq{marquee=RTL2-%d.%m.%Y,x=540,y=260,size=16}:marq{marquee=VOX,x=180,y=548,size=16}:marq{marquee=n-tv,x=540,y=548,size=16}'}:bridge-in{offset=100}:duplicate{dst=std{access=udp{ttl=128},mux=ts,dst=224.168.223.240:2240}} # Mosaic options setup bg option mosaic-alpha=255 setup bg option mosaic-height=576 setup bg option mosaic-width=720 setup bg option mosaic-align=5 setup bg option mosaic-xoffset=0 setup bg option mosaic-yoffset=0 setup bg option mosaic-vborder=0 setup bg option mosaic-hborder=0 setup bg option mosaic-position=1 setup bg option mosaic-rows=2 setup bg option mosaic-cols=2 setup bg option mosaic-order=RTL,RTL2,VOX,n-tv setup bg option mosaic-keep-aspect-ratio="16:9" setup bg option mosaic-keep-picture control bg play control RTL play control RTL2 play control VOX play control n-tv play
Just change the inputs and the path for the background file. This will work for you then...

Regards,
Raúl

CrapulaX
Blank Cone
Blank Cone
Posts: 35
Joined: 12 Jun 2009 11:43

Re: Audio and video module

Postby CrapulaX » 31 Dec 2009 19:56

you could also set up a mosaic using a different way :
spawn n instances of VLC and place them on the screen.

If the need is to just display mosaic that might be enough,
if the goal is to create a new audio video output stream composed
of multiple video input inside that will not be ok.

djsashaz
Blank Cone
Blank Cone
Posts: 16
Joined: 14 Feb 2008 23:27

Re: Audio and video module

Postby djsashaz » 31 Dec 2009 20:01

I tried that but the nightly build dosnt support the video-x and video-y. I would like to automated it but I dont know how. I would like to use the option video-deco-no option, but if I do that then I cant even move the video anymore..... What do you think i should do?

rmsoto
Blank Cone
Blank Cone
Posts: 21
Joined: 17 Oct 2009 22:12

Re: Audio and video module

Postby rmsoto » 31 Dec 2009 20:04

Yep...I need to generate the mosaic with multiple streams or multiple services into a MPTS and then send it with a low bit rate throughout our network :-(

Thanks for all the help!

rmsoto
Blank Cone
Blank Cone
Posts: 21
Joined: 17 Oct 2009 22:12

Re: Audio and video module

Postby rmsoto » 31 Dec 2009 20:08

Hi,

may be you can change this line

Code: Select all

sfilter='marq{marquee=RTL-%H:%M:%S,x=180,y=260,size=16}:marq{marquee=RTL2-%d.%m.%Y,x=540,y=260,size=16}:marq{marquee=VOX,x=180,y=548,size=16}:marq{marquee=n-tv,x=540,y=548,size=16}'
for

Code: Select all

sfilter=mosaic
Regards and Happy 2010 !!

Raúl.

djsashaz
Blank Cone
Blank Cone
Posts: 16
Joined: 14 Feb 2008 23:27

Re: Audio and video module

Postby djsashaz » 31 Dec 2009 20:48

Could any one maybe make script for me that could do that for me? I only need to run 10 sources split equally on one screen..... I tired using a .conf file, but I couldn't get it to work.

marria01
New Cone
New Cone
Posts: 3
Joined: 03 Feb 2010 19:11

Re: Audio and video module

Postby marria01 » 03 Feb 2010 19:25

I've applied the diff that was posted by ClemChen against 1.0.2 which was the version he used for development. But for some reason the modules aren't being built when I compile. I can only assume there's something missing in the diff. I've had lots of problems running the nightlies, so I'd rather stick with patching a release.

marria01
New Cone
New Cone
Posts: 3
Joined: 03 Feb 2010 19:11

Re: Audio and video module

Postby marria01 » 04 Feb 2010 00:45

Okay, scrub that last request. I hadn't bootstrapped after adding the patch.

I'm building a series of mosaics to monitor the services we broadcast. I'm currently testing it with some example sources as you can see below:

Image

The problem is, that while it works when you view it in a normal VLC desktop window using either a local file or a network stream, I need to be able to add audio meters to every screen in the mosaic and then stream it over the network to a number of clients.

I currently use this vlm file to open the capture cards and to start streaming the services I want:

Code: Select all

new dvb-s-card broadcast enabled new dvb-t-card broadcast enabled setup dvb-s-card input "dvb://" setup dvb-s-card option dvb-adapter=1 setup dvb-s-card option dvb-frequency=11527000 setup dvb-s-card option dvb-srate=27500000 setup dvb-s-card option dvb-voltage=13 setup dvb-s-card option dvb-tone=0 setup dvb-s-card option programs=50300,50315 setup dvb-s-card option ts-es-id-pid setup dvb-s-card option sout-standard-access=udp setup dvb-s-card option sout-standard-mux=ts setup dvb-t-card input "dvb://" setup dvb-t-card option dvb-adapter=0 setup dvb-t-card option dvb-frequency=762000000 setup dvb-t-card option dvb-bandwidth=8 setup dvb-t-card option programs=29952,30016,30080 setup dvb-t-card option ts-es-id-pid setup dvb-t-card option sout-standard-access=udp setup dvb-t-card option sout-standard-mux=ts setup dvb-s-card output #duplicate{dst=std{dst=127.0.0.1:8081},select="program=50300",dst=std{dst=127.0.0.1:8082},select="program=50315"} setup dvb-t-card output #duplicate{dst=std{dst=127.0.0.1:8091},select="program=29952",dst=std{dst=127.0.0.1:8092},select="program=30016",dst=std{dst=127.0.0.1:8093},select="program=30080"}} control dvb-s-card play control dvb-t-card play
I then use this vlm file to create the mosaic and serve it with http:

Code: Select all

#new channel1 broadcast enabled #setup channel1 input udp://@127.0.0.1:8081 #setup channel1 output #duplicate{dst=mosaic-bridge{id=1,height=248,width=345},select=video,dst=bridge-out{id=1},select=audio} new channel2 broadcast enabled setup channel2 input udp://@127.0.0.1:8082 setup channel2 output #duplicate{dst=mosaic-bridge{id=2,height=200,width=320},select=video,dst=bridge-out{id=2},select=audio} new channel3 broadcast enabled setup channel3 input udp://@127.0.0.1:8091 setup channel3 output #duplicate{dst=mosaic-bridge{id=3,height=200,width=320},select=video,dst=bridge-out{id=3},select=audio} new channel4 broadcast enabled setup channel4 input udp://@127.0.0.1:8092 setup channel4 output #duplicate{dst=mosaic-bridge{id=4,height=200,width=320},select=video,dst=bridge-out{id=4},select=audio} new channel5 broadcast enabled setup channel5 input udp://@127.0.0.1:8093 setup channel5 output #duplicate{dst=mosaic-bridge{id=5,height=200,width=320},select=video,dst=bridge-out{id=5},select=audio} new background broadcast enabled setup background input fake:// setup background option mosaic-alpha=255 setup background option mosaic-height=556 setup background option mosaic-width=700 setup background option mosaic-align=5 setup background option mosaic-xoffset=10 setup background option mosaic-yoffset=10 setup background option mosaic-vborder=10 setup background option mosaic-hborder=10 setup background option mosaic-position=2 setup background option mosaic-offsets="20,20,380,20,20,280,380,280" setup background option mosaic-rows=3 setup background option mosaic-cols=2 setup background option mosaic-order="2,3,4,5" setup background option fake-file="backdrop.png" setup background option fake-width=720 setup background option fake-height=576 setup background option fake-fps="25" setup background option fake-aspect-ratio="16:9" setup background option mosaic-keep-picture=1 setup background option mosaic-keep-aspect-ratio=1 setup background output #transcode{vcodec=mp4v,vb=10000,acodec=none,scale=1,sfilter='mosaic:marq{marquee="Channel M (Sat)",x=100,y=220,size=24}:marq{marquee="Channel M (DTT)",x=450,y=220,size=24}:marq{marquee="MCR Shopping 1",x=90,y=480,size=24}:marq{marquee="MCR Shopping 2",x=450,y=480,size=24}:marq{marquee="%d-%m-%Y %H:%M:%S",x=220,y=540,size=32}:AudioBarGraph_V'}:bridge-in{delay=400,id-offset=100}:standard{access=http,mux=ts,dst=172.28.8.52:8099} control background play #control channel1 play control channel2 play control channel3 play control channel4 play control channel5 play
Any ideas as to how I can make this work?

djsashaz
Blank Cone
Blank Cone
Posts: 16
Joined: 14 Feb 2008 23:27

Re: Audio and video module

Postby djsashaz » 04 Feb 2010 03:08

I would like to see that too.. How much cpu does your Mosaic take? I'm working on freeze detection and black screen detection.... I find that Im just running out of cpu before I even get to the audio bars.....

silid
New Cone
New Cone
Posts: 8
Joined: 14 Apr 2007 21:16

Re: Audio and video module

Postby silid » 08 Mar 2010 12:59

I have found that the audio filter is not applied unless I am also displaying the video locally.

I am transcoding the video and the audio bars appear when viewing locally (display) or when viewing locally and streaming (duplicate{dst=display,dst=std{...}}) but not when only streaming (std{...}).

The video shows the guide line to the left of where the bouncing audio bars should be, implying that the video filter is applied. Wireshark shows the commands from the audio filter when viewing locally and nothing when only streaming. This is why I think it is the audio filter that is not being applied.

CrapulaX
Blank Cone
Blank Cone
Posts: 35
Joined: 12 Jun 2009 11:43

Re: Audio and video module

Postby CrapulaX » 30 Mar 2010 10:03

One other way would be to use a small application that would only display those bargraphs,
this is possible because the audio decoding "module" is sending messages to the video module,
those messages contain the audio bargraph values.

As you can see, using the command line you can define the destination of the messages, so
instead of "posting" the messages to the video module, you could post them to an another application
(that might even run on an another machine)

This way, you could also apply "enhanced" computation on the values contained in the messages to try to detect silences...

CrapulaX
Blank Cone
Blank Cone
Posts: 35
Joined: 12 Jun 2009 11:43

Re: Audio and video module

Postby CrapulaX » 15 Aug 2010 22:26

I just had some time to test this audio bargraph feature (for which I contributed some months ago) on Mac OS x using the following command line :

Code: Select all

uhuh:~ crapulax$ /Applications/VLC.app/Contents/MacOS/VLC --sub-filter=audiobargraph_v /Users/crapulax/test.avi --audiobargraph_v-alarm=0 --audio-filter=audiobargraph_a --rc-host=localhost:1234 --audiobargraph_a-port=1234 --extraintf=oldrc --video-x=0 --video-y=0 --width=640 --height=480 --audiobargraph_v-position=1
Please note that the port 1234 is used twice in the command line, you can change the value but ensure that you still keep the same values.

This should open a window where the movie is played with an audiobargraph on the left side.

Different options are available:
Audio Bar Graph Video sub filter
--audiobargraph_v-i_values=<string>
Value of the audio channels levels
Value of the audio level of each channels between 0 and 1Each level
should be separated with ':'.
--audiobargraph_v-x=<integer>
X coordinate
X coordinate of the bargraph.
--audiobargraph_v-y=<integer>
Y coordinate
Y coordinate of the bargraph.
--audiobargraph_v-transparency=<integer [0 .. 255]>
Transparency of the bargraph
Bargraph transparency value (from 0 for full transparency to 255 for
full opacity).
--audiobargraph_v-position={0 (Center), 1 (Left), 2 (Right), 4 (Top), 8 (Bottom), 5 (Top-Left), 6 (Top-Right), 9 (Bottom-Left), 10 (Bottom-Right)}
Bargraph position
Enforce the bargraph position on the video (0=center, 1=left,
2=right, 4=top, 8=bottom, you can also use combinations of these
values, eg 6 = top-right).
--audiobargraph_v-alarm=<integer>
Alarm
Signals a silence and displays and alert (0=no alarm, 1=alarm).
--audiobargraph_v-barWidth=<integer>
Bar width in pixel (default : 10)
Width in pixel of each bar in the BarGraph to be displayed (default :
10).

Audio part of the BarGraph function
--audiobargraph_a-address=<string>
TCP address to use (default localhost)
TCP address to use to communicate with the video part of the Bar
Graph (default localhost).In the case of bargraph incrustation, use
localhost.
--audiobargraph_a-port=<integer>
TCP port to use (default 12345)
TCP port to use to communicate with the video part of the Bar Graph
(default 12345).Use the same port as the one used in the rc interface.
--audiobargraph_a-bargraph=<integer>
Defines if BarGraph information should be
sent (default 1)
Defines if BarGraph information should be sent. 1 if the information
should be sent, 0 otherwise (default 1).
--audiobargraph_a-bargraph_repetition=<integer>
Sends the barGraph information every n audio
packets (default 4)
Defines how often the barGraph information should be sent. Sends the
barGraph information every n audio packets (default 4).
--audiobargraph_a-silence=<integer>
Defines if silence alarm information should
be sent (default 1)
Defines if silence alarm information should be sent. 1 if the
information should be sent, 0 otherwise (default 1).
--audiobargraph_a-time_window=<integer>
Time window to use in ms (default 5000)
Time Window during when the audio level is measured in ms for silence
detection. If the audio level is under the threshold during this
time, an alarm is sent (default 5000).
--audiobargraph_a-alarm_threshold=<float>
Minimum Audio level to raise the alarm
(default 0.1)
Threshold to be attained to raise an alarm. If the audio level is
under the threshold during this time, an alarm is sent (default 0.1).
--audiobargraph_a-repetition_time=<integer>
Time between two alarm messages in ms
(default 2000)
Time between two alarm messages in ms. This value is used to avoid
alarm saturation (default 2000).
--audiobargraph_a-connection_reset=<integer>
Force connection reset regularly (default 1)
Defines if the TCP connection should be reset. This is to be used
when using with audiobargraph_v (default 1).
Please note that this feature is using messages sent through TCP so you may have to check your firewall settings.

This feature was designed in an "head-end spirit", for monitoring purpose.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 30 guests