我有一台相机通过USB线连接到BeagleBone Black(BBB)板,BBB运行Linux 3.8.13-bone70 armv7l。我想用相机录制视频并通过局域网将这个视频流传输到PC,但它不起作用。 请帮忙找出这里有什么问题。 这就是我所做的:
下面输入命令:
debian@beaglebone$ cvlc -vvv v4l2:///dev/video0:chroma=h264:width=1280:height=720:fps=30 --sout 10.92.200.76 --sout-rtp-caching --live-caching=130
这是VLC日志结果:
VLC media player 2.0.6 Twoflower (revision 2.0.6-0-gbe9623c)
[0x138f0] main libvlc debug: VLC media player - 2.0.6 Twoflower
[0x138f0] main libvlc debug: Copyright © 1996-2013 VLC authors and VideoLAN
[0x138f0] main libvlc debug: revision 2.0.6-0-gbe9623c
[0x138f0] main libvlc debug: configured with ./configure '--enable- static' '--build=arm-linux-gnueabihf' 'CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2' 'CPPFLAGS=-D_FORTIFY_SOURCE=2' 'CXXFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security' 'LDFLAGS=-Wl,-z,relro -Wl,--as-needed' '--config-cache' '--disable-maintainer-mode' '--disable-silent-rules' '--disable-update-check' '--enable-fast-install' '--prefix=/usr' '--docdir=/usr/share/doc/vlc-nox' '--sysconfdir=/etc' '--with-binary-version=dmo3' '--enable-a52' '--enable-aa' '--enable-bluray' '--enable-bonjour' '--enable-caca' '--enable-dbus' '--enable-dca' '--enable-dirac' '--enable-dvbpsi' '--enable-dvdnav' '--enable-faad' '--enable-flac' '--enable-fluidsynth' '--enable-freetype' '--enable-fribidi' '--enable-gnutls' '--enable-jack' '--enable-kate' '--enable-libass' '--enable-libmpeg2' '--enable-libproxy' '--enable-libxml2' '--enable-lirc' '--enable-live555' '--enable-mad' '--enable-mkv' '--enable-mod' '--enable-mpc' '--enable-mtp' '--enable-mux_ogg' '--enable-ncurses' '--enable-notify' '--enable-ogg' '--enable-oss' '--enable-pulse' '--enable-qt4' '--enable-realrtsp' '--enable-samplerate' '--enable-schroedinger' '--enable-sdl' '--enable-sftp' '--enable-shout' '--enable-skins2' '--enable-smb' '--enable-speex' '--enable-svg' '--enable-taglib' '--enable-theora' '--enable-twolame' '--enable-upnp' '--enable-vcd' '--enable-vcdx' '--enable-vorbis' '--enable-x264' '--enable-zvbi' '--with-kde-solid=/usr/share/kde4/apps/solid/actions/' '--disable-dxva2' '--disable-gnomevfs' '--disable-goom' '--disable-portaudio' '--disable-projectm' '--disable-sqlite' '--disable-telx' '--enable-alsa' '--enable-atmo' '--enable-dc1394' '--enable-dv' '--enable-libva' '--enable-linsys' '--enable-pvr' '--enable-udev' '--enable-v4l2' '--enable-omxil' 'build_alias=arm-linux-gnueabihf' 'CC=ccache cc' 'CXX=ccache g++'
[0x138f0] main libvlc debug: searching plug-in modules
[0x138f0] main libvlc debug: loading plugins cache file /usr/lib/vlc/plugins/plugins.dat
[0x138f0] main libvlc debug: recursively browsing `/usr/lib/vlc/plugins'
[0x138f0] main libvlc debug: saving plugins cache /usr/lib/vlc/plugins/plugins.dat
[0x138f0] main libvlc debug: plug-ins loaded: 413 modules
[0x138f0] main libvlc debug: opening config file (/home/debian/.config/vlc/vlcrc)
[0x138f0] main libvlc debug: translation test: code is "C"
[0x138f0] main libvlc debug: CPU has capabilities NEONv1 FPU
[0x138f0] main libvlc debug: looking for memcpy module: 1 candidate
[0x138f0] main libvlc debug: using memcpy module "memcpy"
[0x182358] main input debug: Creating an input for 'Media Library'
[0x182358] main input debug: Input is a meta file: disabling unneeded options
[0x182358] main input debug: using timeshift granularity of 50 MiB, in path '/tmp'
[0x182358] main input debug: `file/xspf-open:///home/debian/.local/share/vlc/ml.xspf' gives access `file' demux `xspf-open' path `/home/debian/.local/share/vlc/ml.xspf'
[0x182358] main input debug: creating demux: access='file' demux='xspf-open' location='/home/debian/.local/share/vlc/ml.xspf' file='/home/debian/.local/share/vlc/ml.xspf'
[0x270b0] main demux debug: looking for access_demux module: 3 candidates
[0x270b0] main demux debug: no access_demux module matching "file" could be loaded
[0x270b0] main demux debug: TIMER module_need() : 11.316 ms - Total 11.316 ms / 1 intvls (Avg 11.316 ms)
[0x182358] main input debug: creating access 'file' location='/home/debian/.local/share/vlc/ml.xspf', path='/home/debian/.local/share/vlc/ml.xspf'
[0xaada8] main access debug: looking for access module: 2 candidates
[0xaada8] filesystem access debug: opening file `/home/debian/.local/share/vlc/ml.xspf'
[0xaada8] main access debug: using access module "filesystem"
[0xaada8] main access debug: TIMER module_need() : 6.382 ms - Total 6.382 ms / 1 intvls (Avg 6.382 ms)
[0xa9f40] main stream debug: Using stream method for AStream*
[0xa9f40] main stream debug: starting pre-buffering
[0xa9f40] main stream debug: received first data after 0 ms
[0xa9f40] main stream debug: pre-buffering done 296 bytes in 0s - 588 KiB/s
[0xa9970] main stream debug: looking for stream_filter module: 7 candidates
[0xa9970] main stream debug: no stream_filter module matching "any" could be loaded
[0xa9970] main stream debug: TIMER module_need() : 8.946 ms - Total 8.946 ms / 1 intvls (Avg 8.946 ms)
[0xa9970] main stream debug: looking for stream_filter module: 0 candidates
[0xa9970] main stream debug: no stream_filter module matched "smooth"
[0xa9970] main stream debug: TIMER module_need() : 2.826 ms - Total 2.826 ms / 1 intvls (Avg 2.826 ms)
[0xa9f40] main stream warning: failed to insert stream filter smooth
[0xa9970] main stream debug: looking for stream_filter module: 1 candidate
[0xa9970] main stream debug: using stream_filter module "stream_filter_record"
[0xa9970] main stream debug: TIMER module_need() : 3.374 ms - Total 3.374 ms / 1 intvls (Avg 3.374 ms)
[0x182358] main input debug: creating demux: access='file' demux='xspf-open' location='/home/debian/.local/share/vlc/ml.xspf' file='/home/debian/.local/share/vlc/ml.xspf'
[0xab7b8] main demux debug: looking for demux module: 1 candidate
[0xab7b8] playlist demux debug: using XSPF playlist reader
[0xab7b8] main demux debug: using demux module "playlist"
[0xab7b8] main demux debug: TIMER module_need() : 4.799 ms - Total 4.799 ms / 1 intvls (Avg 4.799 ms)
[0xae518] main demux meta debug: looking for meta reader module: 2 candidates
[0xae518] lua demux meta debug: Trying Lua scripts in /home/debian/.local/share/vlc/lua/meta/reader
[0xae518] lua demux meta debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/reader
[0xae518] lua demux meta debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/reader/filename.luac
[0xae518] lua demux meta debug: Trying Lua scripts in /usr/share/vlc/lua/meta/reader
[0xae518] main demux meta debug: no meta reader module matching "any" could be loaded
[0xae518] main demux meta debug: TIMER module_need() : 26.369 ms - Total 26.369 ms / 1 intvls (Avg 26.369 ms)
[0x182358] main input debug: `file/xspf-open:///home/debian/.local/share/vlc/ml.xspf' successfully opened
[0xa09a0] main xml reader debug: looking for xml reader module: 1 candidate
[0xa09a0] main xml reader debug: using xml reader module "xml"
[0xa09a0] main xml reader debug: TIMER module_need() : 5.055 ms - Total 5.055 ms / 1 intvls (Avg 5.055 ms)
[0xab7b8] playlist demux debug: parsed 0 tracks successfully
[0x182358] main input debug: EOF reached
[0xab7b8] main demux debug: removing module "playlist"
[0xa9970] main stream debug: removing module "stream_filter_record"
[0xaada8] main access debug: removing module "filesystem"
[0x182358] main input debug: TIMER input launching for 'Media Library' : 85.019 ms - Total 85.019 ms / 1 intvls (Avg 85.019 ms)
[0xa9f40] main interface debug: looking for interface module: 1 candidate
[0xa9f40] main interface debug: using interface module "hotkeys"
[0xa9f40] main interface debug: TIMER module_need() : 4.843 ms - Total 4.843 ms / 1 intvls (Avg 4.843 ms)
[0x182358] main interface debug: looking for interface module: 1 candidate
[0x182358] inhibit interface error: Failed to connect to the D-Bus session daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
[0x182358] main interface debug: no interface module matching "inhibit,none" could be loaded
[0x182358] main interface debug: TIMER module_need() : 5.137 ms - Total 5.137 ms / 1 intvls (Avg 5.137 ms)
[0x182358] main interface error: no suitable interface module
[0x229e0] main playlist debug: playlist threads correctly activated
[0x229e0] main playlist debug: adding item `v4l2:///dev/video0:chroma=h264:width=1280:height=720:fps=30' ( v4l2:///dev/video0:chroma=h264:width=1280:height=720:fps=30 )
[0xaada8] main interface debug: looking for interface module: 1 candidate
[0xaada8] main interface debug: no interface module matching "globalhotkeys,none" could be loaded
[0x229e0] main playlist debug: rebuilding array of current - root Playlist
[0x229e0] main playlist debug: rebuild done - 1 items, index -1
[0x229e0] main playlist debug: no fetch required for (null) (art currently (null))
[0xaada8] main interface debug: TIMER module_need() : 9.679 ms - Total 9.679 ms / 1 intvls (Avg 9.679 ms)
[0xaada8] main interface error: no suitable interface module
[0x138f0] main libvlc error: interface "globalhotkeys,none" initialization failed
[0xaada8] main interface debug: looking for interface module: 1 candidate
[0xaada8] dummy interface: using the dummy interface module...
[0xaada8] main interface debug: using interface module "dummy"
[0xaada8] main interface debug: TIMER module_need() : 4.683 ms - Total 4.683 ms / 1 intvls (Avg 4.683 ms)
[0x229e0] main playlist debug: processing request item: null, node: Playlist, skip: 0
[0x229e0] main playlist debug: starting playback of the new playlist item
[0x229e0] main playlist debug: resyncing on v4l2:///dev/video0:chroma=h264:width=1280:height=720:fps=30
[0x229e0] main playlist debug: v4l2:///dev/video0:chroma=h264:width=1280:height=720:fps=30 is at 0
[0x229e0] main playlist debug: creating new input thread
[0xb52005f8] main input debug: Creating an input for 'v4l2:///dev/video0:chroma=h264:width=1280:height=720:fps=30'
[0xb5000948] main stream output debug: using sout chain=`standard{mux="",access="",dst="10.92.200.76"}'
[0xb5000948] main stream output debug: stream=`standard'
[0xb5000ad8] main stream out debug: looking for sout stream module: 1 candidate
[0xb5000ad8] main stream out warning: missing value for option mux
[0xb5000ad8] main stream out warning: missing value for option access
[0xb5000ad8] main stream out debug: set config option: sout-standard-dst to 10.92.200.76
[0xb5000ad8] stream_out_standard stream out error: no access _and_ no muxer
[0xb5000ad8] main stream out debug: no sout stream module matching "standard" could be loaded
[0xb5000ad8] main stream out debug: TIMER module_need() : 6.319 ms - Total 6.319 ms / 1 intvls (Avg 6.319 ms)
[0xb5000ad8] main stream out debug: destroying chain... (name=(null))
[0xb5000ad8] main stream out debug: destroying chain done
[0xb5000948] main stream output error: stream chain failed for `standard{mux="",access="",dst="10.92.200.76"}'
[0x229e0] main playlist debug: finished input
[0xb52005f8] main input error: cannot start stream output instance, aborting
[0x229e0] main playlist debug: dead input
[0xb52005f8] main input debug: TIMER input launching for 'v4l2:///dev/video0:chroma=h264:width=1280:height=720:fps=30' : 13.824 ms - Total 13.824 ms / 1 intvls (Avg 13.824 ms)
[0x229e0] main playlist debug: changing item without a request (current 0/1)
[0x229e0] main playlist debug: nothing to play
^C[0x138f0] main libvlc debug: deactivating the playlist
[0x229e0] main playlist debug: deactivating the playlist
[0x182ac8] main playlist export debug: saving Media Library to file /home/debian/.local/share/vlc/ml.xspf
[0x182ac8] main playlist export debug: looking for playlist export module: 1 candidate
[0x182ac8] main playlist export debug: using playlist export module "export"
[0x182ac8] main playlist export debug: TIMER module_need() : 10.621 ms - Total 10.621 ms / 1 intvls (Avg 10.621 ms)
[0x182ac8] main playlist export debug: removing module "export"
[0x229e0] main playlist debug: playlist correctly deactivated
[0x138f0] main libvlc debug: removing all services discovery tasks
[0x138f0] main libvlc debug: removing all interfaces
[0x138f0] main libvlc debug: exiting
[0xaada8] main interface debug: removing module "dummy"
[0xa9f40] main interface debug: removing module "hotkeys"
[0x229e0] main playlist debug: destroying
[0x138f0] main libvlc debug: TIMER ML Load : Total 100.323 ms / 1 intvls (Avg 100.323 ms)
[0x138f0] main libvlc debug: TIMER Items array build : Total 7.035 ms / 1 intvls (Avg 7.035 ms)
[0x138f0] main libvlc debug: TIMER ML Dump : Total 20.123 ms / 1 intvls (Avg 20.123 ms)
[0x138f0] main libvlc debug: removing stats
[0x138f0] main libvlc debug: removing module "memcpy"
答案 0 :(得分:0)
在深入挖掘之前,请注意我没有测试这些命令。我只是使用你给定的命令并使用我在unix环境(Mac OS)上使用的工作sout链修改它们。
VLC的日志告诉您流链中存在错误:
[0xb5000948] main stream output error: stream chain failed for `standard{mux="",access="",dst="10.92.200.76"}'
尝试使用并修改您的流输出链(--sout)以便流式传输:
debian@beaglebone$ cvlc -vvv v4l2:///dev/video0:chroma=h264:width=1280:height=720:fps=30 --sout='#standard{access=udp, mux=ts,sap,name=yout-stream,dst=10.92.200.76, port=1234}' --sout-rtp-caching --live-caching=130
并记录:
debian@beaglebone$ cvlc -vvv v4l2:///dev/video0:chroma=h264:width=1280:height=720:fps=30 --sout='#transcode{venc=x264{aud,profile=baseline,level=30},vcodec=h264,vb=800}:std{mux=mp4,dst="/Path/to/your/file.mp4",access=file}' --sout-rtp-caching --live-caching=130
希望这能指出你正确的方向。