Git Product home page Git Product logo

mirakc's Introduction

mirakc

A Mirakurun-compatible PVR backend written in Rust

ci coverage alpine-size debian-size

Features

  • Mirakurun-compatible REST API
    • Enough to work with applications such as EPGStation
  • Standalone recording
    • No need to install additional applications anymore
  • On-air time tracking
    • No need to worry about recording failures anymore
  • Timeshift recording
    • No need to add recording schedules anymore

Quick Start

If you already have a TV recording system built with Mirakurun and EPGStation, you can simply replace Mirakurun with mirakc.

It's recommended to use a Docker image which can be downloaded from Docker Hub. See docs/docker.md about how to make a custom Docker image for your environment.

Launch a mirakc Docker container

Create config.yml:

epg:
  cache-dir: /var/lib/mirakc/epg

server:
  addrs:
    - http: '0.0.0.0:40772'

channels:
  # Add channels of interest.
  - name: NHK
    type: GR
    channel: '27'

tuners:
  # Add tuners available on a local machine.
  - name: Tuner0
    types: [GR]
    command: >-
      recpt1 --device /dev/px4video2 {{{channel}}} - -

filters:
  # Optionally, you can specify a command to process TS packets before sending
  # them to a client.
  #
  # The following command processes TS packets on a remote server listening on
  # TCP port 40774.
  decode-filter:
    command: >-
      socat -,cool-write tcp-connect:remote:40774

Create compose.yaml:

services:
  mirakc:
    image: docker.io/mirakc/mirakc:alpine
    container_name: mirakc
    init: true
    restart: unless-stopped
    devices:
      # Add device files used in `tuners[].command`.
      - /dev/px4video2
    ports:
      - 40772:40772
    volumes:
      - mirakc-epg:/var/lib/mirakc/epg
      - ./config.yml:/etc/mirakc/config.yml:ro
    environment:
      TZ: Asia/Tokyo
      RUST_LOG: info

volumes:
  mirakc-epg:
    name: mirakc_epg
    driver: local

And then launch a mirakc container:

docker compose up

You can also launch a mirakc container by using other tools like podman and podman-compose which support Docker-compatible images and compose.yaml:

podman-compose up

You should see the version string when running the following command if the mirakc starts properly:

$ curl -fsSL http://localhost:40772/api/version
{"current":"<version-string>","latest":"<version-string>"}

See docs/config.md for details of config.yml.

Motivation

In these days, you can build a TV recording system by yourself, using a SBC (single-board computer) and OSS (open-source software).

Usually, SBCs are low power consumption. For this reason, SBCs are suitable for systems which works all the time. On the other hand, SBCs are not so powerful unlike PCs in these days. Typically, a SBC have a multi-core CPU with low clock of less than 2GHz, and only 1..4GB memory.

Mirakurun is one of popular DTV tuner servers in Japan. It's fast enough, but consumes much memory. For example, it consumes more than 150MB even when idle.

When Mirakurun provides 8 TS streams simultaneously, it consumes nearly 1GB of memory which includes memory consumption of descendant processes. As a result, some of processes which was spawned by tuner commands will be killed in minutes if Mirakurun is executed on a machine like ROCK64 (DRAM: 1GB) which doesn't have enough memory.

mirakc is more efficient than Mirakurun. It can provide at least 8 TS streams at the same time even on ROCK64 (DRAM: 1GB).

Performance Comparison

After running for 1 day

The following table is a snippet from the result of docker stats at idle after running for 1 day on Raspberry Pi 4B (DRAM: 4GB):

NAME           MEM USAGE / LIMIT    MEM %  NET I/O          BLOCK I/O
mirakc-alpine  19.5MiB / 3.704GiB   0.51%  7.45GB / 38.3MB  246kB / 15.6MB
mirakc-debian  26.47MiB / 3.704GiB  0.70%  7.49GB / 34.6MB  221kB / 15.6MB
mirakurun      123.6MiB / 3.704GiB  3.26%  61.3GB / 290MB   83.5MB / 1.36GB

The environment variable MALLOC_ARENA_MAX=2 is specified in containers.

The mirakurun container installed a few packages at the start time. That increased the amount of I/O data but it seems to be less than several GB.

8 TS streams at the same time

mirakc is lower CPU usage and 75% smaller memory consumption than Mirakurun:

mirakc/2.0.0 (Alpine) mirakc/2.0.0 (Debian) Mirakurun/3.9.0-rc.2
CPU +26..28% +26..28% +32..36%
Memory +26..27MB +26..27MB +112MB..121MB
Load1 +0.59..1.81 +0.64..1.57 +0.91..1.79
TX +155..155Mbps +155..155Mbps +154..155Mbps

where + means that the value is an amount of increase from its stationary value.

See mirakc/performance-measurements about how to collect the performance metrics.

Limitations

  • CS and SKY channel types are not tested at all
    • In addition, no pay-TV channels are tested because I have no subscription for pay-TV
  • mirakc doesn't work with BonDriver_Mirakurun

TODO

  • Use multiple tuners in the EPG task in order to reduce the execution time
    • Currently, it takes about 40 minutes for collecting EIT sections of 12 GR services and 12 BS services

Acknowledgments

mirakc is implemented based on knowledge gained from the following software implementations:

License

Licensed under either of

at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

mirakc's People

Contributors

dependabot[bot] avatar github-actions[bot] avatar kazuki0824 avatar koron393 avatar masnagam avatar masnagam-github-actions avatar revelation1048 avatar stu2005 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mirakc's Issues

Collect statistics

  • Collect statistics information from mirakc and procfs
  • Implement /api/status compatible with Mirakurun as possible
  • Provide /metrics for Prometheus

0.17.0 で 情報が取れない service がある

現象

RPi4でDockerを使って運用しています。
mirakc 0.17.0 にバージョンアップしたところ、情報が取れない serviceが出てきました。
それまで使っていた master-alpine("Created": "2021-03-08T09:55:58.893166967Z") や 0.16.1-alpine では発生しません。

環境

  • Raspberry Pi 4B (Ubuntu 20.04 64bit)
  • PX-W3U4 (Driver: px4_drv)
  • mirakc 0.17.0 (DockerImage: mirakc/mirakc:0.17.0-alpine, mirakc/mirakc:0.17.0-debian どちらも)

再現

放送が休止されていない時間帯に、以下のような config.yml で動かしてみます。

server:
  addrs:
    - http: 0.0.0.0:40772

epg:
  cache-dir: /var/lib/mirakc/epg

tuners:
  - name: PX-W3U4_S1
    types: [BS, CS]
    command: recpt1 --device /dev/px4video0 --lnb 15 {{channel}} {{duration}} -
  
  - name: PX-W3U4_S2
    types: [BS, CS]
    command: recpt1 --device /dev/px4video1 --lnb 15 {{channel}} {{duration}} -
  
  - name: PX-W3U4_T1
    types: [GR]
    command: recpt1 --device /dev/px4video2 {{channel}} {{duration}} -
  
  - name: PX-W3U4_T2
    types: [GR]
    command: recpt1 --device /dev/px4video3 {{channel}} {{duration}} -

channels:
  - name: NHK総合1・東京
    type: GR
    channel: '27'

  - name: NHKEテレ1東京
    type: GR
    channel: '26'

  - name: 日テレ1
    type: GR
    channel: '25'

  - name: TBS1
    type: GR
    channel: '22'

  - name: フジテレビ
    type: GR
    channel: '21'

  - name: テレビ朝日
    type: GR
    channel: '24'

  - name: テレビ東京1
    type: GR
    channel: '23'

  - name: NHKBS1
    type: BS
    channel: BS15_0
    services: [101]

  - name: NHKBSプレミアム
    type: BS
    channel: BS3_1
    services: [103]

  - name: BS日テレ
    type: BS
    channel: BS13_0
    services: [141]

  - name: BS朝日1
    type: BS
    channel: BS1_0
    services: [151]

  - name: BS-TBS
    type: BS
    channel: BS1_1
    services: [161]

  - name: BSテレ東
    type: BS
    channel: BS1_2
    services: [171]

  - name: BSフジ・181
    type: BS
    channel: BS13_1
    services: [181]

WARNなログ

2021-03-28T13:01:45.964332770+09:00  WARN mirakc_core::epg: Failed to load services: std::io::error: No such file or directory (os error 2)
2021-03-28T13:01:45.964403047+09:00  WARN mirakc_core::epg: Failed to load clocks: std::io::error: No such file or directory (os error 2)
2021-03-28T13:01:45.964464157+09:00  WARN mirakc_core::epg: Failed to load schedules: std::io::error: No such file or directory (os error 2)
2021-03-28T13:01:47.100031051+09:00  WARN mirakc_core::service_scanner: Failed to scan services in NHKEテレ1東京: No service, maybe out of service
2021-03-28T13:01:49.371658075+09:00  WARN mirakc_core::service_scanner: Failed to scan services in TBS1: No service, maybe out of service
2021-03-28T13:01:52.081960573+09:00  WARN mirakc_core::service_scanner: Failed to scan services in テレビ朝日: No service, maybe out of service
2021-03-28T13:02:08.769480165+09:00  WARN mirakc_core::service_scanner: Failed to scan services in NHKBSプレミアム: No service, maybe out of service
2021-03-28T13:02:11.947850457+09:00  WARN mirakc_core::service_scanner: Failed to scan services in BS朝日1: No service, maybe out of service
2021-03-28T13:02:15.060044592+09:00  WARN mirakc_core::service_scanner: Failed to scan services in BSテレ東: No service, maybe out of service
2021-03-28T13:02:30.486928152+09:00  WARN mirakc_core::clock_synchronizer: Failed to synchronize clocks in NHKEテレ1東京: No clock, maybe out of service
2021-03-28T13:02:34.756757255+09:00  WARN mirakc_core::clock_synchronizer: Failed to synchronize clocks in TBS1: No clock, maybe out of service
2021-03-28T13:02:39.420670676+09:00  WARN mirakc_core::clock_synchronizer: Failed to synchronize clocks in テレビ朝日: No clock, maybe out of service
2021-03-28T13:02:48.665164522+09:00  WARN mirakc_core::clock_synchronizer: Failed to synchronize clocks in NHKBSプレミアム: No clock, maybe out of service
2021-03-28T13:02:51.190608413+09:00  WARN mirakc_core::clock_synchronizer: Failed to synchronize clocks in BS朝日1: No clock, maybe out of service
2021-03-28T13:02:57.688478742+09:00  WARN mirakc_core::clock_synchronizer: Failed to synchronize clocks in BSテレ東: No clock, maybe out of service

