ce-clare
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Seed TV Development Note ## Overview Seed TV(previous name: "TVHK") is a TV set-top-box project aim to create a video platform for Hong Konger. It contains several essential components: - **Kodi**, an open-source media center application with add-on capability, with some addons developed: - **plugin.video.tvhk** addon, read metadata from API server and display them - **plugin.video.peertube** player addon(fork from an open-source project) - **plugin.video.youtube** player addon(temp-ly disabled) - **script.module.libtorrent** provide python-libtorrent (cpython) binding as an Kodi addon - **Aura-tvhk** skin, modified version of `Aura` - **Peertube**, a open-source video platform base on `WebTorrent` - **CMS**, contains several parts: - **API server** for Kodi to retrieve video metadata - **Crawler** to collect video metadata from Peertube&Youtube(and manipulate them a bit) - **Crawler management console** to config the crawler - ~~**Device management console** Enroll new hardward ID and integrate with Ad system.~~**(NO progress, need help!)** - ~~**Youtube Downloader**, a managed youtube to peertube sync tools~~ **(NO progress, need help!)** - ~~**Ad management system**, to management and provide ad to Kodi~~ **(NO progress, need help!)** - **CoreELEC**, a just enough Linux for Kodi - Some depolyment/helper tools: - **KPM**, standalone Kodi package manager - **BASH setup script**, to prepare Kodi+addons+CoreELEC. Might add ability to pack Mac/Android/Windows app later. The customized Kodi app (lightly modified Kodi+addons) is capable to release a standalone version for Mac/Android/Windows. Which might explore a bit later All sources can be found from here: http://github.com/tvhk-dev ## Kodi ### Kodi it self Nothing really need to modified on Kodi currently. ### plugin.video.tvhk What it actually do? - Display channels/playlists/videos in Kodi - Trigger playback, by calling `plugin.video.peertube`, or fallback to `plugin.video.youtube` if needed. - Data from API server, cache in local DB, uni-directional sync periodically - Pass parameter to `skin.Aura-tvhk` for displaying ad Bugs: - Too many TODO: - Merge old code to add back live capability from youtube - Handle Kodi player event(like pause, next etc.) - Merge old code to implement youtube fallback - Many more ### plugin.video.peertube What it actually do? - Play peertube video in Kodi - Original from [StCyr/plugin.video.peertube](https://framagit.org/StCyr/plugin.video.peertube) - Added to play playlist functionality Bugs: - This plugin simply download the video to temp folder via `libtorrent`(a standard BitTorrent). It doesn't delete/purge the temp folder. Which may lead the storage getting full. - The plugin code launch mutliple libtorrent instances simultaneously and start downloading from all of them when playing a playlist. That may slow down the network awfully. And the libtorrent instances **won't** stop even after user completely stop the playlist. TODO: - Fix the bug above ### plugin.video.youtube What it actually do? - Play youtube video in Kodi - Original from [jdf76/plugin.video.youtube](https://github.com/jdf76/plugin.video.youtube) Bugs: - API key / API cost issue TODO: - TBC ### script.module.libtorrent What it actually do? - A python-libtorrent binding binary required by `plugin.video.peertube` - Auto detect and switch binaries on OSes (Linux or Mac) and architecture (x86-64 or ARM) - Packed in Kodi addon format, capable to be a dependency for any other addon Bugs: - Not yet found TODO: - Add Windows platfrom and x86-32 architecture - We did manaually resolved all dependencies in a very hacky way. It's not maintain-able and not upgrade-able. We need some way to sort it out. ### skin.aura-tvhk What it actually do? - Fork from skin.aura - Disabled user-configurable home screen outlook - Included a home screen outlook we want - Added a ad display view in video-loading-screen - Adjusted some minor size parameters - Display advertisement on video loading screen Bugs: - Not yet found TODO: - Add device activation dialog on first boot, collect some information(like district, home/shop etc.) and use OAuth(like google account) to login. - Update loading screen, display advertisement according to hardware ID - ## Peertube What it actually do? - A P2P, `Webtorrent` based video platform, BitTorrent compatible. - Youtube-like user experience. Easy to adapt/drop-in-replace. - Self-hosted, not a single cloud platform. ## CMS The CMS is now made from several dispersed parts. We need to combine them together (with one CMS framework?) someday. Here are the parts below: ### API Server What it actually do? - Provide channels/playlists/videos metadata and some display parameter needed by `plugin.video.tvhk` - Capable to filter data with last update time, for differential sync - Data from database Bugs: - Currently implemented via raw PHP and simple ORM, doesn't do any API limitation and authencation etc. - Youtube and peertube code implemented separately. You need to `git checkout <branch>`.... - Differential filter is buggy, something it just throw all data TODO: - Adapt CMS with rate limit funcationality and hardware ID based authencation - Merge back youtube code so that youtube fallback will work - Despite time base filter, the API server should offload some metadata to CDN since they're static. Also implement gzip or any compression if possible. ### Crawler What it actually do? - Fetch channels/playlists/videos metadata from Peertube and Youtube, write to DB - Manipulate the metadata a little bit(like replace/add cover pic, description text etc.) - All channels/playlists/videos metadata rule store in config JSON file - Control display parameters via the config JSON file - The crawler eventually write display parameters into DB, which the API server will read them later - Currently wrote in NodeJS Bugs: - Similar to stuffs above, the youtube code is separate, need to merge into current peertube code - Poor performance, since we need to initial a lot of API call. TODO: - Might change to distributed mode(e.g. run parallelly across different channels) - Migrate to read config from CMS, instead of JSON ### Crawler management console What it actually do? - A HTML UI to manage the Crawler's config JSON file Bugs: - TBC TODO: - TBC ### Device management console What it actually do? - Enroll/management a new hardware - Authenticate a hardware - Keep user information - Idenify a hardware for Ad management system TODO: - **No progress!!** ### Youtube Downloader What it actually do? - Unidirectional sync video from youtube to peertube - Make it distributed/parllel if possible TODO: - **No progress!!** - Reference project(python): https://github.com/mister-monster/YouTube2PeerTube ### Ad management system What it actually do? - Provide ad to display and management them - Integrate with `device management console`, simply obtain some device information for stats - Provide CRM feature, like reach report etc. Bugs: - TBC TODO: - **No progress!!** - We prefer to find some open-source software instead of develop ourself ## CoreELEC What it actually do? - A just enough Linux tended to use as TVBox/Media Center. Bugs: - Can't modify splash screen TODO: - Make it clone-able/easy to spread - Add Bit-torrent seeding software on it - Write a tools(binary?) for OTA update ## Tools ### KPM What it actually do? - Kodi will resolve&install all dependencies while installing an addon, we made the exactly some functionality, but standalone and works even when Kodi is not running. This give us capability to provide OOBX(Open box experience). - Design for compile & pack procedure Bugs: - Some minor bugs, TBC TODO: - TBC ### BASH setup script What it actually do? - Compile / pack for several platform, either: - Pack all files needs by CoreElec - ~~Compile Mac app~~ (**no progress!!**) - ~~Compile Android app~~ (**no progress!!**)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully