Project

General

Profile

pipe:// with another pipe'd input

Added by vatec cetav 12 days ago

Hi all, I am looking to integrate FM Radio into TV Headend using rtl_fm and ffmpeg. I can use both rtl_fm ... | ffmpeg ... to get a valid audio stream, however I have been unable to integrate it into the pipe:// functionality of TVheadend.
Basically, using pipe:// appears to ignore the | operator if I was to just write directly what I've been using in the command line, and executes everything as arguments of rtl_fm, instead of first piping to ffmpeg.
Unfortunately I can't directly output rtl_fm to tvheadend as it is not in mpegts format.

Any ideas on how to get this to work would be greatly appreciated.


Replies (4)

RE: pipe:// with another pipe'd input - Added by saen acro 12 days ago

Any example of command you use, and not work.

RE: pipe:// with another pipe'd input - Added by vatec cetav 12 days ago

For example, when running on command line this works
rtl_fm -f 100M | ffmpeg ...etc
However, using pipe://rtl_fm -f 100M | ffmpeg .....
TVheadend seems to run everything as arguments for the first command, e.g ffmpeg as an argument, instead of being the pipe

RE: pipe:// with another pipe'd input - Added by saen acro 12 days ago

You can try to run bash script, instead of multiple commands.

RE: pipe:// with another pipe'd input - Added by vatec cetav 12 days ago

Thanks, got it all working.

In case anyone else needs help

TVheadend mux URL:

pipe:///bin/sh /storage/radio.sh 100.3M

SH file:

#!/bin/bash
LD_LIBRARY_PATH=/storage/radio /storage/radio/rtl_fm -f $1 -M fm -s 170k -A std  -l 0 -E deemp -r 44.1k  | /storage/.kodi/addons/tools.ffmpeg-tools/bin/ffmpeg -f s16le -ac 1 -i pipe:0 -acodec mp2 -ab 128k -f mpegts -

    (1-4/4)