Jump to content

m3u live tv parsing issue


sle118
 Share

Go to solution Solved by Luke,

Recommended Posts

I am trying to map OTA channels to xmltv, but I have run into an issue.  Some OTA channels have "programs" which appear as sub channels in the form of "chan.sub". It looks like emby isn't parsing them appropriately, which results in the inability to properly map them and get a guide.

 

here is the channel lineup 

#EXTM3U

#EXTINF:0, 2.1 - CBFT-DT
http://127.0.0.1:8866/live?channel=2.1

#EXTINF:0, 3.1 - WCAX-HD
http://127.0.0.1:8866/live?channel=3.1

#EXTINF:0, 3.2 - Movies!
http://127.0.0.1:8866/live?channel=3.2

#EXTINF:0, 5.1 - WPTZ-HD
http://127.0.0.1:8866/live?channel=5.1

#EXTINF:0, 5.2 - The CW
http://127.0.0.1:8866/live?channel=5.2

#EXTINF:0, 5.3 - Me TV
http://127.0.0.1:8866/live?channel=5.3

#EXTINF:0, 6.1 - CBMT-DT
http://127.0.0.1:8866/live?channel=6.1

#EXTINF:0, 10.1 - CFTM-HD
http://127.0.0.1:8866/live?channel=10.1

#EXTINF:0, 12.1 - CFCF
http://127.0.0.1:8866/live?channel=12.1

#EXTINF:0, 15.1 - CKMI-HD
http://127.0.0.1:8866/live?channel=15.1

#EXTINF:0, 15.2 - CKMI-SD
http://127.0.0.1:8866/live?channel=15.2

#EXTINF:0, 17.1 - CIVM-HD
http://127.0.0.1:8866/live?channel=17.1

#EXTINF:0, 33.1 - VPBS
http://127.0.0.1:8866/live?channel=33.1

#EXTINF:0, 33.2 - VPBS+
http://127.0.0.1:8866/live?channel=33.2

#EXTINF:0, 33.3 - CREATE
http://127.0.0.1:8866/live?channel=33.3

#EXTINF:0, 33.4 - WORLD
http://127.0.0.1:8866/live?channel=33.4

#EXTINF:0, 35.1 - CFJP-DT
http://127.0.0.1:8866/live?channel=35.1

#EXTINF:0, 62.1 - CJNT
http://127.0.0.1:8866/live?channel=62.1

Here is what emby saves from the channel list above. The "dot" in the channel name seems to be confusing emby.

