Working with Video for Linux 2 (v4l2)

*nix specific usage questions
radiobuzzer
New Cone
New Cone
Posts: 1
Joined: 07 Oct 2007 15:47

Working with Video for Linux 2 (v4l2)

Postby radiobuzzer » 07 Oct 2007 16:09

I recently installed a TV card which works fine by using the v4l2 driver. My card uses a TNF-9835-B/DFF implementation of a popular SAA713x Philips circuit.
The v4l2 driver is getting the parameters by "modprobe saa7134 card=1 tuner=9 " and afterwards it is fully functional with programs such as tvtime.
Unfortunately I cannot either see any video or do some stream encoding, which is my main purpose
I got the latest implementation VLC 9.0 of the trunk and tried to do some encoding with the following:

vlc -vvv --color v4l2:// :v4l2-dev="/dev/video0" :v4l2-input=0 --sout '#transcode{vcodec=WMV2,vb=96,scale=0.9}:duplicate{dst=std{access=mmsh,mux=asfh,dst=:5236}}

What I am getting is
VLC media player 0.9.0-svn Grishenko
[00000001] main libvlc debug: VLC media player - version 0.9.0-svn Grishenko - (c) 1996-2007 the VideoLAN team
[00000001] main libvlc debug: libvlc was configured with ./configure '--enable-v4l2' '--enable-pvr' '--enable-v4l' '--disable-mad' '--disable-glx'
[00000001] main libvlc debug: translation test: code is "el"
[00000001] main libvlc debug: checking builtin modules
[00000001] main libvlc debug: checking plugin modules
[00000001] main libvlc debug: loading plugins cache file /home/lefterav/.cache/vlc/plugins-04041e.dat
[00000001] main libvlc debug: recursively browsing `modules'
[00000001] main libvlc debug: recursively browsing `/usr/local/lib/vlc'
[00000278] main module warning: cannot find symbol "vlc_entry__0_9_0b" in file `/usr/local/lib/vlc/misc/libipv4_plugin.so' (/usr/local/lib/vlc/misc/libipv4_plugin.so: undefined symbol: _vlc_entry__0_9_0b)
[00000279] main module warning: cannot find symbol "vlc_entry__0_9_0b" in file `/usr/local/lib/vlc/misc/libsap_plugin.so' (/usr/local/lib/vlc/misc/libsap_plugin.so: undefined symbol: _vlc_entry__0_9_0b)
[00000280] main module warning: cannot find symbol "vlc_entry__0_9_0b" in file `/usr/local/lib/vlc/misc/libipv6_plugin.so' (/usr/local/lib/vlc/misc/libipv6_plugin.so: undefined symbol: _vlc_entry__0_9_0b)
[00000281] main module warning: cannot find symbol "vlc_entry__0_9_0b" in file `/usr/local/lib/vlc/demux/libaac_plugin.so' (/usr/local/lib/vlc/demux/libaac_plugin.so: undefined symbol: _vlc_entry__0_9_0b)
[00000282] main module warning: cannot find symbol "vlc_entry__0_9_0b" in file `/usr/local/lib/vlc/demux/libm3u_plugin.so' (/usr/local/lib/vlc/demux/libm3u_plugin.so: undefined symbol: _vlc_entry__0_9_0b)
[00000283] main module warning: cannot find symbol "vlc_entry__0_9_0b" in file `/usr/local/lib/vlc/demux/libid3_plugin.so' (/usr/local/lib/vlc/demux/libid3_plugin.so: undefined symbol: _vlc_entry__0_9_0b)
[00000284] main module warning: cannot find symbol "vlc_entry__0_9_0b" in file `/usr/local/lib/vlc/demux/libsgimb_plugin.so' (/usr/local/lib/vlc/demux/libsgimb_plugin.so: undefined symbol: _vlc_entry__0_9_0b)
[00000285] main module warning: cannot find symbol "vlc_entry__0_9_0b" in file `/usr/local/lib/vlc/audio_filter/libfloat32tos8_plugin.so' (/usr/local/lib/vlc/audio_filter/libfloat32tos8_plugin.so: undefined symbol: _vlc_entry__0_9_0b)
[00000286] main module warning: cannot find symbol "vlc_entry__0_9_0b" in file `/usr/local/lib/vlc/audio_filter/libfloat32tou8_plugin.so' (/usr/local/lib/vlc/audio_filter/libfloat32tou8_plugin.so: undefined symbol: _vlc_entry__0_9_0b)
[00000287] main module warning: cannot find symbol "vlc_entry__0_9_0b" in file `/usr/local/lib/vlc/audio_filter/libfixed32tos16_plugin.so' (/usr/local/lib/vlc/audio_filter/libfixed32tos16_plugin.so: undefined symbol: _vlc_entry__0_9_0b)
[00000288] main module warning: cannot find symbol "vlc_entry__0_9_0b" in file `/usr/local/lib/vlc/audio_filter/libu8tofloat32_plugin.so' (/usr/local/lib/vlc/audio_filter/libu8tofloat32_plugin.so: undefined symbol: _vlc_entry__0_9_0b)
[00000289] main module warning: cannot find symbol "vlc_entry__0_9_0b" in file `/usr/local/lib/vlc/audio_filter/libu8tofixed32_plugin.so' (/usr/local/lib/vlc/audio_filter/libu8tofixed32_plugin.so: undefined symbol: _vlc_entry__0_9_0b)
[00000290] main module warning: cannot find symbol "vlc_entry__0_9_0b" in file `/usr/local/lib/vlc/audio_filter/libs16tofixed32_plugin.so' (/usr/local/lib/vlc/audio_filter/libs16tofixed32_plugin.so: undefined symbol: _vlc_entry__0_9_0b)
[00000291] main module warning: cannot find symbol "vlc_entry__0_9_0b" in file `/usr/local/lib/vlc/audio_filter/libfloat32tos16_plugin.so' (/usr/local/lib/vlc/audio_filter/libfloat32tos16_plugin.so: undefined symbol: _vlc_entry__0_9_0b)
[00000292] main module warning: cannot find symbol "vlc_entry__0_9_0b" in file `/usr/local/lib/vlc/audio_filter/libs8tofloat32_plugin.so' (/usr/local/lib/vlc/audio_filter/libs8tofloat32_plugin.so: undefined symbol: _vlc_entry__0_9_0b)
[00000293] main module warning: cannot find symbol "vlc_entry__0_9_0b" in file `/usr/local/lib/vlc/audio_filter/libs16tofloat32_plugin.so' (/usr/local/lib/vlc/audio_filter/libs16tofloat32_plugin.so: undefined symbol: _vlc_entry__0_9_0b)
[00000294] main module warning: cannot find symbol "vlc_entry__0_9_0b" in file `/usr/local/lib/vlc/audio_filter/libfloat32tou16_plugin.so' (/usr/local/lib/vlc/audio_filter/libfloat32tou16_plugin.so: undefined symbol: _vlc_entry__0_9_0b)
[00000295] main module warning: cannot find symbol "vlc_entry__0_9_0b" in file `/usr/local/lib/vlc/audio_filter/libs16tofloat32swab_plugin.so' (/usr/local/lib/vlc/audio_filter/libs16tofloat32swab_plugin.so: undefined symbol: _vlc_entry__0_9_0b)
[00000296] main module warning: cannot find symbol "vlc_entry__0_9_0b" in file `/usr/local/lib/vlc/audio_filter/libfixed32tofloat32_plugin.so' (/usr/local/lib/vlc/audio_filter/libfixed32tofloat32_plugin.so: undefined symbol: _vlc_entry__0_9_0b)
[00000297] main module warning: cannot find symbol "vlc_entry__0_9_0b" in file `/usr/local/lib/vlc/video_filter/libdistort_plugin.so' (/usr/local/lib/vlc/video_filter/libdistort_plugin.so: undefined symbol: _vlc_entry__0_9_0b)
[00000298] main module warning: cannot find symbol "vlc_entry__0_9_0b" in file `/usr/local/lib/vlc/video_filter/libtime_plugin.so' (/usr/local/lib/vlc/video_filter/libtime_plugin.so: undefined symbol: _vlc_entry__0_9_0b)
[00000001] main libvlc debug: recursively browsing `plugins'
[00000001] main libvlc debug: module bank initialized, found 206 modules
[00000001] main libvlc debug: opening config file (/home/lefterav/.config/vlc/vlcrc)
[00000001] main libvlc debug: CPU has capabilities 486 586 MMX 3DNow! MMXEXT SSE FPU
[00000001] main libvlc debug: looking for memcpy module: 4 candidates
[00000001] main libvlc debug: using memcpy module "memcpymmxext"
[00000300] main playlist debug: adding item `Media Library' ( file/xspf-open:///home/lefterav/.local/share/vlc/ml.xsp )
[00000301] main input debug: Input is a meta file: disabling unneeded options
[00000301] main input debug: `file/xspf-open:///home/lefterav/.local/share/vlc/ml.xsp' gives access `file' demux `xspf-open' path `/home/lefterav/.local/share/vlc/ml.xsp'
[00000301] main input debug: creating access 'file' path='/home/lefterav/.local/share/vlc/ml.xsp'
[00000302] main access debug: looking for access2 module: 2 candidates
[00000302] access_directory access debug: opening directory `/home/lefterav/.local/share/vlc/ml.xsp'
[00000302] access_directory access debug: skipping non-directory `/home/lefterav/.local/share/vlc/ml.xsp'
[00000302] access_file access debug: opening file `/home/lefterav/.local/share/vlc/ml.xsp'
[00000302] main access debug: using access2 module "access_file"
[00000306] main private debug: pre-buffering...
[00000306] main private debug: received first data for our buffer
[00000301] main input debug: creating demux: access='file' demux='xspf-open' path='/home/lefterav/.local/share/vlc/ml.xsp'
[00000307] main demuxer debug: looking for demux2 module: 1 candidate
[00000307] playlist demuxer debug: using XSPF playlist reader
[00000307] main demuxer debug: using demux2 module "playlist"
[00000301] main input debug: `file/xspf-open:///home/lefterav/.local/share/vlc/ml.xsp' successfully opened
[00000321] main private debug: looking for xml module: 1 candidate
[00000321] main private debug: using xml module "xtag"
[00000300] main playlist debug: deleting item `Media Library'
[00000307] playlist demuxer debug: parsed 1 tracks successfully
[00000321] main private debug: removing module "xtag"
[00000301] main input debug: control type=1
[00000307] main demuxer debug: removing module "playlist"
[00000302] main access debug: removing module "access_file"
[00000323] main private debug: waiting for thread completion
[00000323] main private debug: thread 3072945040 (preparser) created at priority 0 (playlist/thread.c:81)
[00000324] main private debug: waiting for thread completion
[00000324] main private debug: thread 3060272016 (fetcher) created at priority 0 (playlist/thread.c:107)
[00000300] main playlist debug: waiting for thread completion
[00000300] main playlist debug: rebuilding array of current - root Λίστα αναπαραγωγής
[00000300] main playlist debug: rebuild done - 0 items, index -1
[00000300] main playlist debug: thread 3051879312 (playlist) created at priority 0 (playlist/thread.c:117)
[00000325] main interface debug: looking for interface module: 1 candidate
[00000325] main interface debug: using interface module "hotkeys"
[00000325] main interface debug: thread 3043486608 (interface) created at priority 0 (interface/interface.c:145)
[00000327] main interface debug: looking for interface module: 1 candidate
[00000327] main interface debug: using interface module "screensaver"
[00000327] main interface debug: thread 3035093904 (interface) created at priority 0 (interface/interface.c:145)
[00000300] main playlist debug: adding item `v4l2://' ( v4l2:// )
[00000329] main interface debug: looking for interface module: 1 candidate
[00000300] main playlist debug: rebuilding array of current - root Λίστα αναπαραγωγής
[00000300] main playlist debug: rebuild done - 1 items, index -1
Remote control interface initialized. Type `help' for help.
[00000329] main interface debug: using interface module "rc"
[00000329] main interface debug: thread 3026701200 (interface) created at priority 0 (interface/interface.c:145)
[00000300] main playlist debug: starting new item
[00000300] main playlist debug: processing request item null node Λίστα αναπαραγωγής skip 0
[00000300] main playlist debug: creating new input thread
[00000331] main input debug: waiting for thread completion
[00000331] main input debug: thread 3018308496 (input) created at priority 0 (input/input.c:329)
[00000300] main playlist debug: requesting art for v4l2://
[00000332] main stream output debug: stream=`transcode'
[00000333] main private debug: looking for sout stream module: 1 candidate
[00000332] main stream output debug: stream=`duplicate'
[00000336] main private debug: looking for sout stream module: 1 candidate
[00000336] stream_out_duplicate private debug: creating 'duplicate'
[00000336] stream_out_duplicate private debug: * adding `std{access=mmsh,mux=asfh,dst=:5236}'
[00000332] main stream output debug: stream=`std'
[00000338] main private debug: looking for sout stream module: 1 candidate
[00000338] main private debug: set config option: sout-standard-access to mmsh
[00000338] main private debug: set config option: sout-standard-mux to asfh
[00000338] main private debug: set config option: sout-standard-dst to :5236
[00000338] stream_out_standard private debug: creating `mmsh/asfh://:5236'
[00000338] stream_out_standard private debug: using `mmsh/asfh://:5236'
[00000340] main private debug: looking for sout access module: 1 candidate
[00000340] main private: creating httpd
[00000340] main private debug: net: listening to port 5236
[00000343] main http server debug: thread 3009915792 (httpd host thread) created at priority 0 (network/httpd.c:1089)
[00000340] main private debug: using sout access module "access_output_http"
[00000338] stream_out_standard private debug: access opened
[00000344] main private debug: looking for sout mux module: 1 candidate
[00000344] mux_asf private debug: asf muxer opened
[00000344] mux_asf private debug: creating asf stream to be used with mmsh
[00000344] mux_asf private debug: Packet size 4096
[00000344] mux_asf private debug: meta data: title='', author='', copyright='', comment='', rating=''
[00000344] main private debug: using sout mux module "mux_asf"
[00000332] main stream output debug: muxer support adding stream at any time
[00000332] main stream output debug: muxer prefers to wait for all ES before starting to mux
[00000338] stream_out_standard private debug: mux opened
[00000338] main private debug: using sout stream module "stream_out_standard"
[00000336] main private debug: using sout stream module "stream_out_duplicate"
[00000333] main private debug: set config option: sout-transcode-vcodec to WMV2
[00000333] main private debug: set config option: sout-transcode-vb to 96
[00000333] main private debug: set config option: sout-transcode-scale to 0.9
[00000333] stream_out_transcode private debug: codec video=WMV2 0x0 scaling: 0,000000 96kb/s
[00000333] main private debug: using sout stream module "stream_out_transcode"
[00000331] main input debug: `v4l2://' gives access `v4l2' demux `' path `'
[00000331] main input debug: creating demux: access='v4l2' demux='' path=''
[00000346] main demuxer debug: looking for access_demux module: 1 candidate
[00000346] v4l2 demuxer debug: V4L2 device: Typhoon TV+Radio 90031 using driver: saa7134 (version: 0.2.14) on PCI:0000:00:0a.0
[00000346] v4l2 demuxer debug: the device has the capabilities: (X) Video Capure, ( ) Audio, (X) Tuner
[00000346] v4l2 demuxer debug: supported I/O methods are: (X) Read/Write, (X) Streaming, ( ) Asynchronous
[00000346] v4l2 demuxer debug: video input 0 (Television) has type: Tuner adapter
[00000346] v4l2 demuxer debug: video input 1 (Composite1) has type: External analog input
[00000346] v4l2 demuxer debug: video input 2 (S-Video) has type: External analog input
[00000300] main playlist debug: searching art for v4l2://
[00000300] main playlist debug: looking for art finder module: 1 candidate
[00000300] main playlist debug: unable to find art
[00000300] main playlist debug: art not found for v4l2://

