[streaming] streaming from webcam (VLC server built on ARM based platform)
rossella battaglia
roxen_b at yahoo.it
Fri May 29 16:23:30 CEST 2009
Hi all,
I built VLC form my ARM based embedded system (CALAO usba9263).
My aim is to stream the video acquired from the webcam that I plugged to the CALAO to a multicast group.
After a billion of problem about VLC cross-compilation I installed vlc on
the CALAO, but when I tried to stream it exit with no error ( echo $? return 0).
I can't understand why and I hope that VLC team could me suggest a way in order to know how it works.
Actually I debugged VLC by using QtCreator on my PC (x86), but I didn't understand the problem beacause the same command as ARM here (on my PC) works!
I post configuration options of VLC
--enable-faad --with-faad-tree=/home/LIBVLC/faad2-2.7/INSTALLED/lib --with-freetype-config-path=/home/ARM_KIT/usb-a9263-buildroot-20080229/build_arm/staging_dir/usr/bin/ -with-fribidi-config-path=/home/LIBVLC/fribidi-0.10.9/INSTALLED/bin -enable-libmpeg2 --with-libmpeg2-tree=/home/LIBVLC/libmpeg2-0.5.0/INSTALLED/lib/ CFLAGS="-I/home/mpeg2dec-0.4.0/INSTALLED/include -I/home/ARM_KIT/usb-a9263-buildroot-20080229/build_arm/vlc-0.8.6e/modules/codec/ffmpeg -I/home/LIBVLC/ffmpeg-0.5/INSTALLED/include -I/home/LIBVLC/ffmpeg-0.5/INSTALLED/include/libavcodec -I/home/LIBVLC/ffmpeg-0.5/INSTALLED/include/libavformat -I/home/LIBVLC/ffmpeg-0.5/INSTALLED/include/libavutil -I /home/LIBVLC/ffmpeg-0.5/INSTALLED/include/libpostproc -I/home/LIBVLC/ffmpeg-0.5/INSTALLED/include/libavdevice -I/home/LIBVLC/fribidi-0.10.9/INSTALLED/include/fribidi -I/home/LIBVLC/faad2-2.7/INSTALLED/include" LDFLAGS="-lbz2 -L/home/roxen/Scrivania/LIBVLC/libmpeg2-0.5.0/libmpeg2/.libs/
-L/home/roxen/Scrivania/LIBVLC/libdvbpsi5-0.1.6/INSTALLED/lib -L/home/LIBVLC/fribidi-0.10.9/INSTALLED/lib -L/home/ARM_KIT/usb-a9263-buildroot-20080229/build_arm/staging_dir/lib/" --enable-dvbpsi --with-dvbpsi=/home/roxen/Scrivania/LIBVLC/libdvbpsi5-0.1.6/INSTALLED/ --disable-daap --disable-libxml2 --disable-notify --disable-gnutls --disable-sdl --disable-sdl-image --disable-bonjour --disable-wxwidgets --disable-skins2 --disable-a52 --disable-glx --enable-v4l --disable-remoteosd --disable-hal --disable-dbus --disable-dbus-control --disable-gnomevfs --disable-cddax --disable-cdda --disable-libcddb --disable-mad --disable-avcodec --with-ffmpeg-tree=/home/LIBVLC/ffmpeg-0.5/INSTALLED/lib/ --disable-ogg --with-ffmpeg-zlib --enable-debug --disable-optimizations --enable-qte
In order to build ffmpeg I used the following configuration options
./configure --prefix=/home/LIBVLC/ffmpeg-0.cvs20070307/INSTALLED --arch=arm --cpu=arm9 --cc=gcc --cross-compile --target-os=linux --cross-prefix=arm-linux- --enable-gpl --enable-pp --enable-zlib --extra-cflags="-I/home/roxen/Documenti/ARM_KIT/usb-a9263-buildroot-20080229/build_arm/staging_dir/usr/include/" --extra-libs="-L/home/roxen/Documenti/ARM_KIT/usb-a9263-buildroot-20080229/build_arm/staging_dir/lib/ -lbz2" --enable-shared
In order to stream I run VLC with the following command:
./vlc -vvvv v4l:// :v4l-vdev="/dev/video1" \
:v4l-size="":v4l-caching=200 :v4l-chroma="" :v4l-fps=0.000000 \
:no-v4l-config :v4l-video-input=-1 :v4l-video-output=-1 \
:v4l-chroma="" :v4l-width=320 :v4l-height=240 :v4l-brightness=-1 \
:v4l-colour=-1 :v4l-hue=-1 :v4l-contrast=-1 :no-v4l-mjpeg :v4l-decimation=1 :v4l-quality=100 \
--sout '#transcode{vcodec=mp4v,vb=800,ab=128,deinterlace}:standard{access=udp,mux=ts,url=239.255.12.42,sap=TestStream}'
The output is :
....
status change: ( audio volume: 256 )
status change: ( play state: 1 )
[00000240] main stream output debug: stream=`transcode'
[00000241] main private debug: looking for sout stream module: 1 candidate
[00000240] main stream output debug: stream=`standard'
[00000244] main private debug: looking for sout stream module: 1 candidate
[00000244] main private debug: set sout option: sout-standard-access to udp
[00000244] main private debug: set sout option: sout-standard-mux to ts
[00000244] main private warning: Option sout-standard-url is deprecated. You should use sout-standard-dst instead.
[00000244] main private debug: set sout option: sout-standard-dst to 239.255.12.42
[00000244] main private debug: set sout option: sout-standard-sap to TestStream
[00000244] stream_out_standard private debug: creating `udp/ts://239.255.12.42'
[00000244] stream_out_standard private debug: extension is 42
[00000244] stream_out_standard private debug: extension -> mux=(null)
[00000244] stream_out_standard private debug: using `udp/ts://239.255.12.42'
[00000246] main private debug: looking for sout access module: 1 candidate
[00000246] main private debug: net: connecting to 239.255.12.42 port 1234
[00000246] main private debug: localized Domain Names not supported - disabled
[00000248] main private debug: thread 7176 (sout write thread) created at priority 0 (udp.c:268)
[00000246] access_output_udp private debug: udp access output opened(239.255.12.42:1234)
[00000246] main private debug: using sout access module "access_output_udp"
[00000244] stream_out_standard private debug: access opened
[00000249] main private debug: looking for sout mux module: 1 candidate
[00000249] mux_ts private debug: shaping=200000 pcr=70000 dts_delay=400000
[00000249] main private debug: using sout mux module "mux_ts"
[00000240] main stream output debug: muxer support adding stream at any time
[00000244] stream_out_standard private debug: mux opened
[00000244] stream_out_standard private: SAP Enabled
[00000240] main stream output debug: No announce handler found, creating one
[00000240] main stream output debug: creation done
[00000251] main announce handler debug: registering announce
[00000252] main private debug: thread 8201 (sap handler) created at priority 0 (stream_output/sap.c:124)
[00000251] main announce handler debug: thread created, 0 sessions
[00000251] main announce handler debug: creating SAP announce handler
[00000251] main announce handler debug: adding SAP session
[00000252] main private debug: using SAP address: 239.255.255.255
[00000252] main private debug: net: connecting to 239.255.255.255 port 9875
[00000252] main private debug: Generated SDP (164 bytes):
v=0
o=- 5472185515 969 IN IP4 192.168.60.54
s=239.255.12.42
c=IN IP4 239.255.12.42
t=0 0
a=tool:vlc 0.8.6e
a=recvonly
a=type:broadcast
m=video 1234 udp 33
[00000252] main private debug: 1 addresses, 1 sessions
[00000244] main private debug: using sout stream module "stream_out_standard"
[00000241] main private debug: set sout option: sout-transcode-vcodec to mp4v
[00000241] main private debug: set sout option: sout-transcode-vb to 800
[00000241] main private debug: set sout option: sout-transcode-ab to 128
[00000241] main private debug: set sout option: sout-transcode-deinterlace to (null)
[00000241] stream_out_transcode private debug: codec video=mp4v 0x0 scaling: 1.000000 800kb/s
[00000241] main private debug: using sout stream module "stream_out_transcode"
[00000238] main input debug: `v4l://' gives access `v4l' demux `' path `'
[00000238] main input debug: creating demux: access='v4l' demux='' path=''
[00000253] main demuxer debug: looking for access_demux module: 1 candidate
[00000253] v4l demuxer debug: V4L device OV511 USB Camera 1 channels 0 audios 64 < w < 640 48 < h < 480
[00000253] v4l demuxer debug: setting channel Camera(0) 0 tuners flags=0x0 type=0x2 norm=0x0
[00000253] v4l demuxer debug: v4l device uses brightness: 32000
[00000253] v4l demuxer debug: v4l device uses colour: 40960
[00000253] v4l demuxer debug: v4l device uses hue: 37632
[00000253] v4l demuxer debug: v4l device uses contrast: 0
[00000253] v4l demuxer debug: v4l device uses frame size: 18432
[00000253] v4l demuxer debug: v4l device uses chroma: I420
[00000253] v4l demuxer error: cannot open audio device (No such file or directory)
[00000253] v4l demuxer debug: v4l grabbing started
[00000253] v4l demuxer debug: added new video es I420 128x96
[00000238] main input debug: selecting program id=0
[00000253] main demuxer debug: using access_demux module "v4l"
[00000255] main packetizer debug: looking for packetizer module: 14 candidates
[00000255] main packetizer debug: using packetizer module "rawvideo"
[00000255] main packetizer debug: thread 9226 (decoder) created at priority 0 (input/decoder.c:159)
[00000238] main input debug: starting in sync mode
[00000238] main input debug: `v4l://' successfully opened
On my PC instead the same command works and returns
....
00000994] main stream output debug: creation done
[00001001] main announce handler debug: registering announce
[00001002] main private debug: thread 2983791504 (sap handler) created at priority 0 (stream_output/sap.c:124)
[00001001] main announce handler debug: thread created, 0 sessions
[00001001] main announce handler debug: creating SAP announce handler
[00001001] main announce handler debug: adding SAP session
[00001002] main private debug: using SAP address: 239.255.255.255
[00001002] main private debug: net: connecting to 239.255.255.255 port 9875
[00001002] main private debug: Generated SDP (171 bytes):
v=0
o=- 1243606148244563 1903 IN IP4 192.168.60.88
s=239.255.12.42
c=IN IP4 239.255.12.42
t=0 0
a=tool:vlc 0.8.6e
a=recvonly
a=type:broadcast
m=video 1234 udp 33
[00001002] main private debug: 1 addresses, 1 sessions
[00000997] main private debug: using sout stream module "stream_out_standard"
[00000995] main private debug: set sout option: sout-transcode-vcodec to mp4v
[00000995] main private debug: set sout option: sout-transcode-vb to 800
[00000995] main private debug: set sout option: sout-transcode-ab to 128
[00000995] main private debug: set sout option: sout-transcode-deinterlace to (null)
[00000995] stream_out_transcode private debug: codec video=mp4v 0x0 scaling: 1.000000 800kb/s
[00000995] main private debug: using sout stream module "stream_out_transcode"
[00000993] main input debug: `v4l://' gives access `v4l' demux `' path `'
[00000993] main input debug: creating demux: access='v4l' demux='' path=''
[00001003] main demuxer debug: looking for access_demux module: 2 candidates
[00000933] skins2 interface warning: cannot find node with id -1
[00001003] v4l demuxer debug: V4L device OV511 USB Camera 1 channels 0 audios 64 < w < 640 48 < h < 480
[00001003] v4l demuxer debug: setting channel Camera(0) 0 tuners flags=0x0 type=0x2 norm=0x0
[00001003] v4l demuxer debug: v4l device uses brightness: 32512
[00001003] v4l demuxer debug: v4l device uses colour: 40960
[00001003] v4l demuxer debug: v4l device uses hue: 32768
[00001003] v4l demuxer debug: v4l device uses contrast: 0
[00001003] v4l demuxer debug: v4l device uses frame size: 115200
[00001003] v4l demuxer debug: v4l device uses chroma: I420
[00001003] v4l demuxer error: cannot open audio device (No such file or directory)
[00001003] v4l demuxer debug: v4l grabbing started
[00001003] v4l demuxer debug: added new video es I420 320x240
[00000993] main input debug: selecting program id=0
[00001003] main demuxer debug: using access_demux module "v4l"
[00001004] main packetizer debug: looking for packetizer module: 30 candidates
[00001004] main packetizer debug: using packetizer module "rawvideo"
[00001004] main packetizer debug: thread 2975398800 (decoder) created at priority 0 (input/decoder.c:159)
[00000993] main input debug: starting in sync mode
[00000993] main input debug: `v4l://' successfully opened
[00000994] main stream output debug: adding a new input
[00000995] stream_out_transcode private debug: creating video transcoding from fcc=`I420' to fcc=`mp4v'
[00001005] main decoder debug: looking for decoder module: 40 candidates
[00001005] main decoder debug: using decoder module "rawvideo"
[00001006] main encoder debug: looking for encoder module: 8 candidates
[00001006] ffmpeg encoder debug: libavcodec already initialized
[00001006] ffmpeg encoder debug: found encoder MPEG-4 Video
[00001006] main encoder debug: using encoder module "ffmpeg"
[00001006] main encoder debug: removing module "ffmpeg"
[00000995] stream_out_transcode private debug: decoder aspect is 576000:432000
[00000995] stream_out_transcode private debug: source pixel aspect is 1.000000:1
[00000995] stream_out_transcode private debug: scaled pixel aspect is 1.000000:1
[00000995] stream_out_transcode private debug: source 320x240, crop 320x240, destination 320x240, padding 320x240
[00000995] stream_out_transcode private debug: encoder aspect is 576000:432000
[00001006] main encoder debug: looking for encoder module: 8 candidates
[00001006] ffmpeg encoder debug: libavcodec already initialized
[00001006] ffmpeg encoder debug: found encoder MPEG-4 Video
[00001006] main encoder debug: using encoder module "ffmpeg"
[00001000] main private debug: adding a new input
[00001000] mux_ts private debug: adding input codec=mp4v pid=68
[00001000] mux_ts private debug: new PCR PID is 68
[00001007] main private debug: looking for video filter2 module: 8 candidates
[00001008] deinterlace private debug: using blend deinterlace mode
[00001008] deinterlace private debug: using blend deinterlace method
[00001007] deinterlace private debug: deinterlacing
[00001007] main private debug: using video filter2 module "deinterlace"
[00000998] access_output_udp private warning: putting two PCRs at once
I also tried to stream from a file
vlc -vvv ../100_1568.MOV --sout udp:239.255.12.42 --ttl 12
the behaviour is similar. On the CALAO it stop working with no error, whereas
on my PC it streams :
CALAO:
....
0000786] mp4 private debug: read box: "hdlr" handler type alis name
[00000786] mp4 private debug: found Box: dinf size 36
[00000786] mp4 private debug: found Box: dref size 28
[00000786] mp4 private debug: found Box: alis size 12
[00000786] mp4 private warning: unknown box type alis (incompletely loaded)
[00000786] mp4 private debug: out of bound child
[00000786] mp4 private debug: read box: "dref" entry-count 1
[00000786] mp4 private debug: out of bound child
[00000786] mp4 private debug: found Box: stbl size 7144
[00000786] mp4 private debug: found Box: stsd size 52
[00000786] mp4 private debug: found Box: raw size 36
[00000786] mp4 private debug: read box: "soun" mp4 or qt1/2 (rest=0)
[00000786] mp4 private debug: read box: "soun" in stsd channel 1 sample size 8 sample rate 11025.000000
[00000786] mp4 private debug: out of bound child
[00000786] mp4 private debug: read box: "stsd" entry-count 1
[00000786] mp4 private debug: found Box: stts size 24
[00000786] mp4 private debug: read box: "stts" entry-count 1
[00000786] mp4 private debug: found Box: stsc size 5272
[00000786] mp4 private debug: read box: "stsc" entry-count 438
[00000786] mp4 private debug: found Box: stsz size 20
[00000786] mp4 private debug: read box: "stsz" sample-size 1 sample-count 320684
[00000786] mp4 private debug: found Box: stco size 1768
[00000786] mp4 private debug: read box: "co64" entry-count 438
[00000786] mp4 private debug: out of bound child
[00000786] mp4 private debug: out of bound child
[00000786] mp4 private debug: out of bound child
[00000786] mp4 private debug: out of bound child
[00000786] mp4 private debug: found Box: udta size 100
main warning: can't store message (Invalid or incomplete multibyte or wide character): found Box:
main warning: can't store message (Invalid or incomplete multibyte or wide character): read box: "
main warning: can't store message (Invalid or incomplete multibyte or wide character): found Box:
main warning: can't store message (Invalid or incomplete multibyte or wide character): read box: "
[00000786] mp4 private debug: out of bound child
[00000786] mp4 private debug: out of bound child
[00000786] mp4 private debug: out of bound child
[00000786] mp4 private debug: dumping root Box "root"
[00000786] mp4 private debug: | + skip size 280
[00000786] mp4 private debug: | + mdat size 22592516
[00000786] mp4 private debug: | + moov size 11682
[00000786] mp4 private debug: | | + mvhd size 108
[00000786] mp4 private debug: | | + trak size 4014
[00000786] mp4 private debug: | | | + tkhd size 92
[00000786] mp4 private debug: | | | + edts size 36
[00000786] mp4 private debug: | | | | + elst size 28
[00000786] mp4 private debug: | | | + mdia size 3878
[00000786] mp4 private debug: | | | | + mdhd size 32
[00000786] mp4 private debug: | | | | + hdlr size 36
[00000786] mp4 private debug: | | | | + minf size 3802
[00000786] mp4 private debug: | | | | | + vmhd size 20
[00000786] mp4 private debug: | | | | | + hdlr size 36
[00000786] mp4 private debug: | | | | | + dinf size 36
[00000786] mp4 private debug: | | | | | | + dref size 28
[00000786] mp4 private debug: | | | | | | | + alis size 12
[00000786] mp4 private debug: | | | | | + stbl size 3702
[00000786] mp4 private debug: | | | | | | + stsd size 102
[00000786] mp4 private debug: | | | | | | | + jpeg size 86
[00000786] mp4 private debug: | | | | | | + stts size 24
[00000786] mp4 private debug: | | | | | | + stsc size 28
[00000786] mp4 private debug: | | | | | | + stsz size 1772
[00000786] mp4 private debug: | | | | | | + stco size 1768
[00000786] mp4 private debug: | | + trak size 7452
[00000786] mp4 private debug: | | | + tkhd size 92
[00000786] mp4 private debug: | | | + edts size 36
[00000786] mp4 private debug: | | | | + elst size 28
[00000786] mp4 private debug: | | | + mdia size 7316
[00000786] mp4 private debug: | | | | + mdhd size 32
[00000786] mp4 private debug: | | | | + hdlr size 36
[00000786] mp4 private debug: | | | | + minf size 7240
[00000786] mp4 private debug: | | | | | + smhd size 16
[00000786] mp4 private debug: | | | | | + hdlr size 36
[00000786] mp4 private debug: | | | | | + dinf size 36
[00000786] mp4 private debug: | | | | | | + dref size 28
[00000786] mp4 private debug: | | | | | | | + alis size 12
[00000786] mp4 private debug: | | | | | + stbl size 7144
[00000786] mp4 private debug: | | | | | | + stsd size 52
[00000786] mp4 private debug: | | | | | | | + raw size 36
[00000786] mp4 private debug: | | | | | | + stts size 24
[00000786] mp4 private debug: | | | | | | + stsc size 5272
[00000786] mp4 private debug: | | | | | | + stsz size 20
[00000786] mp4 private debug: | | | | | | + stco size 1768
[00000786] mp4 private debug: | | + udta size 100
[00000786] mp4 private debug: | | | +
[00000786] mp4 private debug: | | | +
[00000787] mp4 demuxer debug: file type box missing (assuming ISO Media file)
[00000787] mp4 demuxer debug: found 2 tracks
[00000787] mp4 demuxer warning: elst box found
[00000787] mp4 demuxer debug: - [0] duration=29087ms media time=0ms) rate=1.0
[00000787] mp4 demuxer debug: track[Id 0x1] read 438 chunk
[00000787] mp4 demuxer debug: track[Id 0x1] read 438 samples length:29s
[00000775] main input debug: selecting program id=0
[00000787] mp4 demuxer debug: adding track[Id 0x1] video (enable) language undef
[00000787] mp4 demuxer warning: elst box found
[00000787] mp4 demuxer debug: - [0] duration=29087ms media time=0ms) rate=1.0
[00000787] mp4 demuxer debug: track[Id 0x2] read 438 chunk
[00000787] mp4 demuxer debug: track[Id 0x2] read 320684 samples length:29s
[00000787] mp4 demuxer debug: adding track[Id 0x2] audio (enable) language undef
[00000787] main demuxer debug: using demux2 module "mp4"
[00000787] mp4 demuxer warning: DEMUX_GET_FPS unimplemented !!
[00000775] main input debug: looking for a subtitle file in ../
[00000789] main packetizer debug: looking for packetizer module: 30 candidates
[00000789] main packetizer debug: using packetizer module "packetizer_copy"
[00000775] main input debug: stream out mode -> no decoder thread
[00000815] main packetizer debug: looking for packetizer module: 30 candidates
[00000815] main packetizer debug: using packetizer module "packetizer_copy"
[00000775] main input debug: stream out mode -> no decoder thread
[00000775] main input debug: starting in sync mode
[00000775] main input debug: `../100_1568.MOV' successfully opened
[00000787] mp4 demuxer debug: elst (0) gives 0ms (movie)-> 0ms (track)
[00000787] mp4 demuxer debug: track[Id 0x1] does not provide Sync Sample Box (stss)
[00000787] mp4 demuxer debug: elst (0) gives 0ms (movie)-> 0ms (track)
[00000787] mp4 demuxer debug: track[Id 0x2] does not provide Sync Sample Box (stss)
[00000776] main stream output debug: adding a new input
[00000782] main private debug: adding a new input
[00000782] mux_ts private debug: adding input codec=MJPG pid=68
[00000782] mux_ts private debug: new PCR PID is 68
[00000776] main stream output debug: adding a new input
[00000782] main private debug: adding a new input
[00000782] mux_ts private debug: adding input codec=u8 pid=69
[00000782] main private error: cannot add this stream
[00000815] main packetizer error: cannot create packetizer output (u8 )
and exit. The stream not start!!!
On the PC the output is the same but it streams and not exit.
Please help me !!!!!! Thank you for attention!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/streaming/attachments/20090529/689c09c0/attachment-0001.htm>
More information about the streaming
mailing list