[{"Path":"http://127.0.0.1:8866/live?channel=2.1","Name":"1 - CBFT-DT","Number":"2","Id":"m3u_dea7255e777eee9d4d44166ce1d332940980392c3a0b92576eb3f0b96e43fc48","TunerHostId":"a04c417156b94696aa15c6444cad95f1","ChannelType":"TV"},{"Path":"http://127.0.0.1:8866/live?channel=3.1","Name":"1 - WCAX-HD","Number":"3","Id":"m3u_dea7255e777eee9d4d44166ce1d332944ca8da5f32c1c52c1deb9a1a85786d18","TunerHostId":"a04c417156b94696aa15c6444cad95f1","ChannelType":"TV"},{"Path":"http://127.0.0.1:8866/live?channel=3.2","Name":"2 - Movies!","Number":"3","Id":"m3u_dea7255e777eee9d4d44166ce1d332945eb1665f9db7d5eec2dac807fa8f44c8","TunerHostId":"a04c417156b94696aa15c6444cad95f1","ChannelType":"TV"},{"Path":"http://127.0.0.1:8866/live?channel=5.1","Name":"1 - WPTZ-HD","Number":"5","Id":"m3u_dea7255e777eee9d4d44166ce1d33294ebff38859072ee80a7329dde5f4ff3f8","TunerHostId":"a04c417156b94696aa15c6444cad95f1","ChannelType":"TV"},{"Path":"http://127.0.0.1:8866/live?channel=5.2","Name":"2 - The CW","Number":"5","Id":"m3u_dea7255e777eee9d4d44166ce1d33294b7421088f6135b46d56f3da4c08a7f8d","TunerHostId":"a04c417156b94696aa15c6444cad95f1","ChannelType":"TV"},{"Path":"http://127.0.0.1:8866/live?channel=5.3","Name":"3 - Me TV","Number":"5","Id":"m3u_dea7255e777eee9d4d44166ce1d3329441623cfeb60e13f62082395bce199582","TunerHostId":"a04c417156b94696aa15c6444cad95f1","ChannelType":"TV"},{"Path":"http://127.0.0.1:8866/live?channel=6.1","Name":"1 - CBMT-DT","Number":"6","Id":"m3u_dea7255e777eee9d4d44166ce1d33294b7bdd5c9f6cbbf61b04cf4f55676bed6","TunerHostId":"a04c417156b94696aa15c6444cad95f1","ChannelType":"TV"},{"Path":"http://127.0.0.1:8866/live?channel=10.1","Name":"1 - CFTM-HD","Number":"10","Id":"m3u_dea7255e777eee9d4d44166ce1d332945c67dd02e1a4a027df4b30121ec0451c","TunerHostId":"a04c417156b94696aa15c6444cad95f1","ChannelType":"TV"},{"Path":"http://127.0.0.1:8866/live?channel=12.1","Name":"1 - CFCF","Number":"12","Id":"m3u_dea7255e777eee9d4d44166ce1d33294be695774f787259674cbea7a8ff2bbbe","TunerHostId":"a04c417156b94696aa15c6444cad95f1","ChannelType":"TV"},{"Path":"http://127.0.0.1:8866/live?channel=15.1","Name":"1 - CKMI-HD","Number":"15","Id":"m3u_dea7255e777eee9d4d44166ce1d3329438e2653b45fc405804593fd18c554460","TunerHostId":"a04c417156b94696aa15c6444cad95f1","ChannelType":"TV"},{"Path":"http://127.0.0.1:8866/live?channel=15.2","Name":"2 - CKMI-SD","Number":"15","Id":"m3u_dea7255e777eee9d4d44166ce1d33294fb35ae1162365669ab5d334c0c02d959","TunerHostId":"a04c417156b94696aa15c6444cad95f1","ChannelType":"TV"},{"Path":"http://127.0.0.1:8866/live?channel=17.1","Name":"1 - CIVM-HD","Number":"17","Id":"m3u_dea7255e777eee9d4d44166ce1d3329477454ce79032a04f90ab0eda6db1d629","TunerHostId":"a04c417156b94696aa15c6444cad95f1","ChannelType":"TV"},{"Path":"http://127.0.0.1:8866/live?channel=33.1","Name":"1 - VPBS","Number":"33","Id":"m3u_dea7255e777eee9d4d44166ce1d33294aa3dfabd22a6ac028fa785a662e899d1","TunerHostId":"a04c417156b94696aa15c6444cad95f1","ChannelType":"TV"},{"Path":"http://127.0.0.1:8866/live?channel=33.2","Name":"2 - VPBS+","Number":"33","Id":"m3u_dea7255e777eee9d4d44166ce1d33294ecf92907cac351d282381b4ddf0dc6e5","TunerHostId":"a04c417156b94696aa15c6444cad95f1","ChannelType":"TV"},{"Path":"http://127.0.0.1:8866/live?channel=33.3","Name":"3 - CREATE","Number":"33","Id":"m3u_dea7255e777eee9d4d44166ce1d332944e09e012c6c692b8ab385537a2632fd9","TunerHostId":"a04c417156b94696aa15c6444cad95f1","ChannelType":"TV"},{"Path":"http://127.0.0.1:8866/live?channel=33.4","Name":"4 - WORLD","Number":"33","Id":"m3u_dea7255e777eee9d4d44166ce1d3329457d539880c8aa6df1f5a0e9f52c6ecf9","TunerHostId":"a04c417156b94696aa15c6444cad95f1","ChannelType":"TV"},{"Path":"http://127.0.0.1:8866/live?channel=35.1","Name":"1 - CFJP-DT","Number":"35","Id":"m3u_dea7255e777eee9d4d44166ce1d332943bfda69f82fcc0b23166f614b1f29c2d","TunerHostId":"a04c417156b94696aa15c6444cad95f1","ChannelType":"TV"},{"Path":"http://127.0.0.1:8866/live?channel=62.1","Name":"1 - CJNT","Number":"62","Id":"m3u_dea7255e777eee9d4d44166ce1d332945b2fb9afa7fad61d64fe4f3065000cd1","TunerHostId":"a04c417156b94696aa15c6444cad95f1","ChannelType":"TV"}]