and I get no stream after that BUT VLC is still running and the CPU load goes to 100%


What is the status of the v4l2 support at the moment?
Can I help by doing any debugging or code writing?

xtophe
Big Cone-huna
Big Cone-huna
Posts: 1209
Joined: 24 Nov 2003 10:12
Location: Bristol, England

Re: Working with Video for Linux 2 (v4l2)

Postby xtophe » 08 Oct 2007 00:28

1st: an important and large patch to the v4l2 code has commited recently so make sure to hae a really fresh svn
Then try without the transcode just try to see the video locally
Xtophe

Wessels
New Cone
New Cone
Posts: 5
Joined: 27 Jul 2007 09:32

Re: Working with Video for Linux 2 (v4l2)

Postby Wessels » 09 Oct 2007 12:23

After my svn update vlc successfully works with Logitech QuickCam Fusion (via V4L2).
Thank you all! :D

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: Working with Video for Linux 2 (v4l2)

Postby Jean-Baptiste Kempf » 09 Oct 2007 19:11

What version of SVN?
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.

Wessels
New Cone
New Cone
Posts: 5
Joined: 27 Jul 2007 09:32

Re: Working with Video for Linux 2 (v4l2)

Postby Wessels » 10 Oct 2007 15:29

Hi JB,

Sorry, I mean I updated VLC (using svn). The V4L2 input module update was committed on the 2007-10-09 as you probably know. I wanted to complete the V4L2 input module code but found out that a recent update was available. Lucky me.

