Thanks to Saen and Em I was able to have the spawn profile working, but only for Dream Player in Android. Whenever I connect with Kodi clients it uses the htsp profile.. although in both cases are connected with the same user "test", which is configured to use only the ffmpeg profile.
The command line in the spawn profile is the following:
/usr/bin/ffmpeg -loglevel fatal -threads 4 -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi -i pipe:0 -vf 'scale_vaapi=w=1280:h=720' -c:v h264_vaapi -b:v 2M -c:a copy -f mpegts pipe:1
When using Dream Player the stream is working fine and I get the following in the log:
2019-02-05 11:47:15.269 subscription: 004E: "HTTP" subscribing on channel "CARACOL HD 2", weight: 100, adapter: "Silicon Labs Si2168 #0 : DVB-T #0", network: "Col", mux: "473MHz", provider: "CARACOL TELEVISION SA", service: "CARACOL HD 2", profile="ffmpeg", hostname="192.168.15.252", username="test", client="VLC/3.0.4 LibVLC/3.0.4"
2019-02-05 11:47:15.270 spawn: Executing "/usr/bin/ffmpeg"
2019-02-05 11:47:20.570 spawn: WARNING: Invalid RefPicListX[] entry!!! It is not included in DPB
2019-02-05 11:47:58.404 subscription: 004E: "HTTP" unsubscribing from "CARACOL HD 2", hostname="192.168.15.252", username="test", client="VLC/3.0.4 LibVLC/3.0.4"
When using Kodi I get the following:
2019-02-05 11:46:46.469 subscription: 004D: "192.168.15.136 [ test | Kodi Media Center ]" subscribing on channel "CARACOL HD 2", weight: 100, adapter: "Silicon Labs Si2168 #0 : DVB-T #0", network: "Col", mux: "473MHz", provider: "CARACOL TELEVISION SA", service: "CARACOL HD 2", profile="htsp", hostname="192.168.15.136", username="test", client="Kodi Media Center"
2019-02-05 11:46:53.434 subscription: 004D: "192.168.15.136 [ test | Kodi Media Center ]" unsubscribing from "CARACOL HD 2", hostname="192.168.15.136", username="test", client="Kodi Media Center"
Could you please confirm if there is something I must configure in Kodi or in the tvheadend server to allow Kodi to connect using that profile? Thanks!