Project

General

Profile

Actions

Bug #3281

closed

Use m3u-duration as channel number

Added by Adrien CLERC almost 10 years ago. Updated almost 10 years ago.

Status:
Fixed
Priority:
Normal
Category:
IPTV
Target version:
-
Start date:
2015-11-08
Due date:
% Done:

100%

Estimated time:
Found in version:
master
Affected Versions:

Description

With Freebox TV bouquet, the m3u is providing channel number using the m3u duration attribute:

#EXTINF:2,France 2 HD
rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=201&flavour=hd

This is non-standard, but since m3u-duration is already parsed by the new misc/m3u.c, could it be used by iptv_auto.c when creating channels?

Actions #1

Updated by Jaroslav Kysela almost 10 years ago

  • Category changed from Parsers to IPTV
Actions #2

Updated by Jaroslav Kysela almost 10 years ago

  • Assignee changed from Andreas Smas to Jaroslav Kysela
Actions #3

Updated by Jaroslav Kysela almost 10 years ago

The channel numbers ends with ? Is something else in the .m3u list which can identify this?

Actions #4

Updated by Jelly Frog almost 10 years ago

This or some other way to specify channel number in m3u would be nice.

Without knowing any C, wouldn't it work to do something like:

diff --git a/src/input/mpegts/iptv/iptv_auto.c b/src/input/mpegts/iptv/iptv_auto.c
index ff86d79..f289990 100644
--- a/src/input/mpegts/iptv/iptv_auto.c
+++ b/src/input/mpegts/iptv/iptv_auto.c
@@ -74,6 +74,8 @@ iptv_auto_network_process_m3u_item(iptv_network_t *in,
       chnum += *total;
     else
       chnum += (int64_t)*total * CHANNEL_SPLIT;
+  } else {
+    chnum = htsmsg_get_s64_or_default(item, "m3u-duration", 0);
   }

   name = htsmsg_get_str(item, "m3u-name");

Actions #5

Updated by Jaroslav Kysela almost 10 years ago

The source for duration is correct, but the above patch isn't. It won't allow to add a custom offset to the channel numbers. Perhaps, adding a string match for mafreebox.freebox.fr in URL might solve this. I would like to add rather a custom attribute line 'tvh_chnum' to the m3u parser, so users might create own lists with the correct information.

Actions #6

Updated by Adrien CLERC almost 10 years ago

Either a tvh_chnum, or an option in the IPTV auto network to parse m3u duration as channel number.
The second solution involves zero modification of the m3u. However, having a simple script that modifies the original m3u is not a real issue. This m3u is modified at most twice a year, so updating it is not an issue.

I think that having a special rule for some hosts (like mafreebox.freebox.fr) is not a good idea. Or at least, it shouldn't be hardcoded in C code.

Actions #7

Updated by Jaroslav Kysela almost 10 years ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

Applied in changeset commit:tvheadend|bafa61277c3a5ba7178bca05a2e2f702a013b246.

Actions #8

Updated by Jaroslav Kysela almost 10 years ago

Added tvh-chnum m3u attribute parsing in v4.1-960-gbafa612 .

Example:

#EXTINF:3 tvg-id="ct1" tvh-chnum=10.1,CT 1 HD

Note: The number after dot is minor part of the number (ATSC notation is also supported!).

Actions #9

Updated by Adrien CLERC almost 10 years ago

Thanks!

Actions #10

Updated by B C almost 10 years ago

this is not working for me, with this syntax I don't even get the Service name into tvh.
and would it be possible to tag the channel based on another parameter?

Actions #11

Updated by B C almost 10 years ago

ok, forgot putting tvh-chnum in "", so I have at least my names back. Still I cannot see any channel number

Actions #12

Updated by Jaroslav Kysela almost 10 years ago

The parsing without "" is fixed in v4.1-964-g7173bba . I see the channel number in the mux settings.

Actions #13

Updated by Jaroslav Kysela almost 10 years ago

Mapping works too. The IPTV channel numbers are not visible in the service grid.

Actions

Also available in: Atom PDF