I am also interested in the upcoming (still to do) mjpeg support. Also being able to set the contrast, brightness and to turn off the flicker induced by a 50 Hz light source (bulb) etc. I will be trying to fix that in the source code next. Still learning V4L/V4L2 and VLC.

Good luck with rugby world cup!

asdufisn

Re: Working with Video for Linux 2 (v4l2)

Postby asdufisn » 20 Oct 2007 16:39

After my svn update vlc successfully works with Logitech QuickCam Fusion (via V4L2).
Thank you all! :D
I've been wishing for this for a loooong time because I also have Logitech QuickCam Fusion (via V4L2) and need some application capable of capturing both audio+video.
And now I'm almost... almost there... Just some minor issue.

I use Debian and have VLC's nightbuild repository on my sources.
I'm trying to install the vlc package but: vlc depends on libvlc0 and libvlc1, but libvlc1 conflicts with libvlc0.
Now, this is the first time apt lets me down... Any hints on this?
BTW, the vlc packages apt lists me is 0.9.0-svn20071020-1-0, so it can't get any more updated than this.

$uname -a
Linux 2.6.21-2-amd64 #1 SMP Tue Jul 10 21:39:38 UTC 2007 x86_64 GNU/Linux

Thanks a bunch, I really appreciate it!

xtophe
Big Cone-huna
Big Cone-huna
Posts: 1209
Joined: 24 Nov 2003 10:12
Location: Bristol, England