Here is the channel map from the xmltv file

	<channel id="I3.1.40446487.microsoft.com">
		<display-name>WCAXHD</display-name>
		<display-name>3.1 WCAXHD</display-name>
		<display-name>3.1</display-name>
		<display-name>22 WCAXHD fcc</display-name>
		<display-name>WCAX HDTV</display-name>
		<display-name>CBS</display-name>
	</channel>
	<channel id="I3.2.309138867.microsoft.com">
		<display-name>MOVIE</display-name>
		<display-name>3.2 MOVIE</display-name>
		<display-name>3.2</display-name>
		<display-name>22 MOVIE fcc</display-name>
		<display-name>WCAX Movies!</display-name>
		<display-name>MOVIES!</display-name>
	</channel>

So initially, mapping channel 3.1 results in persisting the map to "channel 3" as shown in the log

2017-01-09 10:16:57.5374 Debug App: Getting programs for channel 3-1 - WCAX-HD from XmlTV-
2017-01-09 10:16:57.5374 Debug App: Found mapped channel on provider XmlTV. Tuner channel number: 3, Mapped channel number: I3.2.309138867.microsoft.com
 
but then, mapping channel 3.2 ends up also saving under channel 3
2017-01-09 10:16:54.8902 Debug App: Getting programs for channel 3-2 - Movies! from XmlTV-
2017-01-09 10:16:54.8902 Debug App: Found mapped channel on provider XmlTV. Tuner channel number: 3, Mapped channel number: I3.1.40446487.microsoft.com
2017-01-09 10:16:54.8902 Info App: xmltv path: C:\EPG\guide.xml
 
Since the channel list is wrong in emby, the server sends bad data to the mapping app (running in the browser), which in turns sends bad requests for mapping channels.  
providerId=231458263a304cb5918a21865470e182&tunerChannelNumber=3&providerChannelNumber=I3.1.40446487.microsoft.com
 
Thank you for the help!
 

 

 

Link to comment
Share on other sites

@@sle118, what is an example of the sub channel?

Any channel with "." in the channel number is a sub channel.

 

i.e. from my example, WCAXHD and MOVIE are both channel 3, with 2 sub channels. This is how broadcasters can use a single channel's original analog bandwidth and transmit more than a single program.

 

WCAXHD = channel 3 sub channel 1 

MOVIE = channel 3 sub channel 2

 

to simplify, I think emby should just treat these as channel 3.1 and channel 3.2 instead of dropping the suffix as it does now. 

 

I traced the issue to when the channels are initially imported from the m3u source and settings are saved in the value pairs inside the livetv.xml.  This is the result in the livetv.xml

<NameValuePair>
   <Name>3</Name>
   <Value>I3.1.40446487.microsoft.com</Value>
</NameValuePair>
Link to comment
Share on other sites

@@sle118, what is an example of the sub channel?

 

@@Luke, Here is how the system should save mappings:

 

 

m3u file content pulled from channel url 

#EXTINF:0, 3.1 - WCAX-HD
http://127.0.0.1:8866/live?channel=3.1

#EXTINF:0, 3.2 - Movies!
http://127.0.0.1:8866/live?channel=3.2

channel map saves livetv.xml

   <ChannelMappings>        <NameValuePair>
          <Name>3.1</Name>
          <Value>I3.1.40446487.microsoft.com</Value>
        </NameValuePair>
        <NameValuePair>
          <Name>3.2</Name>
          <Value>I3.2.309138867.microsoft.com</Value>
        </NameValuePair>
      </ChannelMappings>
Edited by sle118
Link to comment
Share on other sites

Since this is killing my ability to record shows, I'm keeping the thread alive and on the first page in hope for a resolution.

 

Thanks!

Link to comment
Share on other sites

@@Luke, I found that the issue is generalized.

 

This is what the channel map looks like in Emby (running on windows 7/chrome)

 

5877a0b046735_chrome_20170112_102419.png

 

