Streaming from /dev/video0 issue

About encoding, codec settings, muxers and filter usage
limiteddi
Blank Cone
Blank Cone
Posts: 28
Joined: 12 Dec 2013 18:10

Streaming from /dev/video0 issue

Postby limiteddi » 27 Dec 2013 18:50

I've managed to stream /dev/video0 but only from the PC where card is installed, the following command does not work if executed from another PC remotely via SSH. The device is Hauppauge WinTV 150 MCE

Code: Select all
./vlc -vvv /dev/video0 --sout '#transcode{venc=x264{preset=ultrafast},vcodec=h264,vb=800,ab=128}:standard{access=http,mux=ts,dst=192.168.1.55:9001}'


The problem with executing this command on host PC is that it wont stream anything unless you press PLAY on the VLC window that pops up.

Does anyone know how to make this autostream and executable from remote PC?

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: Streaming from /dev/video0 issue

Postby Jean-Baptiste Kempf » 28 Dec 2013 12:25

-Idummy
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.

limiteddi
Blank Cone
Blank Cone
Posts: 28
Joined: 12 Dec 2013 18:10

Re: Streaming from /dev/video0 issue

Postby limiteddi » 29 Dec 2013 22:48

No changes

Code: Select all

root@pc:~/# ./vlc -vvv -I dummy /dev/video0 --sout '#transcode{venc=x264{preset=ultrafast},vcodec=h264,vb=800,ab=128}:standard{access=http,mux=ts,dst=192.168.1.55:9001}' VLC media player 2.1.2 Rincewind (revision 2.1.2-0-ga4c4876) [0x8237a08] main libvlc debug: VLC media player - 2.1.2 Rincewind [0x8237a08] main libvlc debug: Copyright © 1996-2013 the VideoLAN team [0x8237a08] main libvlc debug: revision 2.1.2-0-ga4c4876 [0x8237a08] main libvlc debug: configured with ./configure '--enable-run-as-root' [0x8237a08] main libvlc debug: searching plug-in modules [0x8237a08] main libvlc debug: loading plugins cache file /root/ffmpeg_sources/vlc-2.1.2/src/.libs/vlc/plugins/plugins.dat [0x8237a08] main libvlc warning: cannot read /root/ffmpeg_sources/vlc-2.1.2/src/.libs/vlc/plugins/plugins.dat (No such file or directory) [0x8237a08] main libvlc debug: recursively browsing `/root/ffmpeg_sources/vlc-2.1.2/src/.libs/vlc/plugins' [0x8237a08] main libvlc debug: saving plugins cache /root/ffmpeg_sources/vlc-2.1.2/src/.libs/vlc/plugins/plugins.dat [0x8237a08] main libvlc debug: loading plugins cache file /root/ffmpeg_sources/vlc-2.1.2/modules/plugins.dat [0x8237a08] main libvlc debug: recursively browsing `/root/ffmpeg_sources/vlc-2.1.2/modules' [0x8237a08] main libvlc debug: saving plugins cache /root/ffmpeg_sources/vlc-2.1.2/modules/plugins.dat [0x8237a08] main libvlc debug: plug-ins loaded: 416 modules [0x8237a08] main libvlc debug: opening config file (/root/.config/vlc/vlcrc) [0x8237a08] main libvlc debug: translation test: code is "C" [0x8237a08] main libvlc debug: CPU has capabilities MMX MMXEXT SSE SSE2 SSE3 FPU [0x82c7910] main input debug: Creating an input for 'Media Library' [0x82c7910] main input debug: Input is a meta file: disabling unneeded options [0x82c7910] main input debug: using timeshift granularity of 50 MiB, in path '/tmp' [0x82c7910] main input debug: `file/xspf-open:///root/.local/share/vlc/ml.xspf' gives access `file' demux `xspf-open' path `/root/.local/share/vlc/ml.xspf' [0x82c7910] main input debug: creating demux: access='file' demux='xspf-open' location='/root/.local/share/vlc/ml.xspf' file='/root/.local/share/vlc/ml.xspf' [0x82c6fb8] main demux debug: looking for access_demux module matching "file": 19 candidates [0x82c6fb8] main demux debug: no access_demux modules matched [0x82c7910] main input debug: creating access 'file' location='/root/.local/share/vlc/ml.xspf', path='/root/.local/share/vlc/ml.xspf' [0x82c8218] main access debug: looking for access module matching "file": 21 candidates [0x82c8218] filesystem access debug: opening file `/root/.local/share/vlc/ml.xspf' [0x82c8218] main access debug: using access module "filesystem" [0x82c8f18] main stream debug: Using stream method for AStream* [0x82c8f18] main stream debug: starting pre-buffering [0x82c8f18] main stream debug: received first data after 0 ms [0x82c8f18] main stream debug: pre-buffering done 296 bytes in 0s - 2429 KiB/s [0x82c8fd8] main stream debug: looking for stream_filter module matching "any": 9 candidates [0x82c8fd8] main stream debug: no stream_filter modules matched [0x82c8fd8] main stream debug: looking for stream_filter module matching "record": 9 candidates [0x82c8fd8] main stream debug: using stream_filter module "record" [0x82c7910] main input debug: creating demux: access='file' demux='xspf-open' location='/root/.local/share/vlc/ml.xspf' file='/root/.local/share/vlc/ml.xspf' [0x82bc338] main demux debug: looking for demux module matching "xspf-open": 63 candidates [0x82bc338] playlist demux debug: using XSPF playlist reader [0x82bc338] main demux debug: using demux module "playlist" [0x82bc470] main demux meta debug: looking for meta reader module matching "any": 2 candidates [0x82bc470] lua demux meta debug: Trying Lua scripts in /root/.local/share/vlc/lua/meta/reader [0x82bc470] lua demux meta debug: Trying Lua scripts in /root/ffmpeg_sources/vlc-2.1.2/src/.libs/vlc/lua/meta/reader [0x82bc470] lua demux meta debug: Trying Lua scripts in /root/ffmpeg_sources/vlc-2.1.2/share/lua/meta/reader [0x82bc470] lua demux meta debug: Trying Lua playlist script /root/ffmpeg_sources/vlc-2.1.2/share/lua/meta/reader/filename.lua [0x82bc470] lua demux meta debug: Trying Lua playlist script /root/ffmpeg_sources/vlc-2.1.2/share/lua/meta/reader/filename.luac [0x82bc470] main demux meta debug: no meta reader modules matched [0x82c7910] main input debug: `file/xspf-open:///root/.local/share/vlc/ml.xspf' successfully opened [0x82c40b8] main xml reader debug: looking for xml reader module matching "any": 1 candidates [0x82c40b8] main xml reader debug: using xml reader module "xml" [0x82bc338] playlist demux debug: parsed 0 tracks successfully [0x82c7910] main input debug: EOF reached [0x82bc338] main demux debug: removing module "playlist" [0x82c8fd8] main stream debug: removing module "record" [0x82c8218] main access debug: removing module "filesystem" [0x82c5228] main playlist debug: creating audio output [0x82d99c8] main audio output debug: looking for audio output module matching "any": 6 candidates [0x82d99c8] pulse audio output debug: using library version 1.1.0 [0x82d99c8] pulse audio output debug: (compiled with version 1.1.0, protocol 26) [0x82d99c8] pulse audio output error: PulseAudio server connection failure: Connection refused [0x82d99c8] alsa audio output debug: Available ALSA PCM devices: [0x82d99c8] alsa audio output debug: Discard all samples (playback) or generate zero samples (capture) (null) [0x82d99c8] alsa audio output debug: PulseAudio Sound Server (pulse) [0x82d99c8] alsa audio output debug: Intel ICH6, Intel ICH6 Default Audio Device (default:CARD=ICH6) [0x82d99c8] alsa audio output debug: Intel ICH6, Intel ICH6 Default Audio Device (sysdefault:CARD=ICH6) [0x82d99c8] alsa audio output debug: Intel ICH6, Intel ICH6 Front speakers (front:CARD=ICH6,DEV=0) [0x82d99c8] alsa audio output debug: Intel ICH6, Intel ICH6 4.0 Surround output to Front and Rear speakers (surround40:CARD=ICH6,DEV=0) [0x82d99c8] alsa audio output debug: Intel ICH6, Intel ICH6 4.1 Surround output to Front, Rear and Subwoofer speakers (surround41:CARD=ICH6,DEV=0) [0x82d99c8] alsa audio output debug: Intel ICH6, Intel ICH6 5.0 Surround output to Front, Center and Rear speakers (surround50:CARD=ICH6,DEV=0) [0x82d99c8] alsa audio output debug: Intel ICH6, Intel ICH6 5.1 Surround output to Front, Center, Rear and Subwoofer speakers (surround51:CARD=ICH6,DEV=0) [0x82d99c8] alsa audio output debug: Intel ICH6, Intel ICH6 - IEC958 IEC958 (S/PDIF) Digital Audio Output (iec958:CARD=ICH6,DEV=0) [0x82d99c8] alsa audio output debug: Intel ICH6, Intel ICH6 Direct sample mixing device (dmix:CARD=ICH6,DEV=0) [0x82d99c8] alsa audio output debug: Intel ICH6, Intel ICH6 - MIC ADC Direct sample mixing device (dmix:CARD=ICH6,DEV=1) [0x82d99c8] alsa audio output debug: Intel ICH6, Intel ICH6 - MIC2 ADC Direct sample mixing device (dmix:CARD=ICH6,DEV=2) [0x82d99c8] alsa audio output debug: Intel ICH6, Intel ICH6 - ADC2 Direct sample mixing device (dmix:CARD=ICH6,DEV=3) [0x82d99c8] alsa audio output debug: Intel ICH6, Intel ICH6 - IEC958 Direct sample mixing device (dmix:CARD=ICH6,DEV=4) [0x82d99c8] alsa audio output debug: Intel ICH6, Intel ICH6 Direct sample snooping device (dsnoop:CARD=ICH6,DEV=0) [0x82d99c8] alsa audio output debug: Intel ICH6, Intel ICH6 - MIC ADC Direct sample snooping device (dsnoop:CARD=ICH6,DEV=1) [0x82d99c8] alsa audio output debug: Intel ICH6, Intel ICH6 - MIC2 ADC Direct sample snooping device (dsnoop:CARD=ICH6,DEV=2) [0x82d99c8] alsa audio output debug: Intel ICH6, Intel ICH6 - ADC2 Direct sample snooping device (dsnoop:CARD=ICH6,DEV=3) [0x82d99c8] alsa audio output debug: Intel ICH6, Intel ICH6 - IEC958 Direct sample snooping device (dsnoop:CARD=ICH6,DEV=4) [0x82d99c8] alsa audio output debug: Intel ICH6, Intel ICH6 Direct hardware device without any conversions (hw:CARD=ICH6,DEV=0) [0x82d99c8] alsa audio output debug: Intel ICH6, Intel ICH6 - MIC ADC Direct hardware device without any conversions (hw:CARD=ICH6,DEV=1) [0x82d99c8] alsa audio output debug: Intel ICH6, Intel ICH6 - MIC2 ADC Direct hardware device without any conversions (hw:CARD=ICH6,DEV=2) [0x82d99c8] alsa audio output debug: Intel ICH6, Intel ICH6 - ADC2 Direct hardware device without any conversions (hw:CARD=ICH6,DEV=3) [0x82d99c8] alsa audio output debug: Intel ICH6, Intel ICH6 - IEC958 Direct hardware device without any conversions (hw:CARD=ICH6,DEV=4) [0x82d99c8] alsa audio output debug: Intel ICH6, Intel ICH6 Hardware device with all software conversions (plughw:CARD=ICH6,DEV=0) [0x82d99c8] alsa audio output debug: Intel ICH6, Intel ICH6 - MIC ADC Hardware device with all software conversions (plughw:CARD=ICH6,DEV=1) [0x82d99c8] alsa audio output debug: Intel ICH6, Intel ICH6 - MIC2 ADC Hardware device with all software conversions (plughw:CARD=ICH6,DEV=2) [0x82d99c8] alsa audio output debug: Intel ICH6, Intel ICH6 - ADC2 Hardware device with all software conversions (plughw:CARD=ICH6,DEV=3) [0x82d99c8] alsa audio output debug: Intel ICH6, Intel ICH6 - IEC958 Hardware device with all software conversions (plughw:CARD=ICH6,DEV=4) [0x82d99c8] main audio output debug: using audio output module "alsa" [0x82c5228] main playlist debug: keeping audio output [0x82c5228] main playlist debug: adding item `video0' ( file:///dev/video0 ) [0xb5d00520] main input debug: Creating an input for 'video0' [0x82f3b18] main interface debug: looking for interface module matching "hotkeys,none": 18 candidates [0x82f3b18] main interface debug: using interface module "hotkeys" [0x82f3110] main interface debug: looking for interface module matching "globalhotkeys,none": 18 candidates [0x82f3110] main interface debug: no interface modules matched [0x82f3110] main interface error: no suitable interface module [0x8237a08] main libvlc error: interface "globalhotkeys,none" initialization failed [0x82f3110] main interface debug: looking for interface module matching "dbus,none": 18 candidates [0x82f3110] dbus interface error: Failed to connect to the D-Bus session daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11 [0x82f3110] main interface debug: no interface modules matched [0x82f3110] main interface error: no suitable interface module [0x8237a08] main libvlc error: interface "dbus,none" initialization failed [0x82f3110] main interface debug: looking for interface module matching "dummy": 18 candidates [0x82f3110] dummy interface: using the dummy interface module... [0x82f3110] main interface debug: using interface module "dummy" [0x82c5228] main playlist debug: processing request item: null, node: Playlist, skip: 0 [0x82c5228] main playlist debug: rebuilding array of current - root Playlist [0x82c5228] main playlist debug: rebuild done - 1 items, index -1 [0x82c5228] main playlist debug: starting playback of the new playlist item [0x82c5228] main playlist debug: resyncing on video0 [0x82c5228] main playlist debug: video0 is at 0 [0x82c5228] main playlist debug: creating new input thread [0xb4f00508] main input debug: Creating an input for 'video0' [0xb4d00720] main stream output debug: using sout chain=`transcode{venc=x264{preset=ultrafast},vcodec=h264,vb=800,ab=128}:standard{access=http,mux=ts,dst=192.168.1.55:9001}' [0xb4d00720] main stream output debug: stream=`standard' [0xb4d00ac8] main stream out debug: looking for sout stream module matching "standard": 20 candidates [0xb4d00ac8] main stream out debug: set config option: sout-standard-access to http [0xb4d00ac8] main stream out debug: set config option: sout-standard-mux to ts [0xb4d00ac8] main stream out debug: set config option: sout-standard-dst to 192.168.1.55:9001 [0xb4d01738] main access out debug: looking for sout access module matching "http": 8 candidates [0xb4d01738] access_output_http access out warning: "192.168.1.55" HTTP host might be ignored in multiple-host configurations, use at your own risks. [0xb4d01738] access_output_http access out: Consider passing --http-host=IP on the command line instead. [0xb4d01738] main access out debug: net: listening to 192.168.1.55 port 9001 [0xb4d01738] main access out debug: using sout access module "access_output_http" [0xb4d02710] main mux debug: looking for sout mux module matching "ts": 10 candidates [0xb4d02710] mux_ts mux debug: shaping=200000 pcr=70000 dts_delay=400000 [0xb4d02710] main mux debug: using sout mux module "mux_ts" [0xb4d00720] main stream output debug: muxer support adding stream at any time [0xb4d00720] main stream output debug: muxer prefers to wait for all ES before starting to mux [0xb4d00ac8] stream_out_standard stream out debug: using `http/ts://192.168.1.55:9001' [0xb4d00ac8] main stream out debug: using sout stream module "stream_out_standard" [0xb4d00720] main stream output debug: stream=`transcode' [0xb4d05a18] main stream out debug: looking for sout stream module matching "transcode": 20 candidates [0xb4d05a18] main stream out debug: set config option: sout-transcode-venc to x264{preset=ultrafast} [0xb4d05a18] main stream out debug: set config option: sout-transcode-vcodec to h264 [0xb4d05a18] main stream out debug: set config option: sout-transcode-vb to 800 [0xb4d05a18] main stream out debug: set config option: sout-transcode-ab to 128 [0xb4d05a18] stream_out_transcode stream out debug: codec video=h264 0x0 scaling: 0.000000 800kb/s [0xb4d05a18] main stream out debug: using sout stream module "stream_out_transcode" [0xb4f00508] main input debug: using timeshift granularity of 50 MiB, in path '/tmp' [0xb4f00508] main input debug: `file:///dev/video0' gives access `file' demux `' path `/dev/video0' [0xb4f00508] main input debug: creating demux: access='file' demux='' location='/dev/video0' file='/dev/video0' [0xb4d07230] main demux debug: looking for access_demux module matching "file": 19 candidates [0xb4d07230] main demux debug: no access_demux modules matched [0xb4f00508] main input debug: creating access 'file' location='/dev/video0', path='/dev/video0' [0xb4d07388] main access debug: looking for access module matching "file": 21 candidates [0xb4d07388] filesystem access debug: opening file `/dev/video0' [0xb4d07388] main access debug: using access module "filesystem" [0xb4d07460] main stream debug: Using stream method for AStream* [0xb4d07460] main stream debug: starting pre-buffering [0xb4d07388] main access error: read error: Device or resource busy [0xb4d07388] filesystem access error: read error: Device or resource busy [0xb4d07460] main stream error: cannot pre fill buffer [0xb4d07388] main access debug: removing module "filesystem" [0xb4f00508] main input warning: cannot create a stream_t from access [0x82c5228] main playlist debug: finished input [0x82c5228] main playlist debug: dead input [0xb4d00720] main stream output debug: destroying useless sout [0xb4d05a18] main stream out debug: destroying chain... (name=transcode) [0xb4d05a18] main stream out debug: removing module "stream_out_transcode" [0xb4d05a18] main stream out debug: destroying chain done [0xb4d00ac8] main stream out debug: destroying chain... (name=standard) [0xb4d00ac8] main stream out debug: removing module "stream_out_standard" [0xb4d02710] main mux debug: removing module "mux_ts" [0xb4d01738] main access out debug: removing module "access_output_http" [0xb4d01fe0] main http host debug: HTTP host removed [0xb4d01738] access_output_http access out debug: Close [0xb4d00ac8] main stream out debug: destroying chain done [0x82c5228] main playlist debug: changing item without a request (current 0/1) [0x82c5228] main playlist debug: nothing to play [0x82c5228] main playlist debug: meta ok for (null), need to fetch art [0xb5d02810] main demux meta debug: looking for meta fetcher module matching "any": 1 candidates [0xb5d02810] lua demux meta debug: Trying Lua scripts in /root/.local/share/vlc/lua/meta/fetcher [0xb5d02810] lua demux meta debug: Trying Lua scripts in /root/ffmpeg_sources/vlc-2.1.2/src/.libs/vlc/lua/meta/fetcher [0xb5d02810] lua demux meta debug: Trying Lua scripts in /root/ffmpeg_sources/vlc-2.1.2/share/lua/meta/fetcher [0xb5d02810] lua demux meta debug: Trying Lua playlist script /root/ffmpeg_sources/vlc-2.1.2/share/lua/meta/fetcher/tvrage.lua [0xb5d02810] main demux meta debug: using meta fetcher module "lua" [0xb5d02810] main demux meta debug: removing module "lua" [0x82c5228] main playlist debug: searching art for video0 [0xb5d01a28] main art finder debug: looking for art finder module matching "any": 2 candidates [0xb5d01a28] lua art finder debug: Trying Lua scripts in /root/.local/share/vlc/lua/meta/art [0xb5d01a28] lua art finder debug: Trying Lua scripts in /root/ffmpeg_sources/vlc-2.1.2/src/.libs/vlc/lua/meta/art [0xb5d01a28] lua art finder debug: Trying Lua scripts in /root/ffmpeg_sources/vlc-2.1.2/share/lua/meta/art [0xb5d01a28] lua art finder debug: Trying Lua playlist script /root/ffmpeg_sources/vlc-2.1.2/share/lua/meta/art/00_musicbrainz.lua [0xb5d01a28] lua art finder debug: Trying Lua playlist script /root/ffmpeg_sources/vlc-2.1.2/share/lua/meta/art/00_musicbrainz.luac [0xb5d01a28] lua art finder debug: Trying Lua playlist script /root/ffmpeg_sources/vlc-2.1.2/share/lua/meta/art/01_googleimage.lua [0xb5d01a28] lua art finder debug: Trying Lua playlist script /root/ffmpeg_sources/vlc-2.1.2/share/lua/meta/art/01_googleimage.luac [0xb5d01a28] lua art finder debug: Trying Lua playlist script /root/ffmpeg_sources/vlc-2.1.2/share/lua/meta/art/02_frenchtv.lua [0xb5d01a28] lua art finder debug: Trying Lua playlist script /root/ffmpeg_sources/vlc-2.1.2/share/lua/meta/art/02_frenchtv.luac [0xb5d01a28] lua art finder debug: Trying Lua playlist script /root/ffmpeg_sources/vlc-2.1.2/share/lua/meta/art/03_lastfm.lua [0xb5d01a28] lua art finder debug: Trying Lua playlist script /root/ffmpeg_sources/vlc-2.1.2/share/lua/meta/art/03_lastfm.luac [0xb5d01a28] main art finder debug: no art finder modules matched [0x82c5228] main playlist debug: art not found for video0

limiteddi
Blank Cone
Blank Cone
Posts: 28
Joined: 12 Dec 2013 18:10

Re: Streaming from /dev/video0 issue

Postby limiteddi » 29 Dec 2013 22:58

Oddly, when I reboot the system the command works and I can stream with no issues but it enables RF input by default. Once I execute v4l2-ctl -i 2 command to change input to composite, I get the above output and nothing seems to be playing.

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

Re: Streaming from /dev/video0 issue

Postby Rémi Denis-Courmont » 30 Dec 2013 11:07

VLC is not supposed to read V4L device nodes as normal files. It might work for some devices, but that's not "designed".
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 12 guests