Scanning servicesの開始からNHKEテレ1東京がFailedするまでのログ

2021-03-28T13:01:45.974558497+09:00 DEBUG mirakc_core::service_scanner: Scanning services...
2021-03-28T13:01:45.974574478+09:00 DEBUG mirakc_core::service_scanner: Scanning services in NHK総合1・東京...
2021-03-28T13:01:45.974613663+09:00 DEBUG mirakc_core::job: sync-clocks: acquiring semaphore...
2021-03-28T13:01:45.974638699+09:00 DEBUG mirakc_core::job: update-schedules: acquiring semaphore...
2021-03-28T13:01:45.974691458+09:00 DEBUG mirakc_core::tuner: StartStreaming GR/27 to Job(service-scanner) (priority=-1)
2021-03-28T13:01:45.974728476+09:00  INFO mirakc_core::tuner: tuner#2: Activate for GR/27
2021-03-28T13:01:45.975807576+09:00 DEBUG mirakc_core::command_util: tuner#2.0: Spawned 13: `recpt1 --device /dev/px4video2 27 - -`
2021-03-28T13:01:45.976062574+09:00  INFO mirakc_core::tuner: tuner#2.0: Activated with GR/27
2021-03-28T13:01:45.976225220+09:00  INFO mirakc_core::tuner: tuner#2.0.1: Subscribed: Job(service-scanner) (priority=-1)
2021-03-28T13:01:45.976348663+09:00 DEBUG mirakc_core::broadcaster: tuner#2.0: Started
2021-03-28T13:01:45.976438070+09:00 DEBUG mirakc_core::broadcaster: Subscribe with tuner#2.0.1
2021-03-28T13:01:45.976543365+09:00  INFO mirakc_core::tuner: tuner#2.0.1: Started streaming
2021-03-28T13:01:45.978342809+09:00 DEBUG mirakc_core::command_util: tuner#2.0.1: Spawned 14: `mirakc-arib scan-services`
2021-03-28T13:01:45.978593844+09:00 DEBUG mirakc_core::command_util: recpt1#13: using device: /dev/px4video2
2021-03-28T13:01:45.978638306+09:00 DEBUG mirakc_core::command_util: recpt1#13: pid = 13
2021-03-28T13:01:45.986690630+09:00 DEBUG mirakc_core::command_util: mirakc-arib#14: [scan-services] [info] Read packets from STDIN...
2021-03-28T13:01:45.986767907+09:00 DEBUG mirakc_core::command_util: mirakc-arib#14: [scan-services] [info] --sids SIDs:
2021-03-28T13:01:45.986788221+09:00 DEBUG mirakc_core::command_util: mirakc-arib#14: [scan-services] [info] --xsids SIDs:
2021-03-28T13:01:45.986805684+09:00 DEBUG mirakc_core::command_util: mirakc-arib#14: [scan-services] [info] Feed packets...
2021-03-28T13:01:46.993026016+09:00 DEBUG mirakc_core::command_util: recpt1#13: device = /dev/px4video2
2021-03-28T13:01:47.010841682+09:00 DEBUG mirakc_core::command_util: recpt1#13: C/N = 32.400130dB
2021-03-28T13:01:47.010909663+09:00 DEBUG mirakc_core::command_util: recpt1#13: Recording...
2021-03-28T13:01:47.080582476+09:00 DEBUG mirakc_core::command_util: mirakc-arib#14: [scan-services] [info] PAT ready
2021-03-28T13:01:47.080670975+09:00 DEBUG mirakc_core::command_util: mirakc-arib#14: [scan-services] [info] SDT ready
2021-03-28T13:01:47.082015276+09:00 DEBUG mirakc_core::command_util: mirakc-arib#14: [scan-services] [info] NIT ready
2021-03-28T13:01:47.082097293+09:00 DEBUG mirakc_core::command_util: mirakc-arib#14: [scan-services] [info] Ready to collect services
2021-03-28T13:01:47.082130182+09:00 DEBUG mirakc_core::command_util: mirakc-arib#14: [scan-services] [info] Ended to feed packets successfully
2021-03-28T13:01:47.083551260+09:00 DEBUG mirakc_core::tuner: tuner#2.0.1: Closing...
2021-03-28T13:01:47.083640018+09:00 DEBUG mirakc_core::command_util: tuner#2.0.1: Kill 14: `mirakc-arib scan-services`
2021-03-28T13:01:47.083775294+09:00 DEBUG mirakc_core::tuner: StopStreaming tuner#2.0.1
2021-03-28T13:01:47.083821738+09:00  INFO mirakc_core::tuner: tuner#2.0.1: Stop streaming
2021-03-28T13:01:47.083855275+09:00  INFO mirakc_core::tuner: tuner#2.0.1: Unsubscribed: Job(service-scanner) (priority=-1)
2021-03-28T13:01:47.083889423+09:00  INFO mirakc_core::tuner: tuner#2.0: Deactivated
2021-03-28T13:01:47.083917571+09:00 DEBUG mirakc_core::command_util: tuner#2.0: Kill 13: `recpt1 --device /dev/px4video2 27 - -`
2021-03-28T13:01:47.084014866+09:00 DEBUG mirakc_core::broadcaster: Unsubscribe with tuner#2.0.1
2021-03-28T13:01:47.084074606+09:00 DEBUG mirakc_core::broadcaster: tuner#2.0: EOS reached, stop
2021-03-28T13:01:47.084140624+09:00 DEBUG mirakc_core::broadcaster: tuner#2.0: Stopped
2021-03-28T13:01:47.084249993+09:00 DEBUG mirakc_core::mpeg_ts_stream: tuner#2.0.1: EOF reached
2021-03-28T13:01:47.084433621+09:00 DEBUG mirakc_core::service_scanner: Found 2 services in NHK総合1・東京
2021-03-28T13:01:47.084689192+09:00 DEBUG mirakc_core::service_scanner: Scanning services in NHKEテレ1東京...
2021-03-28T13:01:47.084805191+09:00 DEBUG mirakc_core::tuner: StartStreaming GR/26 to Job(service-scanner) (priority=-1)
2021-03-28T13:01:47.084841820+09:00  INFO mirakc_core::tuner: tuner#2: Activate for GR/26
2021-03-28T13:01:47.086055382+09:00 DEBUG mirakc_core::command_util: tuner#2.1: Spawned 18: `recpt1 --device /dev/px4video2 26 - -`
2021-03-28T13:01:47.086705227+09:00  INFO mirakc_core::tuner: tuner#2.1: Activated with GR/26
2021-03-28T13:01:47.086934928+09:00  INFO mirakc_core::tuner: tuner#2.1.1: Subscribed: Job(service-scanner) (priority=-1)
2021-03-28T13:01:47.087182907+09:00 DEBUG mirakc_core::broadcaster: tuner#2.1: Started
2021-03-28T13:01:47.087288647+09:00 DEBUG mirakc_core::broadcaster: Subscribe with tuner#2.1.1
2021-03-28T13:01:47.087360331+09:00  INFO mirakc_core::tuner: tuner#2.1.1: Started streaming
2021-03-28T13:01:47.089229682+09:00 DEBUG mirakc_core::command_util: tuner#2.1.1: Spawned 19: `mirakc-arib scan-services`
2021-03-28T13:01:47.089720751+09:00 DEBUG mirakc_core::broadcaster: tuner#2.1: EOS reached, stop
2021-03-28T13:01:47.090031952+09:00 DEBUG mirakc_core::broadcaster: tuner#2.1: Stopped
2021-03-28T13:01:47.090254708+09:00 DEBUG mirakc_core::command_util: recpt1#18: using device: /dev/px4video2
2021-03-28T13:01:47.090507872+09:00 DEBUG mirakc_core::command_util: recpt1#18: pid = 18
2021-03-28T13:01:47.091202236+09:00 DEBUG mirakc_core::command_util: recpt1#18: Cannot open tuner device: /dev/px4video2
2021-03-28T13:01:47.091605398+09:00 DEBUG mirakc_core::mpeg_ts_stream: tuner#2.1.1: EOF reached
2021-03-28T13:01:47.098419012+09:00 DEBUG mirakc_core::command_util: mirakc-arib#19: [scan-services] [info] Read packets from STDIN...
2021-03-28T13:01:47.098485382+09:00 DEBUG mirakc_core::command_util: mirakc-arib#19: [scan-services] [info] --sids SIDs:
2021-03-28T13:01:47.098505400+09:00 DEBUG mirakc_core::command_util: mirakc-arib#19: [scan-services] [info] --xsids SIDs:
2021-03-28T13:01:47.098522863+09:00 DEBUG mirakc_core::command_util: mirakc-arib#19: [scan-services] [info] Feed packets...
2021-03-28T13:01:47.098540030+09:00 DEBUG mirakc_core::command_util: mirakc-arib#19: [scan-services] [info] EOF reached
2021-03-28T13:01:47.098556900+09:00 DEBUG mirakc_core::command_util: mirakc-arib#19: [scan-services] [info] Ended to feed packets unsuccessfully
2021-03-28T13:01:47.099680036+09:00 DEBUG mirakc_core::tuner: tuner#2.1.1: Closing...
2021-03-28T13:01:47.099870238+09:00 DEBUG mirakc_core::command_util: tuner#2.1.1: Kill 19: `mirakc-arib scan-services`
2021-03-28T13:01:47.100031051+09:00  WARN mirakc_core::service_scanner: Failed to scan services in NHKEテレ1東京: No service, maybe out of service

Synchronizing clocksの開始からNHKEテレ1東京がFailedするまでのログ

