Open biGdada opened 2 years ago
Does kodi play this correctly from the strm file? I.e. with no KODIPROPS?
i havent checked it with strm file, but it doesnt play when i choose it from the GUI. thats exactly the reason i'm trying to use ffmpegdirect do play it. AFAIK, kodis built-in player cant play raw pcm because the stream lacks the relevant headers. BUT, ffmpeg (the command line version) can read the file and convert it if i provide the command line parameters describing the format (-sample_rate 44100 -f s16le -ac 2). i was hoping there is a way to do the same with the plugin, considering the fact that it is based on ffmpeg.
You should be able to pass arguments to ffmpeg using a |
after the URL.
its not a url, its a local file(a local pipe, to be exact)
tried it, and this is the error i'm getting :
ERROR <general>: AddOnLog: inputstream.ffmpegdirect: OpenWithCURL - error probing input format, /storage/.kodi/userdata/dockercdb/shairport-sync/tmp/shairport-sync-audio | -sample_rate 44100 -f s16le -ac 2
am i missing something?
this is the contents of the strm file:
/storage/.kodi/userdata/dockercdb/shairport-sync/tmp/shairport-sync-audio | -sample_rate 44100 -f s16le -ac 2
It still needs to be a URL so must follow URL syntax, so like:
#KODIPROP:inputstream=inputstream.ffmpegdirect
/storage/.kodi/userdata/dockercdb/shairport-sync/tmp/shairport-sync-audio|sample_rate=44100&f=s16le&ac=2
Assuming these are valid ffmpeg options of course.
I’m not saying this will work, but it is how you can pass ffmpeg options to the addon.
it didnt work. is there a way to enable logging to see what parameters are being passed to ffmpeg?
You can enable debug logging in Kodi and there is also an option to enable ffmpeg logging in the addon settings
All of the supported options are available here: https://ffmpeg.org/ffmpeg.html. I don’t see sample_rate though which is strange.
Is there a MIME type for audio stream? Maybe that would work.
i've enabled debug logging and also ffmpeg logging in the addon but i cant see in the logs what are the exact parameters that are being passed to ffmpeg. i also tried to define the mime type, seems like its being ignored (mimetype=audio/wav;codec=pcm;rate=16000)
As in:
#KODIPROP:mimetype=audio/wav;codec=pcm;rate=16000
exactly. the .strm file:
/storage/.kodi/userdata/dockercdb/shairport-sync/tmp/shairport-sync-audio
hi. can this plugin play raw PCM audio (16 bit little endian, 44100, stereo)?
ffmpeg from command line can read this file with the following parameters: /usr/bin/ffmpeg -sample_rate 44100 -f s16le -ac 2
if it is possible, what #KODIPROP lines should be in strm file? thanks.