And this is the resulting guide... 

 

 

5877a0e4c31c9_chrome_20170112_102445.png

 

FYI, I had installed the dev version a few weeks back when trying to troubleshoot my issue with interlaced files.

Link to comment
Share on other sites

@@Luke, I have created a PR for this issue, affecting the M3U number and name parser functions. Please consider it for merging.

https://github.com/MediaBrowser/Emby/pull/2395

 

Once this patch is applied, and because emby keeps channel definitions in cache (with the wrong names), I had to:

- Delete the xmltv provider

- Delete the live tv tuner

- Run the database cleanup

- Restart the server

- Add the tuner

- Add the listing provider

- Map the channels

 

Channel mapping allows correct mapping now.

nVn06th.png

 

and the guide is perfect!

Y07Lpwp.png

Edited by sle118
Link to comment
Share on other sites

  • 2 months later...
sle118

These are exactly the channels I have been looking for. Will someone help me to load them into emby on my OttTV Box?

You might want to explain what an OttTv Box is actually and what you mean by "load them into emby". Are you referring to the guide data or to the actual channels? Do you have a tuner?

Link to comment
Share on other sites

I have an MQPro android. I have installed Emby on it. I was looking at the list above and they are the channels I want. I have no clue of how to get them to play on Emby. I guess there is more to this than loading an m3u file :( 

 

@@Luke, I have created a PR for this issue, affecting the M3U number and name parser functions. Please consider it for merging.

https://github.com/MediaBrowser/Emby/pull/2395

 

Once this patch is applied, and because emby keeps channel definitions in cache (with the wrong names), I had to:

- Delete the xmltv provider

- Delete the live tv tuner

- Run the database cleanup

- Restart the server

- Add the tuner

- Add the listing provider

- Map the channels

 

Channel mapping allows correct mapping now.

nVn06th.png

 

and the guide is perfect!

Y07Lpwp.png

Link to comment
Share on other sites

sle118

I have an MQPro android. I have installed Emby on it. I was looking at the list above and they are the channels I want. I have no clue of how to get them to play on Emby. I guess there is more to this than loading an m3u file :(

You are correct. If you live in the Montreal region, you first need to acquire some hardware. Here is my setup

- SiliconDust HDHomeRun (check Amazon or your favorite online retailer). I originally bought mine in a Costco while in California

- An attic antenna (Channel Master CM 4228HD ) which I oriented using data from http://www.tvfool.com/

- A fast ethernet network switch to which Emby and the SiliconDust tuners are both connected

- A paid subscription schedules direct subscription to get listings

- A Premium Emby license (which I recommend)

 

This is what I get:

- Get a full fledged TV guide

- Schedule recordings

- Record over the air broadcasts from these TV stations in mp4 (the original encoding is mpeg2, which takes up quite some space)

- Synchronize the recordings on my tablet for the occasional plane trip

- Watch local tv shows recorded in Emby when I am travelling (I have a fast upstream connection from a trusty cable provider)

Link to comment
Share on other sites

Oh my!! ok. Wow, guess its not what I had wanted to get into...lol I go so excited to see all my channels I never looked further than that. 

Ive been looking for m3u / .ts links and have only found one. :( Thank you so much for your help I do appreciate it...

Link to comment
Share on other sites

sle118

Fyi, there is a tou.tv plugin available in emby, this is a beginning. Videotron offers online viewing options for many channels too.

 

If you decide to go down the rabbit hole, I might be able to guide you in the journey. I've been playing with time/place shifting technology for 17+ years now, from the bleading edge ATI tuners (with the most unstable drivers, anyone familiar will immediately relate and share experiences) running an early DVR product which I completely forgot the name, to what I consider being more and more mainstream with emby.

 

Getting a rig up and running isn't that difficult, but running one isn't yet as effortless as paying for a proper cable box.

  • Like 1
Link to comment
Share on other sites

I do love the adventure after following the rabbit. Im trying to find my VT locals without an antennae. I cant install one here. no debate. tried everything, no go. SO Im trying to find them via IPTV thru my android box. When I did the search for these this came up with all my channels listed and I got excited! I dont want to pay much tho..

Link to comment
Share on other sites

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
 Share

×
×
  • Create New...