2021-03-28T13:02:25.142283469+09:00 DEBUG mirakc_core::clock_synchronizer: Synchronizing clocks...
2021-03-28T13:02:25.142369802+09:00 DEBUG mirakc_core::clock_synchronizer: Synchronizing clocks in NHK総合1・東京...
2021-03-28T13:02:25.142435450+09:00 DEBUG mirakc_core::tuner: StartStreaming GR/27 to Job(clock-synchronizer) (priority=-1)
2021-03-28T13:02:25.142450320+09:00 DEBUG mirakc_core::epg: Saving services into /var/lib/mirakc/epg/services.json...
2021-03-28T13:02:25.142476079+09:00  INFO mirakc_core::tuner: tuner#2: Activate for GR/27
2021-03-28T13:02:25.143511851+09:00  INFO mirakc_core::epg: Saved 14 services
2021-03-28T13:02:25.151314102+09:00 DEBUG mirakc_core::command_util: tuner#2.14: Spawned 65: `recpt1 --device /dev/px4video2 27 - -`
2021-03-28T13:02:25.151438065+09:00  INFO mirakc_core::tuner: tuner#2.14: Activated with GR/27
2021-03-28T13:02:25.151474953+09:00  INFO mirakc_core::tuner: tuner#2.14.1: Subscribed: Job(clock-synchronizer) (priority=-1)
2021-03-28T13:02:25.151553953+09:00 DEBUG mirakc_core::broadcaster: tuner#2.14: Started
2021-03-28T13:02:25.151586786+09:00 DEBUG mirakc_core::broadcaster: Subscribe with tuner#2.14.1
2021-03-28T13:02:25.151647656+09:00  INFO mirakc_core::tuner: tuner#2.14.1: Started streaming
2021-03-28T13:02:25.153041796+09:00 DEBUG mirakc_core::command_util: tuner#2.14.1: Spawned 66: `mirakc-arib sync-clocks`
2021-03-28T13:02:25.153138907+09:00 DEBUG mirakc_core::timeshift: NotifyServicesUpdated
2021-03-28T13:02:25.153284758+09:00 DEBUG mirakc_core::command_util: recpt1#65: using device: /dev/px4video2
2021-03-28T13:02:25.153315720+09:00 DEBUG mirakc_core::command_util: recpt1#65: pid = 65
2021-03-28T13:02:25.162015078+09:00 DEBUG mirakc_core::command_util: mirakc-arib#66: [sync-clocks] [info] Read packets from STDIN...
2021-03-28T13:02:25.162091688+09:00 DEBUG mirakc_core::command_util: mirakc-arib#66: [sync-clocks] [info] --sids SIDs:
2021-03-28T13:02:25.162113799+09:00 DEBUG mirakc_core::command_util: mirakc-arib#66: [sync-clocks] [info] --xsids SIDs:
2021-03-28T13:02:25.162132262+09:00 DEBUG mirakc_core::command_util: mirakc-arib#66: [sync-clocks] [info] Feed packets...
2021-03-28T13:02:25.904878965+09:00 DEBUG mirakc_core::command_util: recpt1#65: device = /dev/px4video2
2021-03-28T13:02:25.922329568+09:00 DEBUG mirakc_core::command_util: recpt1#65: C/N = 31.766095dB
2021-03-28T13:02:25.922409790+09:00 DEBUG mirakc_core::command_util: recpt1#65: Recording...
2021-03-28T13:02:26.062719833+09:00 DEBUG mirakc_core::command_util: mirakc-arib#66: [sync-clocks] [debug] Demux SDT
2021-03-28T13:02:27.058135497+09:00 DEBUG mirakc_core::command_util: mirakc-arib#66: [sync-clocks] [debug] Demux PMT#01F0 for SID#0400 ServiceType(01)
2021-03-28T13:02:27.058221200+09:00 DEBUG mirakc_core::command_util: mirakc-arib#66: [sync-clocks] [debug] Demux PMT#03F0 for SID#0401 ServiceType(01)
2021-03-28T13:02:27.129437585+09:00 DEBUG mirakc_core::command_util: mirakc-arib#66: [sync-clocks] [debug] PCR#01FF for SID#0400
2021-03-28T13:02:27.129557584+09:00 DEBUG mirakc_core::command_util: mirakc-arib#66: [sync-clocks] [debug] PCR#01FF for SID#0401
2021-03-28T13:02:27.129583325+09:00 DEBUG mirakc_core::command_util: mirakc-arib#66: [sync-clocks] [debug] Demux TDT/TOT
2021-03-28T13:02:30.399681344+09:00 DEBUG mirakc_core::command_util: mirakc-arib#66: [sync-clocks] [info] Time: 2021/03/28 13:02:31.000
2021-03-28T13:02:30.469046201+09:00 DEBUG mirakc_core::command_util: mirakc-arib#66: [sync-clocks] [info] PCR#01FF: 5854968343+090
2021-03-28T13:02:30.469124182+09:00 DEBUG mirakc_core::command_util: mirakc-arib#66: [sync-clocks] [info] Ended to feed packets successfully
2021-03-28T13:02:30.470372489+09:00 DEBUG mirakc_core::tuner: tuner#2.14.1: Closing...
2021-03-28T13:02:30.470446359+09:00 DEBUG mirakc_core::command_util: tuner#2.14.1: Kill 66: `mirakc-arib sync-clocks`
2021-03-28T13:02:30.470581858+09:00 DEBUG mirakc_core::tuner: StopStreaming tuner#2.14.1
2021-03-28T13:02:30.470616173+09:00  INFO mirakc_core::tuner: tuner#2.14.1: Stop streaming
2021-03-28T13:02:30.470640154+09:00  INFO mirakc_core::tuner: tuner#2.14.1: Unsubscribed: Job(clock-synchronizer) (priority=-1)
2021-03-28T13:02:30.470664358+09:00  INFO mirakc_core::tuner: tuner#2.14: Deactivated
2021-03-28T13:02:30.470684358+09:00 DEBUG mirakc_core::command_util: tuner#2.14: Kill 65: `recpt1 --device /dev/px4video2 27 - -`
2021-03-28T13:02:30.470759080+09:00 DEBUG mirakc_core::broadcaster: Unsubscribe with tuner#2.14.1
2021-03-28T13:02:30.470790635+09:00 DEBUG mirakc_core::broadcaster: tuner#2.14: EOS reached, stop
2021-03-28T13:02:30.470843116+09:00 DEBUG mirakc_core::broadcaster: tuner#2.14: Stopped
2021-03-28T13:02:30.470927912+09:00 DEBUG mirakc_core::mpeg_ts_stream: tuner#2.14.1: Downstream has been closed
2021-03-28T13:02:30.471085448+09:00 DEBUG mirakc_core::clock_synchronizer: Synchronized 2 clocks in NHK総合1・東京
2021-03-28T13:02:30.471160318+09:00 DEBUG mirakc_core::clock_synchronizer: Synchronizing clocks in NHKEテレ1東京...
2021-03-28T13:02:30.471198225+09:00 DEBUG mirakc_core::tuner: StartStreaming GR/26 to Job(clock-synchronizer) (priority=-1)
2021-03-28T13:02:30.471221392+09:00  INFO mirakc_core::tuner: tuner#2: Activate for GR/26
2021-03-28T13:02:30.472185331+09:00 DEBUG mirakc_core::command_util: tuner#2.15: Spawned 70: `recpt1 --device /dev/px4video2 26 - -`
2021-03-28T13:02:30.472276886+09:00  INFO mirakc_core::tuner: tuner#2.15: Activated with GR/26
2021-03-28T13:02:30.472304626+09:00  INFO mirakc_core::tuner: tuner#2.15.1: Subscribed: Job(clock-synchronizer) (priority=-1)
2021-03-28T13:02:30.472357793+09:00 DEBUG mirakc_core::broadcaster: tuner#2.15: Started
2021-03-28T13:02:30.472381774+09:00 DEBUG mirakc_core::broadcaster: Subscribe with tuner#2.15.1
2021-03-28T13:02:30.472431459+09:00  INFO mirakc_core::tuner: tuner#2.15.1: Started streaming
2021-03-28T13:02:30.475159721+09:00 DEBUG mirakc_core::command_util: tuner#2.15.1: Spawned 71: `mirakc-arib sync-clocks`
2021-03-28T13:02:30.476831637+09:00 DEBUG mirakc_core::broadcaster: tuner#2.15: EOS reached, stop
2021-03-28T13:02:30.477464707+09:00 DEBUG mirakc_core::broadcaster: tuner#2.15: Stopped
2021-03-28T13:02:30.478063926+09:00 DEBUG mirakc_core::command_util: recpt1#70: using device: /dev/px4video2
2021-03-28T13:02:30.478803422+09:00 DEBUG mirakc_core::command_util: recpt1#70: pid = 70
2021-03-28T13:02:30.479386196+09:00 DEBUG mirakc_core::command_util: recpt1#70: Cannot open tuner device: /dev/px4video2
2021-03-28T13:02:30.480036229+09:00 DEBUG mirakc_core::mpeg_ts_stream: tuner#2.15.1: EOF reached
2021-03-28T13:02:30.485302791+09:00 DEBUG mirakc_core::command_util: mirakc-arib#71: [sync-clocks] [info] Read packets from STDIN...
2021-03-28T13:02:30.485367532+09:00 DEBUG mirakc_core::command_util: mirakc-arib#71: [sync-clocks] [info] --sids SIDs:
2021-03-28T13:02:30.485387587+09:00 DEBUG mirakc_core::command_util: mirakc-arib#71: [sync-clocks] [info] --xsids SIDs:
2021-03-28T13:02:30.485404939+09:00 DEBUG mirakc_core::command_util: mirakc-arib#71: [sync-clocks] [info] Feed packets...
2021-03-28T13:02:30.485421587+09:00 DEBUG mirakc_core::command_util: mirakc-arib#71: [sync-clocks] [info] EOF reached
2021-03-28T13:02:30.485442087+09:00 DEBUG mirakc_core::command_util: mirakc-arib#71: [sync-clocks] [info] Ended to feed packets unsuccessfully
2021-03-28T13:02:30.486703820+09:00 DEBUG mirakc_core::tuner: tuner#2.15.1: Closing...
2021-03-28T13:02:30.486775690+09:00 DEBUG mirakc_core::command_util: tuner#2.15.1: Kill 71: `mirakc-arib sync-clocks`
2021-03-28T13:02:30.486928152+09:00  WARN mirakc_core::clock_synchronizer: Failed to synchronize clocks in NHKEテレ1東京: No clock, maybe out of service

推測

どうやら 成功 → 失敗 を交互に繰り返しているようです。
config.yml の channels 記述順序を変えると、FailedになるServiceも変化しました。

/api/services で出力されるサービスの並び順

以前のバージョン(0.7.0)では/api/servicesで出力されるサービスの並び順はconfig.ymlで指定されたサービスの順であったのですが、0.8.0ではチャンネル空間(GR,BS,CS)の並びも含めてバラバラになっています。

現時点のBonDriver_mirakcでは、/api/servicesの出力ではチャンネル空間がまとまっているのを前提としているため正しく動作しなくなってしまいました。
BonDriver_mirakcの修正(内部でソート)も可能なのですが、そうするとユーザーがチャンネルの順番を変えられないことになります。

そこで、0.7.0と同じように、/api/services(/api/channels)でのサービス(チャンネル)の出力をconfig.ymlに記載の順番に戻していただくことはできませんでしょうか。

Cannot grab a tuner used by lower priority users

Reproduction Steps

Conditions:

  • Only one tuner is available
  • At least two channels are available

On a terminal:

