VLC can't run if used named pipe for stats output and this pipe don't used for reading
VLC can't run if used named pipe for stats output and this pipe don't used for reading.
How to reproduce: Run script:
#!/bin/bash
DIRNAME=$(readlink -f $(dirname "$0"))
pipe=$DIRNAME/stats
mkfifo $pipe
cvlc -vvvvv -I "dummy" nosignal_vlc.ts --sout="#stats{output=$pipe}:dummy"
As result it stopped on:
VLC media player 2.2.3 Weatherwax (revision 2.2.3-alt2.imb)
[0000000000608258] core libvlc debug: VLC media player - 2.2.3 Weatherwax
[0000000000608258] core libvlc debug: Copyright © 1996-2016 the VideoLAN team
[0000000000608258] core libvlc debug: revision 2.2.3-alt2.imb
[0000000000608258] core libvlc debug: configured with ./configure '--build=x86_64-alt-linux' '--host=x86_64-alt-linux' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--disable-dependency-tracking' '--without-included-gettext' '--disable-rpath' '--disable-static' '--enable-a52' '--enable-aa' '--enable-alsa' '--enable-avcodec' '--enable-avformat' '--enable-caca' '--enable-dc1394' '--enable-dca' '--enable-dv1394' '--enable-dvbpsi' '--enable-dvdnav' '--enable-dvdread' '--enable-egl' '--enable-flac' '--enable-freetype' '--enable-fribidi' '--enable-gles2' '--enable-gnutls' '--enable-goom' '--enable-httpd' '--enable-jack' '--enable-kate' '--enable-libass' '--enable-libcddb' '--enable-libmpeg2' '--enable-libxml2' '--enable-lirc' '--enable-live555' '--enable-mad' '--enable-mkv' '--enable-mod' '--enable-mpc' '--enable-ncurses' '--enable-notify' '--enable-ogg' '--enable-omxil' '--enable-omxil-vout' '--enable-opus' '--enable-png' '--enable-postproc' '--enable-pulse' '--enable-realrtsp' '--enable-schroedinger' '--enable-sftp' '--enable-shout' '--enable-skins2' '--enable-smbclient' '--enable-speex' '--enable-svg' '--enable-swscale' '--enable-theora' '--enable-twolame' '--enable-upnp' '--enable-vcd' '--enable-vcdx' '--enable-vlm' '--enable-vorbis' '--enable-x264' '--enable-xcb' '--enable-fdkaac' '--disable-oss' '--disable-quicktime' '--disable-sdl' '--with-kde-solid=/usr/share/kde4/apps/solid/actions' '--without-contrib' '--with-default-font=/usr/share/fonts/ttf/dejavu/DejaVuSerif-Bold.ttf' '--with-default-monospace-font=/usr/share/fonts/ttf/dejavu/DejaVuSansMono.ttf' 'build_alias=x86_64-alt-linux' 'host_alias=x86_64-alt-linux' 'CFLAGS=-pipe -Wall -g -O2 -I/usr/include/samba-4.0' 'CXXFLAGS=-pipe -Wall -g -O2 -I/usr/include/samba-4.0'
[0000000000608258] core libvlc debug: searching plug-in modules
[0000000000608258] core libvlc debug: loading plugins cache file /usr/lib64/vlc/plugins/plugins.dat
[0000000000608258] core libvlc debug: recursively browsing `/usr/lib64/vlc/plugins'
[0000000000608258] core libvlc debug: saving plugins cache /usr/lib64/vlc/plugins/plugins.dat
[0000000000608258] core libvlc debug: plug-ins loaded: 337 modules
[0000000000608258] core libvlc debug: opening config file (/home/slava/.config/vlc/vlcrc)
[0000000000608258] core libvlc debug: translation test: code is "ru"
[0000000000608258] core libvlc debug: CPU has capabilities MMX MMXEXT SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 FPU
[00000000006b5fd8] core input debug: Creating an input for 'Медиатека'
[00000000006b5fd8] core input debug: Input is a meta file: disabling unneeded options
[00000000006b5fd8] core input debug: using timeshift granularity of 50 MiB, in path '/tmp'
[00000000006b5fd8] core input debug: `file/xspf-open:///home/slava/.local/share/vlc/ml.xspf' gives access `file' demux `xspf-open' path `/home/slava/.local/share/vlc/ml.xspf'
[00000000006b5fd8] core input debug: creating demux: access='file' demux='xspf-open' location='/home/slava/.local/share/vlc/ml.xspf' file='/home/slava/.local/share/vlc/ml.xspf'
[00000000006c2118] core demux debug: looking for access_demux module matching "file": 7 candidates
[00000000006c2118] core demux debug: no access_demux modules matched
[00000000006b5fd8] core input debug: creating access 'file' location='/home/slava/.local/share/vlc/ml.xspf', path='/home/slava/.local/share/vlc/ml.xspf'
[00000000006c2118] core access debug: looking for access module matching "file": 17 candidates
[00000000006c2118] filesystem access debug: opening file `/home/slava/.local/share/vlc/ml.xspf'
[00000000006c2118] core access debug: using access module "filesystem"
[00000000006c33c8] core stream debug: Using stream method for AStream*
[00000000006c33c8] core stream debug: starting pre-buffering
[00000000006c33c8] core stream debug: received first data after 0 ms
[00000000006c33c8] core stream debug: pre-buffering done 301 bytes in 0s - 8907 KiB/s
[00000000006c3628] core stream debug: looking for stream_filter module matching "any": 9 candidates
[00000000006c3628] core stream debug: no stream_filter modules matched
[00000000006c3628] core stream debug: looking for stream_filter module matching "record": 9 candidates
[00000000006c3628] core stream debug: using stream_filter module "record"
[00000000006b5fd8] core input debug: creating demux: access='file' demux='xspf-open' location='/home/slava/.local/share/vlc/ml.xspf' file='/home/slava/.local/share/vlc/ml.xspf'
[00000000006c9ce8] core demux debug: looking for demux module matching "xspf-open": 57 candidates
[00000000006c9ce8] xspf demux debug: using XSPF playlist reader
[00000000006c9ce8] core demux debug: using demux module "playlist"
[00000000006c9fe8] core demux meta debug: looking for meta reader module matching "any": 1 candidates
[00000000006c9fe8] lua demux meta debug: Trying Lua scripts in /home/slava/.local/share/vlc/lua/meta/reader
[00000000006c9fe8] lua demux meta debug: Trying Lua scripts in /usr/lib64/vlc/lua/meta/reader
[00000000006c9fe8] lua demux meta debug: Trying Lua playlist script /usr/lib64/vlc/lua/meta/reader/filename.luac
[00000000006c9fe8] lua demux meta debug: Trying Lua scripts in /usr/share/vlc/lua/meta/reader
[00000000006c9fe8] core demux meta debug: no meta reader modules matched
[00000000006b5fd8] core input debug: `file/xspf-open:///home/slava/.local/share/vlc/ml.xspf' successfully opened
[00000000006d1328] core xml reader debug: looking for xml reader module matching "any": 0 candidates
[00000000006d1328] core xml reader debug: no xml reader modules
[00000000006d1328] core xml reader error: XML reader not found
[00000000006c9ce8] core demux debug: removing module "playlist"
[00000000006c3628] core stream debug: removing module "record"
[00000000006c2118] core access debug: removing module "filesystem"
[00000000006b4948] core playlist debug: creating audio output
[00000000006d1488] core audio output debug: looking for audio output module matching "any": 4 candidates
[00000000006d1488] alsa audio output debug: Available ALSA PCM devices:
[00000000006d1488] alsa audio output debug: Discard all samples (playback) or generate zero samples (capture) (null)
[00000000006d1488] core audio output debug: using audio output module "alsa"
[00000000006b4948] core playlist debug: keeping audio output
[00000000006b4948] core playlist debug: adding item `nosignal_vlc.ts' ( file:///home/slava/daemon/test/nosignal_vlc.ts )
[00000000006c9f08] core interface debug: looking for interface module matching "hotkeys,none": 12 candidates
[00007fbd44000958] core input debug: Creating an input for 'nosignal_vlc.ts'
[00000000006c9f08] core interface debug: using interface module "hotkeys"
[00000000006b82d8] core interface debug: looking for interface module matching "globalhotkeys,none": 12 candidates
[00000000006b82d8] core interface debug: no interface modules matched
[00000000006b82d8] core interface error: no suitable interface module
[0000000000608258] core libvlc error: interface "globalhotkeys,none" initialization failed
[00000000006b82d8] core interface debug: looking for interface module matching "dbus,none": 12 candidates
[00000000006b82d8] core interface debug: no interface modules matched
[00000000006b82d8] core interface error: no suitable interface module
[0000000000608258] core libvlc error: interface "dbus,none" initialization failed
[00000000006b82d8] core interface debug: looking for interface module matching "dummy": 12 candidates
[00000000006b82d8] dummy interface: using the dummy interface module...
[00000000006b82d8] core interface debug: using interface module "dummy"
[00000000006b4948] core playlist debug: processing request item: null, node: Плейлист, skip: 0
[00000000006b4948] core playlist debug: rebuilding array of current - root Плейлист
[00000000006b4948] core playlist debug: rebuild done - 1 items, index -1
[00000000006b4948] core playlist debug: starting playback of the new playlist item
[00000000006b4948] core playlist debug: resyncing on nosignal_vlc.ts
[00000000006b4948] core playlist debug: nosignal_vlc.ts is at 0
[00000000006b4948] core playlist debug: creating new input thread
[00007fbd3c0009b8] core input debug: Creating an input for 'nosignal_vlc.ts'
[00000000006b4948] core playlist debug: requesting art for nosignal_vlc.ts
[00007fbd40000b98] core stream output debug: using sout chain=`stats{output=/home/slava/daemon/test/stats}:dummy'
[00007fbd40000b98] core stream output debug: stream=`dummy'
[00007fbd34000958] core art finder debug: looking for meta fetcher module matching "any": 1 candidates
[00007fbd40000f18] core stream out debug: looking for sout stream module matching "dummy": 21 candidates
[00007fbd40000f18] core stream out debug: using sout stream module "stream_out_dummy"
[00007fbd40000b98] core stream output debug: stream=`stats'
[00007fbd40001868] core stream out debug: looking for sout stream module matching "stats": 21 candidates
[00007fbd40001868] core stream out debug: set config option: sout-stats-output to /home/slava/daemon/test/stats
[00007fbd34000958] lua art finder debug: Trying Lua scripts in /home/slava/.local/share/vlc/lua/meta/fetcher
[00007fbd34000958] lua art finder debug: Trying Lua scripts in /usr/lib64/vlc/lua/meta/fetcher
[00007fbd34000958] lua art finder debug: Trying Lua playlist script /usr/lib64/vlc/lua/meta/fetcher/tvrage.luac
[00000000006b4948] core playlist debug: meta ok for (null), need to fetch art
[00007fbd44003dd8] core art finder debug: looking for meta fetcher module matching "any": 1 candidates
[00007fbd34000958] lua art finder debug: skipping script (unmatched scope) /usr/lib64/vlc/lua/meta/fetcher/tvrage.luac
[00007fbd34000958] lua art finder debug: Trying Lua scripts in /usr/share/vlc/lua/meta/fetcher
[00007fbd34000958] core art finder debug: no meta fetcher modules matched
[0000000000608258] core libvlc debug: searching art for nosignal_vlc.ts
[00007fbd34000958] core art finder debug: looking for art finder module matching "any": 2 candidates
[00007fbd44003dd8] lua art finder debug: Trying Lua scripts in /home/slava/.local/share/vlc/lua/meta/fetcher
[00007fbd44003dd8] lua art finder debug: Trying Lua scripts in /usr/lib64/vlc/lua/meta/fetcher
[00007fbd44003dd8] lua art finder debug: Trying Lua playlist script /usr/lib64/vlc/lua/meta/fetcher/tvrage.luac
[00007fbd34000958] lua art finder debug: Trying Lua scripts in /home/slava/.local/share/vlc/lua/meta/art
[00007fbd34000958] lua art finder debug: Trying Lua scripts in /usr/lib64/vlc/lua/meta/art
[00007fbd34000958] lua art finder debug: Trying Lua playlist script /usr/lib64/vlc/lua/meta/art/00_musicbrainz.luac
[00007fbd44003dd8] lua art finder debug: skipping script (unmatched scope) /usr/lib64/vlc/lua/meta/fetcher/tvrage.luac
[00007fbd44003dd8] lua art finder debug: Trying Lua scripts in /usr/share/vlc/lua/meta/fetcher
[00007fbd44003dd8] core art finder debug: no meta fetcher modules matched
[00000000006b4948] core playlist debug: searching art for nosignal_vlc.ts
[00007fbd44003dd8] core art finder debug: looking for art finder module matching "any": 2 candidates
[00007fbd34000958] lua art finder debug: skipping script (unmatched scope) /usr/lib64/vlc/lua/meta/art/00_musicbrainz.luac
[00007fbd34000958] lua art finder debug: Trying Lua playlist script /usr/lib64/vlc/lua/meta/art/01_googleimage.luac
[00007fbd44003dd8] lua art finder debug: Trying Lua scripts in /home/slava/.local/share/vlc/lua/meta/art
[00007fbd44003dd8] lua art finder debug: Trying Lua scripts in /usr/lib64/vlc/lua/meta/art
[00007fbd44003dd8] lua art finder debug: Trying Lua playlist script /usr/lib64/vlc/lua/meta/art/00_musicbrainz.luac
[00007fbd34000958] lua art finder debug: skipping script (unmatched scope) /usr/lib64/vlc/lua/meta/art/01_googleimage.luac
[00007fbd34000958] lua art finder debug: Trying Lua playlist script /usr/lib64/vlc/lua/meta/art/02_frenchtv.luac
[00007fbd44003dd8] lua art finder debug: skipping script (unmatched scope) /usr/lib64/vlc/lua/meta/art/00_musicbrainz.luac
[00007fbd44003dd8] lua art finder debug: Trying Lua playlist script /usr/lib64/vlc/lua/meta/art/01_googleimage.luac
[00007fbd34000958] lua art finder debug: skipping script (unmatched scope) /usr/lib64/vlc/lua/meta/art/02_frenchtv.luac
[00007fbd34000958] lua art finder debug: Trying Lua playlist script /usr/lib64/vlc/lua/meta/art/03_lastfm.luac
[00007fbd44003dd8] lua art finder debug: skipping script (unmatched scope) /usr/lib64/vlc/lua/meta/art/01_googleimage.luac
[00007fbd44003dd8] lua art finder debug: Trying Lua playlist script /usr/lib64/vlc/lua/meta/art/02_frenchtv.luac
[00007fbd34000958] lua art finder debug: skipping script (unmatched scope) /usr/lib64/vlc/lua/meta/art/03_lastfm.luac
[00007fbd34000958] lua art finder debug: Trying Lua scripts in /usr/share/vlc/lua/meta/art
[00007fbd34000958] core art finder debug: no art finder modules matched
[0000000000608258] core libvlc debug: art not found for nosignal_vlc.ts
[00007fbd44003dd8] lua art finder debug: skipping script (unmatched scope) /usr/lib64/vlc/lua/meta/art/02_frenchtv.luac
[00007fbd44003dd8] lua art finder debug: Trying Lua playlist script /usr/lib64/vlc/lua/meta/art/03_lastfm.luac
[00007fbd44003dd8] lua art finder debug: skipping script (unmatched scope) /usr/lib64/vlc/lua/meta/art/03_lastfm.luac
[00007fbd44003dd8] lua art finder debug: Trying Lua scripts in /usr/share/vlc/lua/meta/art
[00007fbd44003dd8] core art finder debug: no art finder modules matched
[00000000006b4948] core playlist debug: art not found for nosignal_vlc.ts
If I start read from pipe before run vlc (for example tail), it can start and everything ok.
Working script:
#!/bin/bash
DIRNAME=$(readlink -f $(dirname "$0"))
pipe=$DIRNAME/stats
mkfifo $pipe
tail -n 1 $pipe &
cvlc -vvvvv -I "dummy" nosignal_vlc.ts --sout="#stats{output=$pipe}:dummy"