Re: Working with Video for Linux 2 (v4l2)

Postby xtophe » 20 Oct 2007 17:22

My fault.

I was playing with the packaging to see if a bug with libtool was fixed and didn't check properly
Will be fixed in the next nightly
Xtophe

asdufisn

Re: Working with Video for Linux 2 (v4l2)

Postby asdufisn » 21 Oct 2007 12:16

I'm still unable to record video from my Logitech Quickcam Fusion 5000 :cry:

Code: Select all

$vlc v4l2:// :v4l2-dev=/dev/video1 :v4l2-adev=/dev/dsp2 :v4l2-standard=0 :sout=#transcode{vcodec=mp4v,vb=800,scale=0.25,acodec=mp3,ab=128,channels=2}:std{access=file,dst=/tmp/test.mpg} ... [00000340] main playlist error: thread 47849181796144: mutex_lock failed at ../include/vlc_input.h:337 (35:Resource deadlock avoided) [00000340] main playlist error: thread 47849181796144: mutex_unlock failed at input/input.c:2571 (1:Operation not permitted) [00000374] main private error: no sout stream module matched "transcodechannels=2" [00000373] main stream output error: stream chain failed for `transcodechannels=2:stddst=/tmp/test.mpg' [00000372] main input error: cannot start stream output instance, aborting
Note that the first 2 error messages always pop up, even when I start vlc from the command line with no arguments.

