Jump to content

Live TV M3U8 issue


Recommended Posts

Posted (edited)

My IPTV service provides M3U8 channel list in such a form:

#EXTM3U generation-date="2024.11.12"
#EXTINF:0 tvg-name="Name1" tvg-logo="http://logo.tv/1.png" timeshift="6", Name1
#EXTGRP:1. Federal
http://service.tv:12345/ch001/mono.m3u8?token=aabbcc
#EXTINF:0 tvg-name="Name2" tvg-logo="http://logo.tv/2.png" timeshift="2", Name2
#EXTGRP:10. Educational
http://service.tv:12345/ch002/mono.m3u8?token=xxyyzz

It seems that emby ignores #EXTGRP group tag and shows all 1000+ channels in one plain list. How to "teach" emby (or me) recognize this tag correctly?

PS: Sorry, wrong issue placement. Issue with Live TV in general, not MediaPortal.

Edited by ak2k5
Wrong issue placement
Posted

Have you explored the m3u tuner setup dialog?
There is a field you can use to setup a list of groups to import, discarding other channels.

I know Emby will read the group using the traditional method like:

#EXTINF:-1 tvg-id="AAAA" tvg-name="AAAA HD tvg-logo="http://BLABLABLAUR.cx/logo/AAAA.png" group-title="Group A",AAAA HD
http://BLABLABLAURL:8090/s/5e3e3bd7/channel-A-hd.m3u8

I've not seen/tested this using the extended M3U format as it seems almost universally IPTV providers are using the conventional group=title parameter.

#EXTINF:0 group-title="Group1" tvg-id="Channel-A-hd" tvg-logo="http://BLABLABLAUR.app/streams/Channel-A-HD.png" tvg-rec="7",Channel A HD
#EXTGRP:GroupA
http://BLABLABLAURL:8090/s/5e3e3bd7/channel-A-hd.m3u8

 

Posted
12 minutes ago, Carlo said:

Have you explored the m3u tuner setup dialog?
There is a field you can use to setup a list of groups to import, discarding other channels.

You mean this field? 

image.thumb.png.bbae2958572ae5faf565db6588314231.png

