I found a solution for this. Use "IPTV remuxer for tvheadend", normally used as input for tvh but can also be used at the output with some modifications...
https://github.com/Jalle19/node-ffmpeg-mpegts-proxy
Change in options.js
var getOutputAvconvOptions = function(source) {
var options = [
/* '-vcodec', 'copy',*/
'-acodec', 'copy',
'-metadata', 'service_provider=' + source.provider,
'-metadata', 'service_name=' + source.name,
/* '-f', 'mpegts'*/
];
and in node-ffmpeg-mpegts-proxy.js change to mpeg output insted of mpegts
// Tell the client we're sending MPEG data
response.writeHead(200, {
'Content-Type':
'audio/mpeg'
});
and in sources.json e.g.
{
"name": "R1",
"provider": "BBC",
"url": "/BBC_R1.mp2",
"source": "http://server1a:9981/stream/channelnumber/3002",
"avconvOptions": {
"input": [
],
"output": [
"-f", "mp2"
]
}
},
An in LMS:
http://server1a:9128/BBC_R1.mp2
Works great, 192 kbit/s instead of lousy 48 kbit/s...