I also tried recording from the GUI application but with no success.

Wessels how did you manage to record video+audio from your webcam?

Wessels
New Cone
New Cone
Posts: 5
Joined: 27 Jul 2007 09:32

Re: Working with Video for Linux 2 (v4l2)

Postby Wessels » 23 Oct 2007 12:11

Hi,

Are you able to view the video from the camera? I used
vlc -vvv --color v4l2:// :v4l2-dev="/dev/video0" :v4l2-input=0 --sout ’#duplicate{dst=display}'.

I haven't done any recording. Not interested yet.

I have only done http streaming using:
(server): vlc -vvv --color v4l2:// :v4l2-dev="/dev/video0" --sout '#duplicate{dst=std{access=http,mux=asf,dst=192.168.0.81:5000}}'
(client): vlc http://192.168.0.81:5000

Good luck! :D

asdufisn

Re: Working with Video for Linux 2 (v4l2)

Postby asdufisn » 30 Oct 2007 21:55

Wessels I can view the camera with the command I posted... the problem is that I'm unable to record anything :cry:
My fault.
I was playing with the packaging to see if a bug with libtool was fixed and didn't check properly
Will be fixed in the next nightly
It seems the problem is back once in a while. Now the problem is that mozilla-plugin-vlc depends on libvlc0 when it should depend on libvlc1

xtophe
Big Cone-huna
Big Cone-huna
Posts: 1209
Joined: 24 Nov 2003 10:12
Location: Bristol, England

Re: Working with Video for Linux 2 (v4l2)

Postby xtophe » 30 Oct 2007 23:51

It seems the problem is back once in a while. Now the problem is that mozilla-plugin-vlc depends on libvlc0 when it should depend on libvlc1
Thanks for noticing. should be fixed in tonight nightlies.

For the record problem, it's likely you need to to escape the # or add some " or ' around your sout string else the shell mess it
Xtophe


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 28 guests