Hi, I am trying to use pipe sh script in tvheadend but getting constantly error and IPTV mux with no scan data...
Here is my setup:
CoreELEC 8.95, TVheadend 4.2.6
In TVheadend, DVB inputs, IPTV, URL is:
pipe:///storage/downloads/sledovanitv.sh
sledovanitv.sh script looks like:
#!/bin/bash
ffmpeg -i "http://31.47.108.4:7909/moderntv/stream/prima/40-hls/live-media.m3u8?_cdn_session=XZY&_cdn_timestamp=XZY&_cdn_token=XZY" -f mpegts -vcodec copy -acodec copy pipe:1
This is failed in TVheadend:
2018-08-10 19:37:00.075 spawn: Executing "/storage/downloads/sledovanitv.sh"
2018-08-10 19:37:00.087 spawn: Executing "/storage/downloads/sledovanitv.sh"
2018-08-10 19:37:00.099 spawn: Executing "/storage/downloads/sledovanitv.sh"
2018-08-10 19:37:00.111 spawn: Executing "/storage/downloads/sledovanitv.sh"
2018-08-10 19:37:00.123 spawn: Executing "/storage/downloads/sledovanitv.sh"
2018-08-10 19:37:00.135 spawn: Executing "/storage/downloads/sledovanitv.sh"
2018-08-10 19:37:00.147 spawn: Executing "/storage/downloads/sledovanitv.sh"
2018-08-10 19:37:00.159 spawn: Executing "/storage/downloads/sledovanitv.sh"
2018-08-10 19:37:00.171 spawn: Executing "/storage/downloads/sledovanitv.sh"
2018-08-10 19:37:00.183 spawn: Executing "/storage/downloads/sledovanitv.sh"
2018-08-10 19:37:00.194 mpegts: pipe:///storage/downloads/sledovanitv.sh in IPTV - scan no data, failed
When I execute script from shell with routed output to > file, everything works just fine and video is being streamed and downloaded to file
CoreELEC:~/downloads # sh sledovanitv.sh
ffmpeg version 8.95.0 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 8.1.0 (GCC)
configuration: --enable-ffmpeg --disable-ffplay --enable-ffprobe --enable-static --disable-shared --enable-gpl --enable-nonfree --disable-doc --enable-avresample --disable-lzma --disable-alsa --arch=arm --cpu=cortex-a53 --cross-prefix=/home/adamg/CoreELEC/build.CoreELEC-S905.arm-8.95.0/toolchain/bin/armv8a-libreelec-linux-gnueabi- --enable-cross-compile --sysroot=/home/adamg/CoreELEC/build.CoreELEC-S905.arm-8.95.0/toolchain/armv8a-libreelec-linux-gnueabi/sysroot --sysinclude=/home/adamg/CoreELEC/build.CoreELEC-S905.arm-8.95.0/toolchain/armv8a-libreelec-linux-gnueabi/sysroot/usr/include --target-os=linux --nm=/home/adamg/CoreELEC/build.CoreELEC-S905.arm-8.95.0/toolchain/bin/armv8a-libreelec-linux-gnueabi-nm --ar=/home/adamg/CoreELEC/build.CoreELEC-S905.arm-8.95.0/toolchain/bin/armv8a-libreelec-linux-gnueabi-ar --as=/home/adamg/CoreELEC/build.CoreELEC-S905.arm-8.95.0/toolchain/bin/armv8a-libreelec-linux-gnueabi-gcc --cc=/home/adamg/CoreELEC/build.CoreELEC-S905.arm-8.95.0/toolchain/bin/armv8a-libreelec-linux-gnueabi-gcc --ld=/home/adamg/CoreELEC/build.CoreELEC-S905.arm-8.95.0/toolchain/bin/armv8a-libreelec-linux-gnueabi-gcc --pkg-config=/home/adamg/CoreELEC/build.CoreELEC-S905.arm-8.95.0/toolchain/bin/pkg-config --host-cc=/home/adamg/CoreELEC/build.CoreELEC-S905.arm-8.95.0/toolchain/bin/host-gcc --host-cflags='-O2 -Wall -pipe -I/home/adamg/CoreELEC/build.CoreELEC-S905.arm-8.95.0/toolchain/include -Wno-format-security' --host-ldflags='-Wl,-rpath,/home/adamg/CoreELEC/build.CoreELEC-S905.arm-8.95.0/toolchain/lib -L/home/adamg/CoreELEC/build.CoreELEC-S905.arm-8.95.0/toolchain/lib' --host-extralibs=-lm --extra-cflags='-march=armv8-a+crc -mtune=cortex-a53 -mabi=aapcs-linux -Wno-psabi -Wa,-mno-warn-deprecated -mcpu=cortex-a53 -mfloat-abi=hard -mfpu=neon-fp-armv8 -fomit-frame-pointer -Wall -pipe -Os ' --extra-ldflags='-march=armv8-a+crc -mtune=cortex-a53 -Wl,--as-needed' --extra-libs= --enable-pic --enable-openssl --enable-hardcoded-tables
libavutil 56. 14.100 / 56. 14.100
libavcodec 58. 18.100 / 58. 18.100
libavformat 58. 12.100 / 58. 12.100
libavdevice 58. 3.100 / 58. 3.100
libavfilter 7. 16.100 / 7. 16.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 1.100 / 5. 1.100
libswresample 3. 1.100 / 3. 1.100
libpostproc 55. 1.100 / 55. 1.100
frame= 503 fps=171 q=-1.0 Lsize= 6948kB time=00:00:20.13 bitrate=2826.2kbits/s speed=6.83x
Also when I even pipe from TVheadend just ffmpeg it works:
pipe:///storage/.kodi/addons/tools.ffmpeg-tools/bin/ffmpeg -i "http://31.47.108.4:7909/moderntv/stream/prima/40-hls/live-media.m3u8?_cdn_session=XZY&_cdn_timestamp=XZY&_cdn_token=XZY" -f mpegts -vcodec copy -acodec copy pipe:1
Only when I tried to use pipe *.sh script it fails, can somebody help me or point me to right direction ?
Thanks