# priority(0)
curl http://localhost:40772/api/channels/GR/26/stream >/dev/null

On another ternimal:

# priority(1)
curl -H 'x-mirakurun-priority: 1' http://localhost:40772/api/channels/GR/27/stream >/dev/null

Both are disconnected.

Logs:

DEBUG mirakc::epg: QueryChannel by GR/26
DEBUG mirakc::tuner: StartStreaming GR/26 to Web(remote="127.0.0.1:63005" agent="curl/7.64.1") (priority=0)
INFO mirakc::tuner: tuner#0: Activate for GR/26
DEBUG mirakc::command_util: tuner#0: Spawned 8753: `curl -fsSL http://mirakc:40772/api/channels/GR/26/stream`
INFO mirakc::tuner: tuner#0: Activated with GR/26
INFO mirakc::tuner: tuner#0.1: Subscribed: Web(remote="127.0.0.1:63005" agent="curl/7.64.1") (priority=0)
DEBUG mirakc::broadcaster: tuner#0: Started
DEBUG mirakc::broadcaster: Subscribe with tuner#0.1
INFO mirakc::tuner: tuner#0.1: Started streaming
DEBUG mirakc::epg: QueryChannel by GR/27
DEBUG mirakc::tuner: StartStreaming GR/27 to Web(remote="127.0.0.1:63007" agent="curl/7.64.1") (priority=1)
INFO mirakc::tuner: tuner#0: Grab tuner, rectivate for GR/27
INFO mirakc::tuner: tuner#0: Deactivated
DEBUG mirakc::command_util: tuner#0: Killed 8753: `curl -fsSL http://mirakc:40772/api/channels/GR/26/stream`
DEBUG mirakc::command_util: tuner#0: Spawned 8762: `curl -fsSL http://mirakc:40772/api/channels/GR/27/stream`
INFO mirakc::tuner: tuner#0: Activated with GR/27
INFO mirakc::tuner: tuner#0.1: Subscribed: Web(remote="127.0.0.1:63007" agent="curl/7.64.1") (priority=1)
DEBUG mirakc::broadcaster: tuner#0: EOS reached, stop
DEBUG mirakc::broadcaster: tuner#0: Stopped
DEBUG mirakc::broadcaster: tuner#0: Started
INFO actix_web::middleware::logger: 127.0.0.1:63005 "GET /api/channels/GR/26/stream HTTP/1.1" 200 13336576 "-" "curl/7.64.1" 6.221061
DEBUG mirakc::broadcaster: Subscribe with tuner#0.1
DEBUG mirakc::mpeg_ts_stream: tuner#0.1: Closing...
DEBUG mirakc::tuner: StopStreaming tuner#0.1
INFO mirakc::tuner: tuner#0.1: Stop streaming
INFO mirakc::tuner: tuner#0.1: Unsubscribed: Web(remote="127.0.0.1:63007" agent="curl/7.64.1") (priority=1)
INFO mirakc::tuner: tuner#0: Deactivated
DEBUG mirakc::command_util: tuner#0: Killed 8762: `curl -fsSL http://mirakc:40772/api/channels/GR/27/stream`
INFO mirakc::tuner: tuner#0.1: Started streaming
DEBUG mirakc::broadcaster: Unsubscribe with tuner#0.1
DEBUG mirakc::mpeg_ts_stream: tuner#0.1: Closing...
INFO actix_web::middleware::logger: 127.0.0.1:63007 "GET /api/channels/GR/27/stream HTTP/1.1" 404 38 "-" "curl/7.64.1" 0.008458
DEBUG mirakc::broadcaster: tuner#0: EOS reached, stop
DEBUG mirakc::broadcaster: tuner#0: Stopped
DEBUG mirakc::tuner: StopStreaming tuner#0.1
INFO mirakc::tuner: tuner#0.1: Stop streaming

The latter request grabs the tuner, but its connection is closed quickly due to EOS.

Doesn't work with EPGStation/1.6.4

EPGStation/1.6.4 uses Mirakurun/2.14.0.

Client in Mirakurun/2.14.0 builds a HTTP request using /api/docs, but mirakc/0.2.0 doesn't support this API.

サービスが変更されない

お世話になります

同一チャンネル複数サービスの局について、以下の様に定義しております。

  • name: 'ショップチャンネル'
    type: 'CS'
    channel: 'CS8'
    services: [55]

  • name: '東映チャンネル'
    type: 'CS'
    channel: 'CS8'
    services: [218]

  • name: 'Mnet'
    type: 'CS'
    channel: 'CS8'
    services: [318]

  • name: '日テレNEWS24'
    type: 'CS'
    channel: 'CS8'
    services: [349]

このconfigで、日テレNEWS24(services: [349]) をTVTestで選局した時、
一番若いservice、この場合 ショップチャンネル(services: [55]) が表示されてしまいます。

TVTestのログにも

  2022/01/15 6:26:59>******** TVTest ver.0.10.0-dev 0d0766e (Release x86) 起動 ********
  2022/01/15 6:26:59>Work with LibISDB ver.0.0.0 519f918
  2022/01/15 6:26:59>Compiled with MSVC 19.29.30133.0
  2022/01/15 6:26:59>設定を読み込んでいます...
  2022/01/15 6:26:59>プラグインを "D:\freesoft\TV\TVTest\Plugins" から読み込みます...
  2022/01/15 6:26:59>TVCaptionMod2.tvtp を読み込みました。
  2022/01/15 6:26:59>BonDriver_mirakc.dll を読み込みました。
  2022/01/15 6:27:04>BonDriverにチャンネル変更を要求します。(チューニング空間 2[CS] / Ch 19[日テレNEWS24] / Sv -1)
  2022/01/15 6:27:06>DirectShowの初期化を行います(MPEG-2 Video)...
  2022/01/15 6:27:06>DirectShowの初期化を行いました。
  2022/01/15 6:27:06>サービスを変更しました。(SID 55)

と、services: [55]が表示されます。

BSでも同様に、configが

  • name: 'BS朝日1'
    type: 'BS'
    channel: 'BS1_0'
    services: [151]

  • name: 'BS朝日2'
    type: 'BS'
    channel: 'BS1_0'
    services: [152]

  • name: 'BS朝日3'
    type: 'BS'
    channel: 'BS1_0'
    services: [153]

の時、BS朝日3(services: [153]) を選局すると、BS朝日1( services: [151]) が選局されます。

ご確認をお願い出来ますでしょうか?

環境:
 TVtest 0.10.0 0d0766e
 BonDriver_mirakc.dll 1.0 (SERVICE_SPLIT=0)

EPGStationがチューナー取得に失敗する

現象

チューナーに余裕がない状況で局の違う番組を続けて録画しようとすると、前番組の録画終了を待たずに次番組の録画を失敗してしまう。

環境

  • Raspberry Pi 4B (Ubuntu 20.04 64bit)
  • PX-W3U4 (Driver: px4_drv)
  • mirakc 0.16.1 (DockerImage: mirakc/mirakc:0.16.1-alpine)
  • EPGStation (DockerImage: l3tnun/epgstation:v2.1.1-alpine)
    • apk add tzdata ffmpeg curl socat

再現

configで地上波チューナーを1つに設定して以下のような録画予約を行う。
debug_program

前番組録画中の mirakc /api/tuners

[
  {
    "index": 0,
    "name": "PX-W3U4_T1",
    "types": [
      "GR"
    ],
    "command": "recpt1 --device /dev/px4video2 23 - -",
    "pid": 119,
    "users": [
      {
        "id": "unix:1615090742727",
        "agent": "epgstation/2.1.1 MirakurunClient/3.5.0 Node/v14.16.0 (linux)",
        "priority": 2
      },
      {
        "id": "tracker:tuner#0.16.1",
        "priority": -1
      }
    ],
    "isAvailable": true,
    "isRemote": false,
    "isFree": false,
    "isUsing": true,
    "isFault": false
  }
]

次番組録画準備からのログ

