libVLC parameters [camera (video+sound) and desktop capture]

This forum is about all development around libVLC.
vale4674
Blank Cone
Blank Cone
Posts: 32
Joined: 29 Sep 2011 12:50

libVLC parameters [camera (video+sound) and desktop capture]

Postby vale4674 » 29 Sep 2011 13:42

Hi,

first of all let me tell you mine project requirements:

Form inside java application I need to:
  • detect USB connected camera
  • choose from which camera to stream (this is optional but it would be very good for the project)
  • record video from chosen camera and audio from chosen device and mix it all together into .flv file (multiple selected cameras = multiple .flv files)
  • in parallel save desktop screen in a separate .flv file
I run onto VLCJ library, http://code.google.com/p/vlcj/.

I played for a while with it and with VLC application itself and there are still some things that are bugging me.

form VLC application I choose to record desktop in a .flv file with these settings:
Image.

I got the normal video file as output.

Now the problem is when I use libVLC. I pass these same parameters through java application (VLCJ) and got multiple problems: it does not recognize .flv format, it does not recognize H-264 codec...

So mine questions are:
  • Does VLC uses libVLC at all?
  • How come VLC and libVLC don't act the same?
  • Where can I find libVLC parameters or some documentation? Something like http://www.videolan.org/developers/vlc/ ... ibvlc.html but with some basic stuff that tells me the parameters to pass to it so I can get a normal video output.

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

Re: libVLC parameters [camera (video+sound) and desktop capt

Postby Rémi Denis-Courmont » 29 Sep 2011 14:10

* Yes. VLC is just a very small wrapper around LibVLC.
* The code paths are not necessarily the same in your application. Also there may be bugs in your application or in vlcj.
* The parameter syntax is the same as VLC. But it is highly-version and platform-dependent.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

vale4674
Blank Cone
Blank Cone
Posts: 32
Joined: 29 Sep 2011 12:50

Re: libVLC parameters [camera (video+sound) and desktop capt

Postby vale4674 » 29 Sep 2011 14:22

1. Does VLC uses something else, besides libvlc?
2. Mine application (with VLCJ) uses the libvlc that comes with VLC. I explicitly add that (VLC installation path) path to VLCJ application. Did you mean on that code paths?
3. How come then form inside VLC I can use H-264 codec and save it as .flv file, but when I use libvlc through VLCJ it says that those formats/codes are not supported. As author of VLCJ told me, VLCJ only passes these parameters to libvlc so it is not a VLCJ issue.

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

Re: libVLC parameters [camera (video+sound) and desktop capt

Postby Rémi Denis-Courmont » 29 Sep 2011 15:44

* No, but it certainly does not use libvlc like your application does.
* Code paths as in flow of program execution.
* Most probably because you screwed up something.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

vale4674
Blank Cone
Blank Cone
Posts: 32
Joined: 29 Sep 2011 12:50

Re: libVLC parameters [camera (video+sound) and desktop capt

Postby vale4674 » 29 Sep 2011 16:32

1. Obviously
2. Don't think that is the case because only thing that I've been changing was the string with options that is being sent to libVLC. I can normally view mine camera stream if i just start media player (without any options) but if I start messing around with options string I got the above behavior.
3. When VLC lists codecs, does it "reads" from somewhere on computer which codecs are available or it always offers the same list of codes?

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

Re: libVLC parameters [camera (video+sound) and desktop capt

Postby Rémi Denis-Courmont » 29 Sep 2011 18:48

There is no list of codecs in VLC. It just tries every codec plug-in it has found in the plugins directory until one works.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

vale4674
Blank Cone
Blank Cone
Posts: 32
Joined: 29 Sep 2011 12:50

Re: libVLC parameters [camera (video+sound) and desktop capt

Postby vale4674 » 01 Oct 2011 11:26

So if I want to make my own application (which uses libVLC through VLCJ), I should list as much codecs as possible and user should find which one is working for them?

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

Re: libVLC parameters [camera (video+sound) and desktop capt

Postby Rémi Denis-Courmont » 01 Oct 2011 13:08

Whaaaaaaat?
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

vale4674
Blank Cone
Blank Cone
Posts: 32
Joined: 29 Sep 2011 12:50

Re: libVLC parameters [camera (video+sound) and desktop capt

Postby vale4674 » 01 Oct 2011 13:13

You said it that there is no list of codecs in VLC. But when I go to capture a stream it offers me to choose which codec I wish to use for video (MPEG 4, DIVIX 1...) and if I choose for e.g. MPEG 4 this error runs out:

Streaming / Transcoding failed:
It seems your FFMPEG (libavcodec) installation lacks the following encoder:
MS MPEG-4 Video v1.
If you don't know how to fix this, ask for support from your distribution.

This is not an error inside VLC media player.
Do not contact the VideoLAN project about this issue.


So the question is, why VLC offers me to choose that codec if I don't have it on my computer?

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

Re: libVLC parameters [camera (video+sound) and desktop capt

Postby Rémi Denis-Courmont » 01 Oct 2011 13:17

Because there is no list of codecs. It's just run-time probing.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

vale4674
Blank Cone
Blank Cone
Posts: 32
Joined: 29 Sep 2011 12:50

Re: libVLC parameters [camera (video+sound) and desktop capt

Postby vale4674 » 01 Oct 2011 15:00

Because there is no list of codecs. It's just run-time probing.
If it is run-time, then it shouldn't be offering me this if I don't have it on my computer?


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 9 guests