Description:
My ISP provide to me IPTV services through multicast (igmpproxy and kernel multicast routing), which working fine with VLC. Kodi is famous media center software, which support SAP functionality, but not working (only load list of channels). The investigation revealed: download the list of channels, searching media streams, finding only the audio stream, stop working (without stopping multicast stream!). Change source code and testing with different FFmpeg libraries and compiling for ARM - it was not in my plans.
As a workaround I started using IPTV simple client, which support M3U playlists. In addition I use udpxy, which convert multicast stream to http unicast.
Playlist:
#EXTM3U url-tvg="http://iptv.airnet.ru/jtv.zip" tvg-shift=0 deinterlace=8 aspect-ratio=none
#EXTINF:-1 tvg-name="Первый канал (Россия)" ,Первый
http://192.168.101.1:40000/udp/224.24.24.1:1234
#EXTINF:-1 tvg-name="Россия 1" deinterlace=6,Россия 1
http://192.168.101.1:40000/udp/224.24.24.2:1234
#EXTINF:-1 tvg-name="Россия 2" ,Россия 2
http://192.168.101.1:40000/udp/224.24.24.3:1234
#EXTINF:-1 tvg-name="" ,Россия 24
http://192.168.101.1:40000/udp/224.24.24.4:1234
#EXTINF:-1 tvg-name="Пятый канал Петербург (Петербург)" ,5 канал
http://192.168.101.1:40000/udp/224.24.24.5:1234
Debug (identical for Kodi Helix/Isengard):
17:09:38 T:1695544336 DEBUG: Thread BackgroundLoader 1695544336 terminating
17:09:50 T:1961865216 DEBUG: Keyboard: scancode: 0x1c, sym: 0x000d, unicode: 0x0000, modifier: 0x1000
17:09:50 T:1961865216 DEBUG: OnKey: return (0xf00d) pressed, action is Select
17:09:50 T:1961865216 DEBUG: OnPlayMedia sap://1.2.3.4/VideoLAN 16926 1 IN IP4 localhost/0x1e42.sdp
17:09:50 T:1961865216 DEBUG: CAnnouncementManager - Announcement: OnClear from xbmc
17:09:50 T:1961865216 DEBUG: GOT ANNOUNCEMENT, type: 2, from xbmc, message OnClear
17:09:50 T:1961865216 DEBUG: GetMovieId (sap://1.2.3.4/VideoLAN 16926 1 IN IP4 localhost/0x1e42.sdp), query = select idMovie from movie where idFile=29
17:09:50 T:1961865216 DEBUG: GetEpisodeId (sap://1.2.3.4/VideoLAN 16926 1 IN IP4 localhost/0x1e42.sdp), query = select idEpisode from episode where idFile=29
17:09:50 T:1961865216 DEBUG: GetMusicVideoId (sap://1.2.3.4/VideoLAN 16926 1 IN IP4 localhost/0x1e42.sdp), query = select idMVideo from musicvideo where idFile=29
17:09:50 T:1961865216 DEBUG: CAnnouncementManager - Announcement: OnAdd from xbmc
17:09:50 T:1961865216 DEBUG: GOT ANNOUNCEMENT, type: 2, from xbmc, message OnAdd
17:09:50 T:1961865216 DEBUG: Loading settings for sap://1.2.3.4/VideoLAN 16926 1 IN IP4 localhost/0x1e42.sdp
17:09:50 T:1961865216 DEBUG: CPlayerCoreFactory::GetPlayers(sap://1.2.3.4/VideoLAN 16926 1 IN IP4 localhost/0x1e42.sdp)
17:09:50 T:1961865216 DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: system rules
17:09:50 T:1961865216 DEBUG: CPlayerSelectionRule::GetPlayers: matches rule: system rules
17:09:50 T:1961865216 DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: rtv
17:09:50 T:1961865216 DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: hdhomerun/myth/mms/udp
17:09:50 T:1961865216 DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: lastfm/shout
17:09:50 T:1961865216 DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: rtmp
17:09:50 T:1961865216 DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: rtsp
17:09:50 T:1961865216 DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: streams
17:09:50 T:1961865216 DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: dvd
17:09:50 T:1961865216 DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: dvdimage
17:09:50 T:1961865216 DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: sdp/asf
17:09:50 T:1961865216 DEBUG: CPlayerSelectionRule::GetPlayers: matches rule: sdp/asf
17:09:50 T:1961865216 DEBUG: CPlayerSelectionRule::GetPlayers: adding player: DVDPlayer (1) for rule: sdp/asf
17:09:50 T:1961865216 DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: nsv
17:09:50 T:1961865216 DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: radio
17:09:50 T:1961865216 DEBUG: CPlayerCoreFactory::GetPlayers: matched 1 rules with players
17:09:50 T:1961865216 DEBUG: CPlayerCoreFactory::GetPlayers: adding videodefaultplayer (1)
17:09:50 T:1961865216 DEBUG: CPlayerCoreFactory::GetPlayers: for video=1, audio=0
17:09:50 T:1961865216 DEBUG: CPlayerCoreFactory::GetPlayers: for video=1, audio=1
17:09:50 T:1961865216 DEBUG: CPlayerCoreFactory::GetPlayers: adding player: DVDPlayer (1)
17:09:50 T:1961865216 DEBUG: CPlayerCoreFactory::GetPlayers: added 1 players
17:09:50 T:1951933456 DEBUG: CAESinkPi:Drain delay:99ms now:0ms
17:09:50 T:1951933456 DEBUG: CAESinkPi:Deinitialize
17:09:50 T:1951933456 DEBUG: CAESinkPi:SetAudioProps hdmi_stream_channels 0 hdmi_channel_map 00000000
17:09:50 T:1951933456 DEBUG: COMXCoreComponent::Deinitialize : OMX.broadcom.audio_splitter handle 0x6399ae88
17:09:50 T:1951933456 DEBUG: COMXCoreComponent::Deinitialize : OMX.broadcom.audio_render handle 0x63921c38
17:09:50 T:1951933456 DEBUG: COMXCoreComponent::Deinitialize : OMX.broadcom.audio_render handle 0x6c60c1b8
17:09:50 T:1961865216 NOTICE: DVDPlayer: Opening: sap://1.2.3.4/VideoLAN 16926 1 IN IP4 localhost/0x1e42.sdp
17:09:50 T:1961865216 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
17:09:50 T:1961865216 DEBUG: CRenderManager::UpdateDisplayLatency - Latency set to 0 msec
17:09:50 T:1961865216 DEBUG: CMMALRenderer::UnInit
17:09:50 T:1961865216 DEBUG: CMMALRenderer::PreInit
17:09:50 T:1695544336 NOTICE: Thread DVDPlayer start, auto delete: false
17:09:50 T:1695544336 NOTICE: Creating InputStream
17:09:50 T:1695544336 NOTICE: Creating Demuxer
17:09:50 T:1695544336 DEBUG: Open - probing detected format [sdp]
17:09:50 T:1695544336 DEBUG: ffmpeg[650FF410]: Using network protocols without global network initialization. Please use avformat_network_init(), this will become mandatory later.
17:09:50 T:1695544336 DEBUG: Previous line repeats 3 times.
17:09:50 T:1695544336 DEBUG: Open - avformat_find_stream_info starting
17:09:50 T:1695544336 DEBUG: Open - av_find_stream_info finished
17:09:50 T:1695544336 INFO: ffmpeg[650FF410]: Input #0, sdp, from 'sap://1.2.3.4/VideoLAN 16926 1 IN IP4 localhost/0x1e42.sdp':
17:09:50 T:1695544336 INFO: ffmpeg[650FF410]: Metadata:
17:09:50 T:1695544336 INFO: ffmpeg[650FF410]: title : 100 ТВ
17:09:50 T:1695544336 INFO: ffmpeg[650FF410]: Duration: N/A, bitrate: 64 kb/s
17:09:50 T:1695544336 INFO: ffmpeg[650FF410]: Stream #0:0: Audio: pcm_mulaw, 8000 Hz, 1 channels, s16, 64 kb/s
17:09:50 T:1695544336 DEBUG: CDVDDemuxFFmpeg::AddStream(0, ...) -> 0
17:09:50 T:1695544336 DEBUG: COMXCoreComponent::Initialize OMX.broadcom.clock input port 80 output port 81 m_handle 0x38c7fa0
17:09:50 T:1695544336 DEBUG: OMXClock::OMXStop
17:09:50 T:1695544336 DEBUG: OMXClock::OMXSetSpeed(0.00) pause_resume:1
17:09:50 T:1695544336 NOTICE: Opening stream: 0 source: 256
17:09:50 T:1695544336 NOTICE: Creating audio thread
17:09:50 T:1685058576 NOTICE: Thread OMXPlayerAudio start, auto delete: false
17:09:50 T:1695544336 DEBUG: OnPlayBackStarted: play state was 1, starting 1
17:09:50 T:1685058576 DEBUG: COMXPlayerAudio - CDVDMsg::PLAYER_STARTED 0
17:09:50 T:1961865216 DEBUG: PlayFile: OpenFile succeed, play state 2
17:09:50 T:1695544336 DEBUG: CDVDPlayer::SetCaching - caching state 3
17:09:50 T:1695544336 WARNING: CDVDMessageQueue(video)::Put MSGQ_NOT_INITIALIZED
17:09:50 T:1685058576 DEBUG: COMXPlayerAudio - CDVDMsg::GENERAL_SYNCHRONIZE
17:09:50 T:1685058576 DEBUG: COMXPlayerAudio - CDVDMsg::PLAYER_SETSPEED 0
17:09:50 T:1695544336 DEBUG: CDVDPlayer::SetCaching - caching state 0
17:09:50 T:1961865216 DEBUG: OnPlayBackStarted: play state was 2, starting 0
17:09:50 T:1685058576 DEBUG: COMXPlayerAudio - CDVDMsg::PLAYER_STARTED 0
17:09:50 T:1695544336 NOTICE: CDVDPlayer::OnExit()
17:09:50 T:1695544336 NOTICE: DVDPlayer: eof, waiting for queues to empty
17:09:50 T:1695544336 NOTICE: Closing stream player 1
17:09:50 T:1695544336 NOTICE: CDVDMessageQueue(audio)::WaitUntilEmpty
17:09:50 T:1685058576 DEBUG: COMXPlayerAudio - CDVDMsg::PLAYER_SETSPEED 1000
17:09:50 T:1685058576 DEBUG: COMXPlayerAudio - CDVDMsg::GENERAL_SYNCHRONIZE
17:09:50 T:1685058576 NOTICE: thread end: OMXPlayerAudio::OnExit()
17:09:50 T:1685058576 DEBUG: Thread OMXPlayerAudio 1685058576 terminating
17:09:50 T:1961865216 DEBUG: ADDON: Dll Initializing - OpenGL Spectrum
17:09:50 T:1695544336 DEBUG: OMXClock::OMXStop
17:09:50 T:1741681680 NOTICE: Thread BackgroundLoader start, auto delete: false
17:09:50 T:1695544336 DEBUG: COMXCoreComponent::Deinitialize : OMX.broadcom.clock handle 0x38c7fa0
17:09:50 T:1695544336 DEBUG: OnPlayBackEnded: play state was 2, starting 0
17:09:50 T:1695544336 DEBUG: CAnnouncementManager - Announcement: OnStop from xbmc
17:09:50 T:1695544336 DEBUG: GOT ANNOUNCEMENT, type: 1, from xbmc, message OnStop
17:09:50 T:1695544336 DEBUG: Thread DVDPlayer 1695544336 terminating
17:09:50 T:1961865216 DEBUG: Calling TransferSettings for: OpenGL Spectrum
17:09:50 T:1961865216 DEBUG: Visualisation::Start()
17:09:50 T:1961865216 DEBUG: CGUIInfoManager::SetCurrentMovie(sap://1.2.3.4/VideoLAN 16926 1 IN IP4 localhost/0x1e42.sdp)
17:09:50 T:1961865216 DEBUG: GetMovieId (sap://1.2.3.4/VideoLAN 16926 1 IN IP4 localhost/0x1e42.sdp), query = select idMovie from movie where idFile=29
17:09:50 T:1961865216 DEBUG: GetEpisodeId (sap://1.2.3.4/VideoLAN 16926 1 IN IP4 localhost/0x1e42.sdp), query = select idEpisode from episode where idFile=29
17:09:50 T:1961865216 DEBUG: GetMusicVideoId (sap://1.2.3.4/VideoLAN 16926 1 IN IP4 localhost/0x1e42.sdp), query = select idMVideo from musicvideo where idFile=29
17:09:50 T:1961865216 DEBUG: CAnnouncementManager - Announcement: OnPlay from xbmc
17:09:50 T:1961865216 DEBUG: GOT ANNOUNCEMENT, type: 1, from xbmc, message OnPlay
17:09:50 T:1961865216 DEBUG: Updating visualisation albumart:
17:09:50 T:1961865216 DEBUG: FreeVisualisation() started
17:09:50 T:1961865216 INFO: ADDON: Dll Stopped - OpenGL Spectrum
17:09:50 T:1961865216 INFO: ADDON: Dll Destroyed - OpenGL Spectrum
17:09:50 T:1961865216 DEBUG: FreeVisualisation() done
17:09:50 T:1961865216 NOTICE: CDVDPlayer::CloseFile()
17:09:50 T:1961865216 NOTICE: DVDPlayer: waiting for threads to exit
17:09:50 T:1961865216 NOTICE: DVDPlayer: finished waiting
17:09:50 T:1961865216 DEBUG: CMMALRenderer::UnInit
17:09:50 T:1961865216 NOTICE: CDVDPlayer::CloseFile()
17:09:50 T:1961865216 NOTICE: DVDPlayer: waiting for threads to exit
17:09:50 T:1961865216 NOTICE: DVDPlayer: finished waiting
17:09:50 T:1961865216 DEBUG: CMMALRenderer::UnInit
17:09:50 T:1960322064 INFO: CAESinkALSA - Unable to open device "surround71" for playback
17:09:50 T:1960322064 INFO: CAESinkALSA - Unable to open device "surround51" for playback
17:09:50 T:1960322064 INFO: CAESinkALSA - Unable to open device "surround71" for playback
17:09:50 T:1960322064 INFO: CAESinkALSA - Unable to open device "surround40" for playback
17:09:50 T:1960322064 INFO: CAESinkALSA - Unable to open device "surround51" for playback
17:09:50 T:1960322064 INFO: CAESinkALSA - Unable to open device "surround71" for playback
17:09:50 T:1960322064 NOTICE: Found 2 Lists of Devices
17:09:50 T:1960322064 NOTICE: Enumerated PI devices:
17:09:50 T:1960322064 NOTICE: Device 1
17:09:50 T:1960322064 NOTICE: m_deviceName : HDMI
17:09:50 T:1960322064 NOTICE: m_displayName : HDMI
17:09:50 T:1960322064 NOTICE: m_displayNameExtra:
17:09:50 T:1960322064 NOTICE: m_deviceType : AE_DEVTYPE_HDMI
17:09:50 T:1960322064 NOTICE: m_channels : FL,FR
17:09:50 T:1960322064 NOTICE: m_sampleRates : 8000,11025,16000,22050,24000,32000,44100,48000,88200,96000,176400,192000
17:09:50 T:1960322064 NOTICE: m_dataFormats : AE_FMT_FLOAT,AE_FMT_S32NE,AE_FMT_S16NE,AE_FMT_S32LE,AE_FMT_S16LE,AE_FMT_FLOATP,AE_FMT_S32NEP,AE_FMT_S16NEP,AE_FMT_AC3,AE_FMT_DTS,AE_FMT_EAC3
17:09:50 T:1960322064 NOTICE: Device 2
17:09:50 T:1960322064 NOTICE: m_deviceName : Analogue
17:09:50 T:1960322064 NOTICE: m_displayName : Analogue
17:09:50 T:1960322064 NOTICE: m_displayNameExtra:
17:09:50 T:1960322064 NOTICE: m_deviceType : AE_DEVTYPE_PCM
17:09:50 T:1960322064 NOTICE: m_channels : FL,FR
17:09:50 T:1960322064 NOTICE: m_sampleRates : 48000
17:09:50 T:1960322064 NOTICE: m_dataFormats : AE_FMT_FLOAT,AE_FMT_S32LE,AE_FMT_S16LE,AE_FMT_FLOATP,AE_FMT_S32NEP,AE_FMT_S16NEP
17:09:50 T:1960322064 NOTICE: Device 3
17:09:50 T:1960322064 NOTICE: m_deviceName : Both
17:09:50 T:1960322064 NOTICE: m_displayName : HDMI and Analogue
17:09:50 T:1960322064 NOTICE: m_displayNameExtra:
17:09:50 T:1960322064 NOTICE: m_deviceType : AE_DEVTYPE_PCM
17:09:50 T:1960322064 NOTICE: m_channels : FL,FR
17:09:50 T:1960322064 NOTICE: m_sampleRates : 48000
17:09:50 T:1960322064 NOTICE: m_dataFormats : AE_FMT_FLOAT,AE_FMT_S32LE,AE_FMT_S16LE,AE_FMT_FLOATP,AE_FMT_S32NEP,AE_FMT_S16NEP
17:09:50 T:1960322064 NOTICE: Enumerated ALSA devices:
17:09:50 T:1960322064 NOTICE: Device 1
17:09:50 T:1960322064 NOTICE: m_deviceName : @
17:09:50 T:1960322064 NOTICE: m_displayName : Default (bcm2835 ALSA bcm2835 ALSA)
17:09:50 T:1960322064 NOTICE: m_displayNameExtra:
17:09:50 T:1960322064 NOTICE: m_deviceType : AE_DEVTYPE_PCM
17:09:50 T:1960322064 NOTICE: m_channels : FL,FR
17:09:50 T:1960322064 NOTICE: m_sampleRates : 8000,11025,16000,22050,32000,44100,48000
17:09:50 T:1960322064 NOTICE: m_dataFormats : AE_FMT_S16NE,AE_FMT_S16LE,AE_FMT_U8
17:09:50 T:1951933456 INFO: CActiveAESink::OpenSink - initialize sink
17:09:50 T:1951933456 DEBUG: CActiveAESink::OpenSink - trying to open device PI:Both
17:09:50 T:1951933456 DEBUG: CAESinkPi:SetAudioProps hdmi_stream_channels 0 hdmi_channel_map 00000008
17:09:50 T:1951933456 DEBUG: CAESinkPi:Initialize Format:15 Channels:2 Samplerate:44100 framesize:8 bufsize:17640 bytes/s=352800.00 dest=PI:Both
17:09:50 T:1951933456 DEBUG: COMXCoreComponent::Initialize OMX.broadcom.audio_render input port 100 output port 100 m_handle 0x6c7abd28
17:09:50 T:1951933456 DEBUG: COMXCoreComponent::Initialize OMX.broadcom.audio_splitter input port 261 output port 262 m_handle 0x68f7fc58
17:09:50 T:1951933456 DEBUG: COMXCoreComponent::Initialize OMX.broadcom.audio_render input port 100 output port 100 m_handle 0x6c7abcc8
17:09:50 T:1951933456 DEBUG: COMXCoreComponent::AllocInputBuffers component(OMX.broadcom.audio_splitter) - port(261), nBufferCountMin(2), nBufferCountActual(2), nBufferSize(17664), nBufferAlignmen(32)
17:09:50 T:1951933456 DEBUG: CActiveAESink::OpenSink - SinkPi Initialized:
17:09:50 T:1951933456 DEBUG: Output Device : HDMI and Analogue
17:09:50 T:1951933456 DEBUG: Sample Rate : 44100
17:09:50 T:1951933456 DEBUG: Sample Format : AE_FMT_FLOAT
17:09:50 T:1951933456 DEBUG: Channel Count : 2
17:09:50 T:1951933456 DEBUG: Channel Layout: FL,FR
17:09:50 T:1951933456 DEBUG: Frames : 2205
17:09:50 T:1951933456 DEBUG: Frame Samples : 4410
17:09:50 T:1951933456 DEBUG: Frame Size : 8
17:09:50 T:1951933456 INFO: CActiveAEResamplePi::CActiveAEResamplePi
17:09:50 T:1951933456 INFO: CActiveAEResamplePi::Init remap:(nil) chan:2->2 rate:44100->44100 format:3->3 bits:32->32 dither:0->0 norm:0 upmix:0
17:09:50 T:1951933456 INFO: CActiveAEResamplePi::Init 1.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
17:09:50 T:1951933456 INFO: CActiveAEResamplePi::Init 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00
17:09:50 T:1951933456 INFO: CActiveAEResamplePi::Init 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
17:09:50 T:1951933456 INFO: Previous line repeats 5 times.
17:09:50 T:1951933456 DEBUG: COMXCoreComponent::Initialize OMX.broadcom.audio_mixer input port 232 output port 231 m_handle 0x6c7dafb8
17:09:50 T:1951933456 DEBUG: COMXCoreComponent::AllocInputBuffers component(OMX.broadcom.audio_mixer) - port(232), nBufferCountMin(1), nBufferCountActual(1), nBufferSize(524288), nBufferAlignmen(32)
17:09:50 T:1951933456 DEBUG: COMXCoreComponent::AllocOutputBuffers component(OMX.broadcom.audio_mixer) - port(231), nBufferCountMin(1), nBufferCountActual(1), nBufferSize(524288) nBufferAlignmen(32)
17:09:50 T:1951933456 INFO: CActiveAEResamplePi::~CActiveAEResamplePi
17:09:50 T:1951933456 DEBUG: CActiveAEResamplePi:DeInit
17:09:50 T:1951933456 DEBUG: COMXCoreComponent::Deinitialize : OMX.broadcom.audio_mixer handle 0x6c7dafb8
17:09:50 T:1960322064 DEBUG: CActiveAE::ClearDiscardedBuffers - buffer pool deleted
17:09:51 T:1741681680 DEBUG: Thread BackgroundLoader 1741681680 terminating