[2021-03-07T13:59:45.002] epgstation INFO  system - preprec: 2
[2021-03-07T13:59:45.026] mirakc     DEBUG mirakc::epg: QueryProgram By (NID#7FE6, SID#0430, EID#3E1D)
[2021-03-07T13:59:45.026] mirakc     INFO  actix_web::middleware::logger: - "GET /api/programs/327420107215901 HTTP/1.1" 200 2280 "-" "epgstation/2.1.1 MirakurunClient/3.5.0 Node/v14.16.0 (linux)" 0.000918
[2021-03-07T13:59:45.034] epgstation WARN  system - TunerAssignmentError programId: 2
[2021-03-07T13:59:45.041] mirakc     DEBUG mirakc::epg: QueryProgram By (NID#7FE4, SID#0420, EID#C829)
[2021-03-07T13:59:45.041] mirakc     DEBUG mirakc::epg: QueryService By (NID#7FE4, SID#0420)
[2021-03-07T13:59:45.041] mirakc     DEBUG mirakc::epg: QueryClock by 7FE47FE404200000
[2021-03-07T13:59:45.042] mirakc     DEBUG mirakc::tuner: StartStreaming GR/21 to Web(id="unix:1615093185040" agent="epgstation/2.1.1 MirakurunClient/3.5.0 Node/v14.16.0 (linux)") (priority=2)
[2021-03-07T13:59:45.042] mirakc     WARN  mirakc::tuner: No tuner available for GR/21 Web(id="unix:1615093185040" agent="epgstation/2.1.1 MirakurunClient/3.5.0 Node/v14.16.0 (linux)") (priority=2)
[2021-03-07T13:59:45.043] mirakc     INFO  actix_web::middleware::logger: - "GET /api/programs/327400105651241/stream?decode=1 HTTP/1.1" 404 38 "-" "epgstation/2.1.1 MirakurunClient/3.5.0 Node/v14.16.0 (linux)" 0.002765
[2021-03-07T13:59:45.045] epgstation ERROR system - preprec failed: 2
[2021-03-07T13:59:50.052] mirakc     DEBUG mirakc::epg: QueryProgram By (NID#7FE6, SID#0430, EID#3E1D)
[2021-03-07T13:59:50.047] epgstation INFO  system - preprec: 2
[2021-03-07T13:59:50.055] mirakc     INFO  actix_web::middleware::logger: - "GET /api/programs/327420107215901 HTTP/1.1" 200 2280 "-" "epgstation/2.1.1 MirakurunClient/3.5.0 Node/v14.16.0 (linux)" 0.003085
[2021-03-07T13:59:50.058] epgstation WARN  system - TunerAssignmentError programId: 2
[2021-03-07T13:59:50.064] mirakc     DEBUG mirakc::epg: QueryProgram By (NID#7FE4, SID#0420, EID#C829)
[2021-03-07T13:59:50.066] mirakc     DEBUG mirakc::epg: QueryService By (NID#7FE4, SID#0420)
[2021-03-07T13:59:50.068] mirakc     DEBUG mirakc::epg: QueryClock by 7FE47FE404200000
[2021-03-07T13:59:50.069] mirakc     DEBUG mirakc::tuner: StartStreaming GR/21 to Web(id="unix:1615093190063" agent="epgstation/2.1.1 MirakurunClient/3.5.0 Node/v14.16.0 (linux)") (priority=2)
[2021-03-07T13:59:50.069] mirakc     WARN  mirakc::tuner: No tuner available for GR/21 Web(id="unix:1615093190063" agent="epgstation/2.1.1 MirakurunClient/3.5.0 Node/v14.16.0 (linux)") (priority=2)
[2021-03-07T13:59:50.071] mirakc     INFO  actix_web::middleware::logger: - "GET /api/programs/327400105651241/stream?decode=1 HTTP/1.1" 404 38 "-" "epgstation/2.1.1 MirakurunClient/3.5.0 Node/v14.16.0 (linux)" 0.008244
[2021-03-07T13:59:50.077] epgstation ERROR system - preprec failed: 2
[2021-03-07T13:59:55.078] epgstation INFO  system - preprec: 2
[2021-03-07T13:59:55.081] mirakc     DEBUG mirakc::epg: QueryProgram By (NID#7FE6, SID#0430, EID#3E1D)
[2021-03-07T13:59:55.082] mirakc     INFO  actix_web::middleware::logger: - "GET /api/programs/327420107215901 HTTP/1.1" 200 2280 "-" "epgstation/2.1.1 MirakurunClient/3.5.0 Node/v14.16.0 (linux)" 0.000407
[2021-03-07T13:59:55.083] epgstation WARN  system - TunerAssignmentError programId: 2
[2021-03-07T13:59:55.088] mirakc     DEBUG mirakc::epg: QueryProgram By (NID#7FE4, SID#0420, EID#C829)
[2021-03-07T13:59:55.088] mirakc     DEBUG mirakc::epg: QueryService By (NID#7FE4, SID#0420)
[2021-03-07T13:59:55.088] mirakc     DEBUG mirakc::epg: QueryClock by 7FE47FE404200000
[2021-03-07T13:59:55.088] mirakc     DEBUG mirakc::tuner: StartStreaming GR/21 to Web(id="unix:1615093195087" agent="epgstation/2.1.1 MirakurunClient/3.5.0 Node/v14.16.0 (linux)") (priority=2)
[2021-03-07T13:59:55.088] mirakc     WARN  mirakc::tuner: No tuner available for GR/21 Web(id="unix:1615093195087" agent="epgstation/2.1.1 MirakurunClient/3.5.0 Node/v14.16.0 (linux)") (priority=2)
[2021-03-07T13:59:55.088] mirakc     INFO  actix_web::middleware::logger: - "GET /api/programs/327400105651241/stream?decode=1 HTTP/1.1" 404 38 "-" "epgstation/2.1.1 MirakurunClient/3.5.0 Node/v14.16.0 (linux)" 0.001175
[2021-03-07T13:59:55.091] epgstation ERROR system - preprec failed: 2
[2021-03-07T14:00:00.092] epgstation INFO  system - preprec: 2
[2021-03-07T14:00:00.097] mirakc     DEBUG mirakc::epg: QueryProgram By (NID#7FE6, SID#0430, EID#3E1D)
[2021-03-07T14:00:00.098] mirakc     INFO  actix_web::middleware::logger: - "GET /api/programs/327420107215901 HTTP/1.1" 200 2280 "-" "epgstation/2.1.1 MirakurunClient/3.5.0 Node/v14.16.0 (linux)" 0.000900
[2021-03-07T14:00:00.100] epgstation WARN  system - TunerAssignmentError programId: 2
[2021-03-07T14:00:00.106] mirakc     DEBUG mirakc::epg: QueryProgram By (NID#7FE4, SID#0420, EID#C829)
[2021-03-07T14:00:00.106] mirakc     DEBUG mirakc::epg: QueryService By (NID#7FE4, SID#0420)
[2021-03-07T14:00:00.106] mirakc     DEBUG mirakc::epg: QueryClock by 7FE47FE404200000
[2021-03-07T14:00:00.107] mirakc     DEBUG mirakc::tuner: StartStreaming GR/21 to Web(id="unix:1615093200106" agent="epgstation/2.1.1 MirakurunClient/3.5.0 Node/v14.16.0 (linux)") (priority=2)
[2021-03-07T14:00:00.107] mirakc     WARN  mirakc::tuner: No tuner available for GR/21 Web(id="unix:1615093200106" agent="epgstation/2.1.1 MirakurunClient/3.5.0 Node/v14.16.0 (linux)") (priority=2)
[2021-03-07T14:00:00.107] mirakc     INFO  actix_web::middleware::logger: - "GET /api/programs/327400105651241/stream?decode=1 HTTP/1.1" 404 38 "-" "epgstation/2.1.1 MirakurunClient/3.5.0 Node/v14.16.0 (linux)" 0.001239
[2021-03-07T14:00:00.108] epgstation ERROR system - preprec failed: 2
[2021-03-07T14:00:00.110] epgstation DEBUG system - delete recording index: 2
[2021-03-07T14:00:00.113] epgstation INFO  system - cancel reservation: 2
[2021-03-07T14:00:00.144] epgstation DEBUG system - --------------------
[2021-03-07T14:00:00.145] epgstation DEBUG system - { name: '開運!なんでも鑑定団[再]朝ドラ・エール古関裕而<幻の未発表曲>[字][解]', ruleId: null }
[2021-03-07T14:00:00.145] epgstation DEBUG system - --------------------
[2021-03-07T14:00:00.146] epgstation INFO  system - { insert: 0, update: 0, delete: 1 }
[2021-03-07T14:00:00.172] epgstation INFO  system - successful cancel reservation: 2
[2021-03-07T14:00:01.659] mirakc     DEBUG mirakc::epg: RemoveAirtime of 7FE67FE604303E1D
[2021-03-07T14:00:01.659] mirakc     INFO  mirakc::airtime_tracker: Stopped tracking airtime of 7FE67FE604303E1D
[2021-03-07T14:00:01.659] mirakc     DEBUG mirakc::command_util: tuner#0.16.2: Killed 120: `mirakc-arib track-airtime --sid=1072 --eid=15901`
[2021-03-07T14:00:01.693] mirakc     DEBUG mirakc::mpeg_ts_stream: tuner#0.16.2: Downstream has been closed
[2021-03-07T14:00:01.707] mirakc     DEBUG mirakc::command_util: tuner#0.16.1: Killed 121: `mirakc-arib filter-service --sid=1072`
[2021-03-07T14:00:01.707] mirakc     DEBUG mirakc::command_util: tuner#0.16.1: Killed 123: `arib-b25-stream-test`
[2021-03-07T14:00:01.707] mirakc     DEBUG mirakc::command_util: tuner#0.16.1: Killed 124: `mirakc-arib filter-program --sid=1072 --eid=15901 --clock-pid=511 --clock-pcr=1927707048999 --clock-time=1615090677000 --end-margin=2000`
[2021-03-07T14:00:01.707] mirakc     INFO  actix_web::middleware::logger: - "GET /api/programs/327420107215901/stream?decode=1 HTTP/1.1" 200 4854984004 "-" "epgstation/2.1.1 MirakurunClient/3.5.0 Node/v14.16.0 (linux)" 2458.979909
[2021-03-07T14:00:01.707] mirakc     DEBUG mirakc::mpeg_ts_stream: tuner#0.16.2: Closing...
[2021-03-07T14:00:01.707] mirakc     DEBUG mirakc::mpeg_ts_stream: tuner#0.16.1: Closing...
[2021-03-07T14:00:01.708] mirakc     DEBUG mirakc::tuner: StopStreaming tuner#0.16.2
[2021-03-07T14:00:01.708] mirakc     INFO  mirakc::tuner: tuner#0.16.2: Stop streaming
[2021-03-07T14:00:01.708] mirakc     INFO  mirakc::tuner: tuner#0.16.2: Unsubscribed: Tracker(tuner#0.16.1) (priority=-1)
[2021-03-07T14:00:01.708] mirakc     DEBUG mirakc::tuner: StopStreaming tuner#0.16.1
[2021-03-07T14:00:01.708] mirakc     INFO  mirakc::tuner: tuner#0.16.1: Stop streaming
[2021-03-07T14:00:01.708] mirakc     INFO  mirakc::tuner: tuner#0.16.1: Unsubscribed: Web(id="unix:1615090742727" agent="epgstation/2.1.1 MirakurunClient/3.5.0 Node/v14.16.0 (linux)") (priority=2)
[2021-03-07T14:00:01.708] mirakc     INFO  mirakc::tuner: tuner#0.16: Deactivated
[2021-03-07T14:00:01.709] epgstation DEBUG system - delete stream: 1
[2021-03-07T14:00:01.712] epgstation INFO  system - finish stream: 1
[2021-03-07T14:00:01.713] epgstation INFO  system - start recEnd: 1
[2021-03-07T14:00:01.716] epgstation INFO  system - remove recording flag: 1
[2021-03-07T14:00:01.716] mirakc     DEBUG mirakc::command_util: tuner#0.16: Killed 119: `recpt1 --device /dev/px4video2 23 - -`
[2021-03-07T14:00:01.716] mirakc     DEBUG mirakc::broadcaster: Unsubscribe with tuner#0.16.2
[2021-03-07T14:00:01.716] mirakc     DEBUG mirakc::broadcaster: Unsubscribe with tuner#0.16.1
[2021-03-07T14:00:01.717] mirakc     DEBUG mirakc::broadcaster: tuner#0.16: EOS reached, stop
[2021-03-07T14:00:01.717] mirakc     DEBUG mirakc::broadcaster: tuner#0.16: Stopped
[2021-03-07T14:00:01.717] mirakc     DEBUG mirakc::mpeg_ts_stream: tuner#0.16.1: EOF reached
[2021-03-07T14:00:01.796] epgstation INFO  system - update file size: 1
[2021-03-07T14:00:01.805] epgstation INFO  system - { recordedId: 1, error: 0, drop: 0, scrambling: 0 }
[2021-03-07T14:00:01.915] epgstation DEBUG system - delete recording index: 1
[2021-03-07T14:00:01.917] epgstation INFO  system - add thumbnail queue: 1
[2021-03-07T14:00:01.919] epgstation INFO  system - recording finish: 1 /app/recorded/210307-125400-開運!なんでも鑑定団[再]朝ドラ・エール古関裕而<幻の未発表曲>[字][解].ts
[2021-03-07T14:00:01.919] epgstation INFO  system - cancel reservation: 1
[2021-03-07T14:00:01.966] epgstation INFO  system - { insert: 0, update: 0, delete: 1 }
[2021-03-07T14:00:02.053] epgstation INFO  system - successful cancel reservation: 1
[2021-03-07T14:00:03.214] epgstation INFO  system - create thumbnail: 1, /app/thumbnail/1.jpg

`epg` actor died silently?

In the main branch, processing FeedEitSectionsMessage failed. Probably, it failed in the following line:

let services = epg.send(QueryServicesMessage).await?;

No error logs from actix were output.

Export timeshift records as files using FUSE

Currently, there is no easy way to play timeshift records.
Implementing a frontend supporting the timeshift API is one of candidates, but it takes time.

As an alternative, we implement a feature to export timeshift records as files using FUSE.
We expect that this feature makes it easy for users to play records with media players like VLC and KODI which support MPEG2-TS.

The structure of the timeshift config will be changed like below:

timeshift:
  mount: /path/to/mount-point
  recorders:
    nhk:
      ...

zargony/fuse-rs is used for the filesystem implementation.

Does this run on macOS?

Really cool project!

I'm wondering if this is usable on macOS (mirakurun isn't). I'm looking for a way to repurpose my mac server for DVR without having to go through a VM / Raspberry Pi .

The article here mentions macOS as supported - https://qiita.com/masnagam/items/e71a234f2e66b1246a37 but I wasn't sure if that's still up to date.

If it does, do you know what tuners are compatible with this when using macOS host?

Create a Docker image for each architecture based on Alpine Linux

This is a common way to reduce the image size. In my rough estimation, tens of MBs in size of each image can be reduced.

Unfortunately, there is no cross-compiler in the Alpine main package repository. So, it's impossible to cross-compile executables for other architectures on Alpine Linux only with official tools. In fact, you can see this page which describes how to cross-compile binaries by using ArchLinux.

Solving this issue, we need to accomplish the following two tasks for each architecture:

  1. Build a root filesystem for cross-compilation
  2. Prepare a cross-compiler

The first task can be accomplished by following steps described in the "Building an Alpine Linux Sysroot" section in:
https://mologie.github.io/blog/programming/2017/12/25/cross-compiling-cpp-with-cmake-llvm.html

We can put the steps in a build stage in a Dockerfile for the cross-compilation.

There are multiple candidates to accomplish the second task:

Of course, we can build executables by using native compiler + QEMU user mode emulation. However, it takes a long time to compile executables due to inefficiency for the emulation. This is why we stopped using Alpine Linux as the base image for mirakc.

SERVICE_SPLIT=0 を無視する不具合

user@TV:~$ uname -a
Linux TV 5.4.106-1-pve #1 SMP PVE 5.4.106-1 (Fri, 19 Mar 2021 11:08:47 +0100) x86_64 x86_64 x86_64 GNU/Linux
ubuntu 20.10
DD MaxM4

以前衛生が受信できない件で大変お世話になりました。

今回は、Bondriver_mirakc.ini の SERVICE_SPLIT=0 指定を無視する不具合について報告させていただきたいと思います。

これは Bondriver.iniにSERVICE_SPLIT=0 を指定しているのに、TVTestでチャンネルスキャンを行うとBSCSだけがどうやっても1サービス1チャンネルになってしまうというものです。

今回検証土台として、mirakc 0.17.4使用しました。
  TVTest0.10.0 + Bondriver_mirakc.dll 1.2 の場合、強制的に SERVICE_SPLIT=1 な挙動
  TVTest0.10.0 + Bondriver_mirakurun.dll 1.5 でも強制的に SERVICE_SPLIT=1 な挙動
をしてしまいます。

さらに今回は他の御利用者様にご協力願って、チューナを PX-W3U4 でも行っていただきましたが、やはり同様にSERVICE_SPLIT=1な挙動(1サービス1チャンネルモード)になってしまう様です。

お手数ですがmirakcのご確認を願えませんでしょうか?
宜しくお願いします。

Provide functions to record and manage TS streams

Port functions from EPGStation or newly implement similar functions.

mirakc doesn't provide any UI, just provides functions as Web API. UI has to be implemented separately. However, a function to provide static files for UI may be implemented if many users request it.

EPGStation ライブ視聴時の再生が約5秒で止まる

mirakcをversion 0.4.0に入れ替えたところ、当方の環境の場合、地上波,BS,CSの番組問わず、EPGStationからライブ視聴開始、約5秒再生された後(画面操作なし)に再生が停止してしまいます。
録画、録画済み再生は問題なく動作しています。

※アップデート前は地上波,BSのライブ視聴は問題なく、CSが一部番組(サッカーの試合)の場合はライブ視聴のみ途切れ途切れ再生されるといった様な動きでした(録画済みの場合は問題なし、ただし調査を放置していたので分かりませんが、もしかしたらハード性能的な問題だったのかもしれません)

ログや実行環境等の情報は以下の通りとなります。

mirakcログ

 2020-02-29T02:14:43.744Z DEBUG mirakc::epg                   > QueryService By (NID#7FE0, SID#0400)
 2020-02-29T02:14:43.745Z WARN  mirakc::web                   > Post-filter is required, but not defined
 2020-02-29T02:14:43.745Z DEBUG mirakc::tuner                 > StartStreaming GR/27 to Web(agent="EPGStation/1.6.5 MirakurunClient/2.14.0 Node/v12.15.0 (linux)") (priority=0)
 2020-02-29T02:14:43.745Z INFO  mirakc::tuner                 > tuner#2: Activate with GR 27
 2020-02-29T02:14:43.749Z DEBUG mirakc::tuner                 > tuner#2.119: Spawned 119: `recpt1 --b25 --device /dev/px4video2 27 - -`
 2020-02-29T02:14:43.749Z INFO  mirakc::tuner                 > tuner#2.119: Activated with GR 27
 2020-02-29T02:14:43.749Z INFO  mirakc::tuner                 > tuner#2.119.1: Subscribed: Web(agent="EPGStation/1.6.5 MirakurunClient/2.14.0 Node/v12.15.0 (linux)") (priority=0)
 2020-02-29T02:14:43.749Z DEBUG mirakc::broadcaster           > tuner#2.119: Started
 2020-02-29T02:14:43.749Z DEBUG mirakc::broadcaster           > Subscribe with tuner#2.119.1
 2020-02-29T02:14:43.750Z INFO  mirakc::tuner                 > tuner#2.119.1: Started streaming
using B25...
using device: /dev/px4video2
pid = 119
 2020-02-29T02:14:43.756Z DEBUG mirakc::command_util          > tuner#2.119.1: Spawned 120: `mirakc-arib filter-service --sid=1024`
device = /dev/px4video2
C/N = 41.063213dB
Recording...
 2020-02-29T02:14:49.181Z WARN  mirakc::web                   > tuner#2.119.1: No space, drop the chunk
 2020-02-29T02:14:49.182Z DEBUG mirakc::command_util          > tuner#2.119.1: Killed 120: `mirakc-arib filter-service --sid=1024`
 2020-02-29T02:14:49.188Z DEBUG mirakc::mpeg_ts_stream        > Downstream has been closed
 2020-02-29T02:14:49.188Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.189Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.218Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.218Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.219Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.219Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.248Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.249Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.278Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.278Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.381Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.381Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.381Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.381Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.382Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.382Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.382Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.383Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.383Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.383Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.383Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.397Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.397Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.427Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.427Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.457Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.457Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.457Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.486Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.486Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.488Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.518Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.518Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.546Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.546Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.546Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.548Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.548Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.549Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.576Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.576Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.606Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.606Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.606Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.606Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.606Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.606Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.635Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.636Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.636Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.636Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.636Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.636Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.636Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.666Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.667Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.667Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.697Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.697Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.697Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.697Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.698Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.725Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.725Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.755Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.755Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.757Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.784Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.784Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.784Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.785Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.785Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.785Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.814Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.814Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.815Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.844Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.844Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.874Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.874Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.904Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.904Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.934Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.934Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.965Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.965Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.993Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:49.994Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.024Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.024Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.029Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.052Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.052Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.052Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.053Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.053Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.083Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.083Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.114Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.115Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.115Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.142Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.142Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.143Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.143Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.144Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.172Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.173Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.201Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.202Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.202Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.202Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.232Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.232Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.261Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.261Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.292Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.292Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.321Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.323Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.351Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.351Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.351Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.352Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.352Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.381Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.381Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.383Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.410Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.410Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.410Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.410Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.440Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.440Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.440Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.441Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.472Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.472Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.501Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.502Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.529Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.529Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.530Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.530Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.560Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.560Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.589Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.590Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.619Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.619Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.649Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.649Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.649Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.649Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.649Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.678Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.678Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.678Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.679Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.679Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.680Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.680Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.681Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.681Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.681Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.681Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.681Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.681Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.681Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.711Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.711Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.738Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.738Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.741Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.768Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.769Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.769Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.798Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.799Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.799Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.801Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.830Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.830Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.857Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.858Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.859Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.887Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.888Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.891Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.917Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.917Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.917Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.917Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.918Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.918Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.950Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.950Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.950Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.977Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:50.977Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.007Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.007Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.038Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.038Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.066Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.067Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.067Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.098Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.098Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.099Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.099Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.128Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.129Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.131Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.156Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.159Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.159Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.160Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.160Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.185Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.186Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.187Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.187Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.215Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.215Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.216Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.217Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.217Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.250Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.250Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.250Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.250Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.250Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.250Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.250Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.250Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.251Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.251Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.274Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.274Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.275Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.275Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.275Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.275Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.275Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.275Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.275Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.276Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.306Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.382Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.382Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.386Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.387Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.387Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.387Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.396Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.401Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.428Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.431Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.457Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.457Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.484Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.489Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.493Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.513Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.513Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.513Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.514Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.514Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.514Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.544Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.545Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.545Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.574Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.574Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.602Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.602Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.603Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.632Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.632Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.633Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.633Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.662Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.662Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.663Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.692Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.692Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.692Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.722Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.722Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.722Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.752Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.752Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.781Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.781Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.782Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.811Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.811Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.811Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.841Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.841Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.871Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.872Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.872Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.900Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.901Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.905Z DEBUG mirakc::broadcaster           > tuner#2.119: Closed by tuner#2.119.1, wait for unsubscribe
 2020-02-29T02:14:51.910Z INFO  actix_web::middleware::logger > - "GET /api/services/3273601024/stream?decode=1 HTTP/1.1" 200 8029856 "-" "EPGStation/1.6.5 MirakurunClient/2.14.0 Node/v12.15.0 (linux)" 8.165999
 2020-02-29T02:14:51.910Z DEBUG mirakc::mpeg_ts_stream        > tuner#2.119.1: Closing...
 2020-02-29T02:14:51.910Z DEBUG mirakc::tuner                 > StopStreaming tuner#2.119.1
 2020-02-29T02:14:51.910Z INFO  mirakc::tuner                 > tuner#2.119.1: Stop streaming
 2020-02-29T02:14:51.910Z INFO  mirakc::tuner                 > tuner#2.119.1: Unsubscribed: Web(agent="EPGStation/1.6.5 MirakurunClient/2.14.0 Node/v12.15.0 (linux)") (priority=0)
 2020-02-29T02:14:51.915Z DEBUG mirakc::tuner                 > tuner#2.119: Killed 119: recpt1 --b25 --device /dev/px4video2 27 - -
 2020-02-29T02:14:51.915Z INFO  mirakc::tuner                 > tuner#2.119: Deactivated
 2020-02-29T02:14:51.915Z DEBUG mirakc::broadcaster           > Unsubscribe with tuner#2.119.1
 2020-02-29T02:14:51.915Z DEBUG mirakc::broadcaster           > tuner#2.119: EOS reached, stop
 2020-02-29T02:14:51.916Z DEBUG mirakc::broadcaster           > tuner#2.119: Stopped

実行環境

OS

Synology NAS DiskStation Manager 6.2

Linux NAS01 4.4.59+ #24922 SMP PREEMPT Mon Aug 19 12:11:11 CST 2019 x86_64 GNU/Linux synology_denverton_1618+

Docker

Version: 18.09.8, build 2c0a67b

docker-compose

version 1.24.0, build 0aa59064

Dockerコンテナ

mirakc

version 0.4.0
master-alpine-amd64 を元にツール追加
https://github.com/collelog/tv-recorder/blob/master/mirakc/Dockerfile

EPGStation

version 1.6.5(+FFmpeg4.2.2)

EPGStation側設定

https://github.com/collelog/tv-recorder/blob/master/epgstation/config/config.json
https://github.com/collelog/tv-recorder/blob/master/epgstation/config/enc.js

mirakc側設定

https://github.com/collelog/tv-recorder/blob/master/mirakc/config.yml

dockerイメージ内ファイルの権限

dockerの -u オプションによるuid/gid指定で運用しようとして気づきましたが、linux/amd64の 1.0.57, 1.0.57-alpine タグイメージ(現時点ではrelease最新イメージ)で /etc/mirakurun.openapi.json がroot以外読み取り不可になっているようです。

以下イメージビルド内でCOPYしているファイルのls結果です。

root@debian:~# docker run --rm -it --entrypoint= mirakc/mirakc:1.0.57 sh
#  ls -l /usr/local/bin/
total 10136
-rwxr-xr-x 1 root root 7849848 Aug 19 19:45 mirakc
-rwxr-xr-x 1 root root 2418040 Aug 17 07:27 mirakc-arib
-rwxr-xr-x 1 root root   42048 Aug 16 03:18 recdvb
-rwxr-xr-x 1 root root   58176 Aug 16 03:18 recpt1
# ls -l /etc/mirakc/strings.yml
-rw-r--r-- 1 root root 5568 Aug 19 19:28 /etc/mirakc/strings.yml
# ls -l /etc/mirakurun.openapi.json
-rw------- 1 root root 13970 Aug 19 19:48 /etc/mirakurun.openapi.json
#
root@debian:~# docker run --rm -it --entrypoint= mirakc/mirakc:1.0.57-alpine sh
/ # ls -l /usr/local/bin/
total 11632
-rwxr-xr-x    1 root     root       7956232 Aug 19 19:52 mirakc
-rwxr-xr-x    1 root     root       3751368 Aug 17 07:24 mirakc-arib
-rwxr-xr-x    1 root     root         94000 Aug 16 03:14 recdvb
-rwxr-xr-x    1 root     root        105968 Aug 16 03:14 recpt1
/ # ls -l /etc/mirakc/strings.yml
-rw-r--r--    1 root     root          5568 Aug 19 19:27 /etc/mirakc/strings.yml
/ # ls -l /etc/mirakurun.openapi.json
-rw-------    1 root     root         13970 Aug 19 19:55 /etc/mirakurun.openapi.json
/ #

おそらくはイメージビルド時にローカル側にあるファイル権限がそのまま反映されていると思うのですが、root以外読み取り不可となっているのは何か意図があってのことでしょうか?
なお1.0.57タグから派生させたDockerfileのビルドコマンドで chmod +r /etc/mirakurun.openapi.json とすれば -u uid:gid での指定でうまく動いているようです。

余談ですが、イメージ作成時にdvbv5-zap (Debian: dvb-tools, Alpine: v4l-utils-dvbv5) も含めていただけると個人的には助かります。

Improve the docker GitHub job

Currently, it takes more than 1 hour and often fails due to some sort of time limits in GitHub Actions.

The build time of TSDuck is one of its root causes.

No space in chunk queues for a few minutes

On a timeshift recorder, the following warning messages were shown:

2021-07-09T03:20:36.088064111+09:00  WARN mirakc_core::broadcaster: tuner#0.6: No space for tuner#0.6.1, drop the chunk
2021-07-09T03:20:36.096073166+09:00  WARN mirakc_core::broadcaster: tuner#0.6: No space for tuner#0.6.1, drop the chunk
...

Those messages means that there was no space in a chunk queue for broadcasting from tuner#0 to a timeshift recording pipeline.

Several seconds later, the same situation occurred in another chunk queue:

2021-07-09T03:20:43.754704518+09:00  WARN mirakc_core::broadcaster: tuner#1.7: No space for tuner#1.7.1, drop the chunk

Eventually, all chunk queues were full.

Warning messages stopped within a minute like blow:

2021-07-09T03:21:11.036205496+09:00  WARN mirakc_core::broadcaster: tuner#0.6: No space for tuner#0.6.1, drop the chunk
2021-07-09T03:21:11.041626046+09:00 DEBUG mirakc_core::command_util: mirakc-arib#47: [record-service] [info] service-recorder: Event#67AF: Updated: 2021/07/09 03:20:27.239@1453096960000
2021-07-09T03:21:11.042690906+09:00 DEBUG mirakc_core::timeshift: bs1: Record#60E73D20: Updated: 2021-07-09 03:20:27.239 +09:00@1453096960000: 美しき世界の山々「サザンアルプス(ニュージーランド)」

I checked Record#60E73D20 and confirmed there were dropped packets around 00:20:36.

Serious drops with BonDriver_Mirakurun

mirakc + BonDriver_Mirakurun + TVTestを下記の環境で使用しておりますが、
大量のドロップが発生して、まともに視聴できない状況です。

Server:
CPU: Ryzen
Memory: 16GB
OS: OpenmediaVault4 (Debian Stretch)
Tuner: PT2 (chardev) + recpt1

Client: Core i7
CPU: Intel
Memory: 8GB
OS: Windows 10

本家のBonDriver_Mirakurunを少しシンプルに改造してみましたがそれでも同じ状況でした。

https://github.com/epgdatacapbon/BonDriver_Mirakurun/blob/develop/BonDriver_Mirakurun.cpp
でのTS読み込み処理は非常に簡単で、576行目でsocketにconnectし、596行目でGETでrequestして、607行目から始まるThreadの619行目のrecvで読み込んでいるだけです。
Mirakurunを使用した場合には特に問題はありません。

mpc-beやvlcでのhttp接続の視聴に問題はないため、actix-webの仕様をよくわかっていないのが原因と思われますが、なにかアドバイスいただけましたら幸いです。

Locking *.timeshift.json does not work as expected

As a result, we can see errors like below:

ERROR mirakc_timeshift_fs::filesystem: ino#0100000300000000: Failed to read timeshift data: JSON error: EOF while parsing a string at line 1 column 524288

mirakc uses file locks in order to prevent reading and writing each *.timeshift.json file at the same time. We expected that fs2::FileExt::lock_xxx works among containers which are shared files on the host filesystem. However, it seems not to work as expected.

ドキュメントの多言語化

現在、ドキュメントは日本語でしか書かれていないものと、英語でしか書かれていないものがあります。
これは読者に日英両言語の読解を要求するので、あまり好ましくないと思います。
多言語化した上で、それぞれの言語に翻訳したり、(将来的にプルリクがあれば)他の言語にも対応できるようにしてはどうでしょうか。

現在、https://mirakc.github.io/dekiru-mirakc/ は日本語のみです。
一方、https://github.com/mirakc/mirakc/tree/main/docs は英語のみです。

EPGStation version 1.6.5で動作しない

EPGStationで新たに「/api/docs」をチェックするようになったため、動作しなくなったようです。
EPGStation側でのlogは

[INFO] system - wait mirakurun
[INFO] system - wait mirakurun

mirakcでは

INFO  actix_web::middleware::logger > - "GET /api/docs HTTP/1.1" 404 38 "-" "EPGStation/1.6.5 MirakurunClient/2.14.0 Node/v10.19.0 (linux)" 0.000110
DEBUG actix_web::middleware::logger > Error in response: Os { code: 2, kind: NotFound, message: "No such file or directory" }

となっています。

Change the design regarding filters

  • Reorganize filter types
    • Remove the tuner-filter
    • Change the insertion point of the pre-filter
    • Introduce the decode-filter
    • Introduce pre-filters and post-filters
  • New mechanism to enable and disable filters

mirakc-arib sync-clocksが一部CSチャンネルで動作しない

recpt1での実行例ですが、チャンネル番号にCSのND6とND16を指定した場合、うまく動かないようです。

ND2を指定した場合

$ recpt1 CS2 - - 2>/dev/null | MIRAKC_ARIB_LOG=debug mirakc-arib sync-clocks
[2020-02-09 10:20:32.763] [sync-clocks] [info] Read packets from STDIN...
[2020-02-09 10:20:32.763] [sync-clocks] [info] --sids SIDs:
[2020-02-09 10:20:32.763] [sync-clocks] [info] --xsids SIDs:
[2020-02-09 10:20:32.763] [sync-clocks] [info] Feed packets...
[2020-02-09 10:20:33.043] [sync-clocks] [debug] Demux SDT
[2020-02-09 10:20:33.324] [sync-clocks] [debug] Demux PMT#040D for SID#0128 ServiceType(01)
[2020-02-09 10:20:33.324] [sync-clocks] [debug] Demux PMT#040F for SID#012A ServiceType(01)
[2020-02-09 10:20:33.324] [sync-clocks] [debug] Demux PMT#040E for SID#012B ServiceType(01)
[2020-02-09 10:20:33.324] [sync-clocks] [debug] Demux PMT#040C for SID#0153 ServiceType(01)
[2020-02-09 10:20:33.374] [sync-clocks] [debug] PCR#0A0C for SID#0153
[2020-02-09 10:20:33.374] [sync-clocks] [debug] PCR#0A0E for SID#012B
[2020-02-09 10:20:33.374] [sync-clocks] [debug] PCR#0A0D for SID#0128
[2020-02-09 10:20:33.374] [sync-clocks] [debug] PCR#0A0F for SID#012A
[2020-02-09 10:20:33.374] [sync-clocks] [debug] Demux TOT
[2020-02-09 10:20:34.974] [sync-clocks] [info] Time: 2020/02/09 19:20:35.000
[2020-02-09 10:20:34.974] [sync-clocks] [info] PCR#0A0C: 14CAF3D13A2 (14:42:01.079)
[2020-02-09 10:20:35.006] [sync-clocks] [info] PCR#0A0D: 14CE892E3E0 (14:42:36.706)
[2020-02-09 10:20:35.007] [sync-clocks] [info] PCR#0A0F: 14E11354324 (14:45:41.028)
[2020-02-09 10:20:35.007] [sync-clocks] [info] PCR#0A0E: 14DC53EFAB4 (14:44:53.827)
[{"nid":6,"tsid":24608,"sid":296,"clock":{"pcr":1429831082976,"time":1581243635000}},{"nid":6,"tsid":24608,"sid":298,"clock":{"pcr":1434807780132,"time":1581243635000}},{"nid":6,"tsid":24608,"sid":299,"clock":{"pcr":1433533348532,"time":1581243635000}},{"nid":6,"tsid":24608,"sid":339,"clock":{"pcr":1428869157794,"time":1581243635000}}]
[2020-02-09 10:20:35.008] [sync-clocks] [info] Ended to feed packets successfully

ND6を指定した場合(NG)

$ recpt1 CS6 - - 2>/dev/null | MIRAKC_ARIB_LOG=debug mirakc-arib sync-clocks
[2020-02-09 10:20:12.610] [sync-clocks] [info] Read packets from STDIN...
[2020-02-09 10:20:12.610] [sync-clocks] [info] --sids SIDs:
[2020-02-09 10:20:12.610] [sync-clocks] [info] --xsids SIDs:
[2020-02-09 10:20:12.610] [sync-clocks] [info] Feed packets...
[2020-02-09 10:20:12.965] [sync-clocks] [debug] Demux SDT
[2020-02-09 10:20:14.314] [sync-clocks] [debug] Demux PMT#0404 for SID#0126 ServiceType(01)
[2020-02-09 10:20:14.314] [sync-clocks] [debug] Demux PMT#0402 for SID#0144 ServiceType(01)
[2020-02-09 10:20:14.314] [sync-clocks] [debug] Demux PMT#0406 for SID#0149 ServiceType(01)
[2020-02-09 10:20:14.314] [sync-clocks] [debug] Demux PMT#0403 for SID#014B ServiceType(01)
[2020-02-09 10:20:14.314] [sync-clocks] [debug] Demux PMT#0407 for SID#0154 ServiceType(01)
[2020-02-09 10:20:14.314] [sync-clocks] [debug] Demux PMT#0408 for SID#0155 ServiceType(01)
[2020-02-09 10:20:14.314] [sync-clocks] [debug] Demux PMT#0405 for SID#0162 ServiceType(01)
[2020-02-09 10:20:14.314] [sync-clocks] [debug] Demux PMT#0401 for SID#016B ServiceType(01)
[2020-02-09 10:20:14.347] [sync-clocks] [debug] PCR#1008 for SID#0155
[2020-02-09 10:20:14.347] [sync-clocks] [debug] PCR#1007 for SID#0154
[2020-02-09 10:20:14.364] [sync-clocks] [debug] PCR#1002 for SID#0144
[2020-02-09 10:20:14.364] [sync-clocks] [debug] PCR#1003 for SID#014B
[2020-02-09 10:20:14.380] [sync-clocks] [debug] PCR#1005 for SID#0162
[2020-02-09 10:20:14.397] [sync-clocks] [debug] PCR#1006 for SID#0149
[2020-02-09 10:20:14.397] [sync-clocks] [debug] PCR#1004 for SID#0126
[2020-02-09 10:20:14.414] [sync-clocks] [debug] PCR#1001 for SID#016B
[2020-02-09 10:20:14.414] [sync-clocks] [debug] Demux TOT
[2020-02-09 10:20:17.313] [sync-clocks] [info] Time: 2020/02/09 19:20:17.000
[2020-02-09 10:20:17.313] [sync-clocks] [critical] Assertion failed: packet.hasPCR()
Aborted (core dumped)

A `sync-clocks` job never finishes

2021-04-27T12:03:00.004737984+09:00 DEBUG mirakc_core::command_util: tuner#2.1692: Spawned 8816: `recpt1 --device /dev/px4video2 13 - -`
2021-04-27T12:03:00.005135517+09:00  INFO mirakc_core::tuner: tuner#2.1692: Activated with GR/13
2021-04-27T12:03:00.005279306+09:00  INFO mirakc_core::tuner: tuner#2.1692.1: Subscribed: Job(clock-synchronizer) (priority=-1)
2021-04-27T12:03:00.005428928+09:00 DEBUG mirakc_core::broadcaster: tuner#2.1692: Started
2021-04-27T12:03:00.005552883+09:00 DEBUG mirakc_core::broadcaster: Subscribe with tuner#2.1692.1
2021-04-27T12:03:00.005689672+09:00  INFO mirakc_core::tuner: tuner#2.1692.1: Started streaming
2021-04-27T12:03:00.008122704+09:00 DEBUG mirakc_core::command_util: tuner#2.1692.1: Spawned 8817: `mirakc-arib sync-clocks --sids=23656`

EPGStation continues to request streaming even when the program has been canceled

As a result, EPGStation continues to create garbage recorded data until the program ends or the reservation for the program is removed...

Root cause

EPGStation processes a recording task in the following two steps:

  1. prepRecord requests streaming 15 seconds before the program starts. prepRecord awaits streaming data from Mirakurun/mirakc, and then calls doRecord.
  2. doRecord returns a promise for recording.

EPGStation stops recording if prepRecord fails in several times. However, EPGStation doesn't stop recording even when streaming in doRecord fails. Therefore, Mirakurun/mirakc have to make prepRecord fail if the program canceled.

Mirakurun doesn't send any data until the program starts. This makes prepRecord fail if the program canceled.

However, mirakc sends PAT packets before the program starts in order to avoid this issue in actix-web. Unfortunately, this workaround makes prepRecord always success.

EPG取得が終わらない

私の環境

uname -a
Linux raspberrypi 5.10.60-v7+ #1449 SMP Wed Aug 25 15:00:01 BST 2021 armv7l GNU/Linux

ラズパイ3+Raspberrypi OS bullseye +US-3POUTの構成です。勿論Docker使ってます。
問題
EPGの取得が始まってから半日以上経過したあと、api/programsをみたところなにもなかったのでissue書かせていただきます。
まず、現状のapi/tunersはこのような感じです
[{"index":0,"name":"US-3POUT","types":["GR","BS"],"command":"recfsusb2n BS09_1 - -","pid":229,"users":[{"id":"job:clock-synchronizer","priority":-1}],"isAvailable":true,"isRemote":false,"isFree":false,"isUsing":true,"isFault":false}]
恐らく関係しているであろうログは

mirakc        | 2021-09-14T17:28:30.707906+09:00  INFO mirakc_core::tuner: tuner#0: Activate for BS/BS09_1
mirakc        | 2021-09-14T17:28:30.711591+09:00  INFO mirakc_core::tuner: tuner#0.71: Activated with BS/BS09_1
mirakc        | 2021-09-14T17:28:30.711753+09:00  INFO mirakc_core::tuner: tuner#0.71.1: Subscribed: Job(clock-synchronizer) (priority=-1)
mirakc        | 2021-09-14T17:28:30.711960+09:00  INFO mirakc_core::tuner: tuner#0.71.1: Started streaming
mirakc        | 2021-09-14T17:30:21.514396+09:00  INFO actix_web::middleware::logger: 192.168.80.5:42442 "GET /api/services HTTP/1.1" 200 11159 "-" "epgstation/2.6.11 MirakurunClient/3.9.0-beta.1 Node/v16.7.0 (linux)" 0.001189
mirakc        | 2021-09-14T17:30:22.151711+09:00  INFO actix_web::middleware::logger: 192.168.80.5:42446 "GET /api/programs HTTP/1.1" 200 2 "-" "epgstation/2.6.11 MirakurunClient/3.9.0-beta.1 Node/v16.7.0 (linux)" 0.000330
epgstation_1  | [2021-09-14T17:30:22.188] [INFO] system - all reservation update start
epgstation_1  | [2021-09-14T17:30:22.208] [INFO] system - all reservation update finish
mirakc        | 2021-09-14T17:37:00.000549+09:00  WARN mirakc_core::job: update-schedules: Already running, skip
mirakc        | 2021-09-14T17:37:00.001391+09:00  INFO mirakc_core::job: update-schedules: Scheduled for 2021-09-14 18:07:00 +09:00

BS09_1のEPG取得のプロセスがそのまま残っているように見えます。

衛星が全く受信できない

user@TV:~/tv-recorder$ uname -a
Linux TV 5.4.0-72-generic #80-Ubuntu SMP Mon Apr 12 17:35:00 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
チューナ:DD MaxM4
ドライバ:https://github.com/DigitalDevices/dddvb/archive/0.9.37.zip

主題の通り、今回のmirakc の Updateから衛星がチャンネルスキャンもなにもできなくなりました。
地上波はチューナの仕様通り問題なく動作しております。

epg:
cache-dir: /var/lib/mirakc/epg

server:
addrs:
- http: 0.0.0.0:40772
- unix: /var/run/mirakurun/mirakurun.sock

channels:

  • name: 'NHKEテレ1大阪'
    type: 'GR'
    channel: '13'

  • name: 'NHKBS1101'
    type: 'BS'
    channel: 'BS15_0'
    services: [101]

tuners:

  • name: MaxM4_0
    types:
    • GR
    • BS
    • CS
      command: dvbv5-zap -a 0 -c /etc/mirakc/dvbv5_channels_isdb.conf -r -P {{{channel}}} -o -

filters:
decode-filter:
command: arib-b25-stream-test

コンソール:
mirakc | 2021-04-22T18:02:32.560528802+09:00 DEBUG mirakc_core::command_util: dvbv5-zap#125: ERROR frequency 1317.84MHz (tune freq 1317.84MHz) is out of LNBf Japan 110BS/CS LNBf range

ご確認を願えますでしょうか?
よろしくおねがいします

Implement web API for monitoring

After #15, implement web API for monitoring internal statuses like below:

  • Status of each TS stream pipeline
  • Status of background jobs

It's better to push events to monitor clients instead of pulling from monitor clients.

This web API is very useful in debugging point of view.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.