The field looks like group filter to let emby import channels from choosen groups only. The problem is emby could not get (and didn't display of process) any group information from the source. 

Posted

@LukeWe read group-title fine from m3u/m3u8 files, but it appears we aren't reading the group information if using #EXTGRP

We should be reading the group(s) using either method, can you check on this

Posted

Never heard of ExtGrp. Anyway here's a build of the m3u plugin with some support added for it that you can test out. If it works out well enough then we can publish this. Thanks.

Emby.M3UTuner.zip

  • Like 1
Posted
12 hours ago, Luke said:

Never heard of ExtGrp. Anyway here's a build of the m3u plugin with some support added for it that you can test out. If it works out well enough then we can publish this. Thanks.

It seems new plugin lost group support completely. Attached two m3u8 sample files. 

Original plugin with group-title:

image.png.22b13c96297c5196f103c7e73ff86fa5.png

New plugin with group-title/#EXTGRP:

image.png.61c4fc19bddbfff9b7419fb938cd2846.png

digest.extgrp.m3u8 digest.group-title.m3u8

Posted

What do you mean by lost group support completely? What was lost?

Posted

His issue is the Emby Server isn't loading the groups from the m3u files.
The M3U file uses #EXTGRP for grouping.

Posted (edited)
2 hours ago, Luke said:

What do you mean by lost group support completely? What was lost?

I mean that original M3U plugin process correctly m3u8 playlists with "group-title" option and fails with #EXTGRP tag. Plugin I've downloaded from this thread fails with both. 

Maybe I missed something. My order of operations:

  1. remove m3u8 playlist from LiveTV section
  2. stop EMBY server
  3. replace plugin DLL 
  4. start EMBY server
  5. add m3u8 playlist and wait till it parsed
  6. check the result
Edited by ak2k5
Posted

That is a correct way to update the plugin.
At present Emby supports group-title but not #EXTGRP which is something we can look at adding support for.

Posted

It should add support for extgrp. Can you try it again?

  • Like 1
Posted
On 11/21/2024 at 11:20 PM, Luke said:

It should add support for extgrp. Can you try it again?

New version tuner throws an exception on reading any playlist.

Information I forgot to add: EMBY server works on Synology.

image.png.56bf7acff068a1086afd2b931467473d.png

embyserver.txt

Posted

Just installed and tested the same playlists on Windows EMBY server. No exceptions but still no groups (tags) with new lib. What additional testing or logging may I provide? 

Posted (edited)

@Luke I have reproduced the error with your updated version of Emby.M3UTuner.dll that you provided here

The error gets logged after reading the m3u file 

	System.ArgumentNullException: System.ArgumentNullException: Value cannot be null. (Parameter 'first')

 

You can use the attached 1 channel test m3u file to reproduce. There was no error when adding this test m3u file with the released version of the plugin

my-test-m3u.txt

The file just has 1 dummy channel

#EXTM3U
#EXTINF:-1 tvg-id="BBC1.uk" tvg-name="UK| BBC 1 HD" tvg-logo="http://xxx.xxx.xxx.xxx/xxxx/logos/UK/BBC-1.png" group-title="UK| GENERAL",UK| BBC 1 HD
http://xxxxx-xxx.xxx-xxx.xxx:80/xxxxxxxx/xxxxxxxx/xxxx

 

This shows the error just after Emby Server read the file

Emby Server Log

2024-11-25 11:18:45.562 Info Server: http/1.1 POST http://‌‍‍localhost‌:8096/emby/LiveTv/TunerHosts?X-Emby-Client=Emby Web&X-Emby-Device-Name=Microsoft Edge Windows&X-Emby-Device-Id=5032d689-fc85-4247-8c35-3ea085ebb3eb&X-Emby-Client-Version=4.9.0.32&X-Emby-Token=xxxxxxxxxxxxxxxxx‌&X-Emby-Language=en-gb&reqformat=json. Source Ip: ‌‍‍::1‌, UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0
2024-11-25 11:18:45.579 Info TaskManager: Queueing task RefreshChannelsScheduledTask
2024-11-25 11:18:45.579 Info TaskManager: Executing Refresh Guide
2024-11-25 11:18:45.579 Info Server: http/1.1 Response 200 to ‌‍‍::1‌. Time: 17ms. POST http://‌‍‍localhost‌:8096/emby/LiveTv/TunerHosts?X-Emby-Client=Emby Web&X-Emby-Device-Name=Microsoft Edge Windows&X-Emby-Device-Id=5032d689-fc85-4247-8c35-3ea085ebb3eb&X-Emby-Client-Version=4.9.0.32&X-Emby-Token=xxxxxxxxxxxxxxxxxxx‌&X-Emby-Language=en-gb&reqformat=json

m3u file read (captured with procmon)

11:18:49.2923669	EmbyServer.exe	16908	ReadFile	<path to my-test-m3u.txt>	SUCCESS	Offset: 0, Length: 211
11:18:49.2944639	EmbyServer.exe	16908	ReadFile	<path to my-test-m3u.txt>	END OF FILE	Offset: 211, Length: 4,096
11:18:49.2974464	EmbyServer.exe	16908	CloseFile	<path to my-test-m3u.txt>	SUCCESS	


Emby Server Log

2024-11-25 11:18:49.300 Error LiveTvManager: Error getting channels
	*** Error Report ***
	Version: 4.9.0.32
	Command line: C:\Users\SA\AppData\Roaming\Emby-Server\system\EmbyServer.dll
	Operating system: Microsoft Windows 10.0.26100
	OS/Process: x64/x64
	Framework: .NET 8.0.11
	Runtime: C:/Users/SA/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
	Processor count: 22
	Data path: C:\Users\SA\AppData\Roaming\Emby-Server\programdata
	Application path: C:\Users\SA\AppData\Roaming\Emby-Server\system
	System.ArgumentNullException: System.ArgumentNullException: Value cannot be null. (Parameter 'first')
	   at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
	   at System.Linq.Enumerable.Concat[TSource](IEnumerable`1 first, IEnumerable`1 second)
	   at Emby.M3UTuner.M3uParser.GetChannelInfo(TunerHostInfo tuner, M3uProviderOptions providerOptions, M3UInfo info, String extInf, String tunerHostId, String mediaUrl)
	   at Emby.M3UTuner.M3uParser.GetM3UInfo(TunerHostInfo tuner, M3uProviderOptions providerOptions, TextReader reader, String playlistUrl, String channelIdPrefix, String tunerHostId)
	   at Emby.M3UTuner.M3uParser.Parse(TunerHostInfo tuner, String playlistUrl, String userAgent, String channelIdPrefix, String tunerHostId, M3uProviderOptions providerOptions, CancellationToken cancellationToken)
	   at Emby.M3UTuner.M3UTunerHost.GetChannelsInternal(TunerHostInfo tuner, CancellationToken cancellationToken)
	   at MediaBrowser.Controller.LiveTv.BaseTunerHost.RefreshChannels(TunerHostInfo host, CancellationToken cancellationToken)
	   at Emby.LiveTV.LiveTvManager.RefreshEmbyChannelsInternal(IProgress`1 progress, CancellationToken cancellationToken)
	Source: System.Linq
	TargetSite: Void ThrowArgumentNullException(System.Linq.ExceptionArgument)
	

 

Edited by sa2000
  • Like 1
Posted
On 11/25/2024 at 6:42 AM, sa2000 said:

@Luke I have reproduced the error with your updated version of Emby.M3UTuner.dll that you provided here

The error gets logged after reading the m3u file 

	System.ArgumentNullException: System.ArgumentNullException: Value cannot be null. (Parameter 'first')

 

You can use the attached 1 channel test m3u file to reproduce. There was no error when adding this test m3u file with the released version of the plugin

my-test-m3u.txt 211 B · 0 downloads

The file just has 1 dummy channel

#EXTM3U
#EXTINF:-1 tvg-id="BBC1.uk" tvg-name="UK| BBC 1 HD" tvg-logo="http://xxx.xxx.xxx.xxx/xxxx/logos/UK/BBC-1.png" group-title="UK| GENERAL",UK| BBC 1 HD
http://xxxxx-xxx.xxx-xxx.xxx:80/xxxxxxxx/xxxxxxxx/xxxx

 

This shows the error just after Emby Server read the file

Emby Server Log

2024-11-25 11:18:45.562 Info Server: http/1.1 POST http://‌‍‍localhost‌:8096/emby/LiveTv/TunerHosts?X-Emby-Client=Emby Web&X-Emby-Device-Name=Microsoft Edge Windows&X-Emby-Device-Id=5032d689-fc85-4247-8c35-3ea085ebb3eb&X-Emby-Client-Version=4.9.0.32&X-Emby-Token=xxxxxxxxxxxxxxxxx‌&X-Emby-Language=en-gb&reqformat=json. Source Ip: ‌‍‍::1‌, UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0
2024-11-25 11:18:45.579 Info TaskManager: Queueing task RefreshChannelsScheduledTask
2024-11-25 11:18:45.579 Info TaskManager: Executing Refresh Guide
2024-11-25 11:18:45.579 Info Server: http/1.1 Response 200 to ‌‍‍::1‌. Time: 17ms. POST http://‌‍‍localhost‌:8096/emby/LiveTv/TunerHosts?X-Emby-Client=Emby Web&X-Emby-Device-Name=Microsoft Edge Windows&X-Emby-Device-Id=5032d689-fc85-4247-8c35-3ea085ebb3eb&X-Emby-Client-Version=4.9.0.32&X-Emby-Token=xxxxxxxxxxxxxxxxxxx‌&X-Emby-Language=en-gb&reqformat=json

m3u file read (captured with procmon)

11:18:49.2923669	EmbyServer.exe	16908	ReadFile	<path to my-test-m3u.txt>	SUCCESS	Offset: 0, Length: 211
11:18:49.2944639	EmbyServer.exe	16908	ReadFile	<path to my-test-m3u.txt>	END OF FILE	Offset: 211, Length: 4,096
11:18:49.2974464	EmbyServer.exe	16908	CloseFile	<path to my-test-m3u.txt>	SUCCESS	


Emby Server Log

2024-11-25 11:18:49.300 Error LiveTvManager: Error getting channels
	*** Error Report ***
	Version: 4.9.0.32
	Command line: C:\Users\SA\AppData\Roaming\Emby-Server\system\EmbyServer.dll
	Operating system: Microsoft Windows 10.0.26100
	OS/Process: x64/x64
	Framework: .NET 8.0.11
	Runtime: C:/Users/SA/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
	Processor count: 22
	Data path: C:\Users\SA\AppData\Roaming\Emby-Server\programdata
	Application path: C:\Users\SA\AppData\Roaming\Emby-Server\system
	System.ArgumentNullException: System.ArgumentNullException: Value cannot be null. (Parameter 'first')
	   at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
	   at System.Linq.Enumerable.Concat[TSource](IEnumerable`1 first, IEnumerable`1 second)
	   at Emby.M3UTuner.M3uParser.GetChannelInfo(TunerHostInfo tuner, M3uProviderOptions providerOptions, M3UInfo info, String extInf, String tunerHostId, String mediaUrl)
	   at Emby.M3UTuner.M3uParser.GetM3UInfo(TunerHostInfo tuner, M3uProviderOptions providerOptions, TextReader reader, String playlistUrl, String channelIdPrefix, String tunerHostId)
	   at Emby.M3UTuner.M3uParser.Parse(TunerHostInfo tuner, String playlistUrl, String userAgent, String channelIdPrefix, String tunerHostId, M3uProviderOptions providerOptions, CancellationToken cancellationToken)
	   at Emby.M3UTuner.M3UTunerHost.GetChannelsInternal(TunerHostInfo tuner, CancellationToken cancellationToken)
	   at MediaBrowser.Controller.LiveTv.BaseTunerHost.RefreshChannels(TunerHostInfo host, CancellationToken cancellationToken)
	   at Emby.LiveTV.LiveTvManager.RefreshEmbyChannelsInternal(IProgress`1 progress, CancellationToken cancellationToken)
	Source: System.Linq
	TargetSite: Void ThrowArgumentNullException(System.Linq.ExceptionArgument)
	

 

Tested, no problem found. Can you try it again? here, for good measure:

Emby.M3UTuner.zip

Posted
2 hours ago, Luke said:

Tested, no problem found. Can you try it again? here, for good measure:

Thanks - worked ok with my 1 one channel test and I mapped the channel to a guide channel and all good. Thanks

On 23/11/2024 at 15:56, ak2k5 said:

New version tuner throws an exception on reading any playlist

Hi

Can you please try the updated Emby.M3UTuner dll above to check the fix for your group names

 

 

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...