Getting TVHeadend to use the Lame MP3 Encoder Add-on

  • Hi - It's my first time here. I've been using OpenELEC for many years and recently migrated to LibreELEC, which works a treat on my Raspberry Pi - thank you all for your hard work.

    I am now trying to transcode an Interent radio stream (http://209.133.216.3:7048), from HE-AACv2 to MP3 using TVHeadend. This is a radio station that I used to play on my Roku Soundbridge M1001, but the radio station recently changed the codec to HE-AACv2 and my trusty old Soundbridge cannot hack it! Hence the need for transcoding to MP3 via TVHeadend, and quite possibly the need for the 'LibreELEC Lame MP3 Encoder' addon, as discussed below.

    My set up: Raspberry Pi 1-B running LibreELEC v8.2.5 (Kodi v17.6 - Krypton) and TVH (HTS Tvheadend 4.2.6-7 ~ LibreELEC Tvh-addon v8.2.113). The Pi is overclocked.

    In TVH, I set up an IPTV network and a mux (channel 5000) for the radio station and was hoping to use the following URL within the mux setup:

    "pipe:///usr/bin/ffmpeg -loglevel fatal -i http://209.133.216.3:7048 -vn -acodec libmp3lame -flags +global_header -strict -2 -metadata service_provider=GFMSL -metadata service_name=GoldFM_SL -f mpegts -mpegts_service_type digital_radio pipe:1"

    When trying to use the above mux URL, I was getting an " Unknown encoder 'libmp3lame' " error when scanning that mux. I was able to confirm that lame was not configured into ffmpeg on LibreElec, hence the error message.

    [ Aside: if I replace 'libmp3lame' with 'aac' in the above URL, it works, and I can access the transcoded stream from VLC on my PC using "http: //IP address of Pi:9981/stream/channelnumber/5000" ]

    Fortunately (?), I found that LibreELEC comes with the 'Lame MP3 Audio Encoder v1.2.0.1' addon, so I installed this via Kodi.

    Unfortunately, I still get the same error - "Unknown encoder 'libmp3lame'", even after re-booting, when trying to scan the mux. Guess I still can't use 'libmp3lame' as an argument to ffmpeg in the above manner, as installing the Lame add-on has not automatically made 'libmp3lame' available globally - correct?

    Maybe I have to get the input stream into Lame first and then pipe the output to ffmpeg? With this in mind I just installed the 'Lame MP3 Encoder' add-on on the above system. However, entering 'lame --h' on a SSH terminal window returns the following error: 'lame: not found.' How do I access the Lame MP3 encoder from LibreELEC?

    If piping is the way to go, I don't know the syntax of the pipe command or how to integrate that into the ffmpeg command above and fit it all into the URL field of the mux. My grasp of Linux is pretty basic, so if anyone could give me some pointers, or even the full syntax to put into the mux's URL field, that would be very much appreciated! :)

    Basically, I need TVHeadend to be able to use the installed and enabled 'Lame MP3 Audio Encoder v1.2.0.1' add-on in the mux URL specified above. However, I am not even able access lame at all from a SSH terminal window, so I haven't got very far with this!

    Hope you can please help.

    Many thanks!

  • awiouy:

    Starting with 'Program Add-ons', I checked every category of LibreELEC add-ons on my installation, but did not find the FFmpeg tools add-on you recommended. Am I missing something?

    Based on Googling, it looks like FFmpeg tools will not be available till LE9?

    I also came across the following:

    1) This zip file: tools.ffmpeg-tools-9.0.101.zip dated 2018-06-08 03:23 on the test LE9 site tools.ffmpeg-tools

    2) As a temp workaround, a recommendation to install the Emby Server and use ffmpegx here: FFMPEG path tvheadend on Libreelec

    Is it OK to install FFmpeg Tools from the test LE9 site? Will doing that potentially have a negative impact on my LE 8.2.5 system? I already have TVH as my media server, but perhaps installing Emby temporarily is the way to go?

    Your views would be appreciated.