Page 1 of 1

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

Posted: 29 Sep 2011 13:42
by vale4674
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.

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

Posted: 29 Sep 2011 14:10
by Rémi Denis-Courmont
* 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.

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

Posted: 29 Sep 2011 14:22
by vale4674
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.

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

Posted: 29 Sep 2011 15:44
by Rémi Denis-Courmont
* 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.

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

Posted: 29 Sep 2011 16:32
by vale4674
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?

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

Posted: 29 Sep 2011 18:48
by Rémi Denis-Courmont
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.

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

Posted: 01 Oct 2011 11:26
by vale4674
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?

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

Posted: 01 Oct 2011 13:08
by Rémi Denis-Courmont
Whaaaaaaat?

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

Posted: 01 Oct 2011 13:13
by vale4674
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?

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

Posted: 01 Oct 2011 13:17
by Rémi Denis-Courmont
Because there is no list of codecs. It's just run-time probing.

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

Posted: 01 Oct 2011 15:00
by vale4674
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?