Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 21 Nov 2017, 06:37
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Modi: a mini kodi
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [10 Posts]  
Author Message
sc0ttman


Joined: 16 Sep 2009
Posts: 2548
Location: UK

PostPosted: Fri 15 Sep 2017, 08:12    Post subject:  Modi: a mini kodi
Subject description: ... just an idea ..for now..
 

Modi - a mini Kodi

If we Puppy users were to create a lightweight Kodi alternative, what could we use?

Who wouldn't want a tiny yet awesome media centre?

I'm thinking super lightweight, helps you browse local media library, and get and browse
a list of shows, movies, etc from online.. Watch streams by streaming the torrent itself..

Something like:

Code:
Modi 0.1.2

MAIN MENU

1. My Media Library
2. Browse Movies
3. Browse TV Shows
4. Browse Radio Stations
5. Watch Live TV (TV Tuner required)
6. Search Movies
7. Search TV
8. Settings
9. Quit


First, a local library of media files should be easy enough to manage/collate..

Then build some big lists of radio and podcast streams..

Then just download big selection of torrents (the torrent files only) and make a local,
categorised, browsable folder structure of them..

(Or... Surfraw IMDB could also be used to browse or search for Movies/TV, then
we can use other cmds to find torrents/streams for them..)

Torrents can be played straight in VLC, Mplayer, Smplayer, Mpv - we just need to find them, and stream them..

Tools we could use (backend):

1. For browsing/searching meta info of many TV shows, movies, actors, etc:

Fill /usr/share/modi/ with {TV,Movies,Sports} dirs, and each of them containing category dirs (genres, 'best-rated',
'newest', etc), then fill those dirs with loads of torrent files downloaded from various sites..

These local torrent files can then be browsed like any local file listings/playlist, chosen, parsed for meta info (surfraw imdb
could be used at this point to get nice meta info about the Movie/Film/thing), and then played in a media player..
..Just as if they were local .mp4 files (see point 2.)..

Optionally, for user searches, Surfraw (or other) could search piratebay, YouTube, etc: http://surfraw.alioth.debian.org/#elvilist

For nice popup dialog before you playt the thing, preview/poster images (or even trailers), the local torrent files
in the current dir could be parsed/scraped and any images or videos downloaded to a tmp dir automatically...
(`transmission-show my-file.torrent` will list contents)

2. For streaming torrent to media player,

- TorrentStream (a Node library to stream torrents): https://github.com/mafintosh/torrent-stream

- PeerFlix (a CLI frontend for torrent-stream): https://github.com/mafintosh/peerflix

- GoPeerflix (Golang port): https://github.com/Sioro-Neoku/go-peerflix

- TorrentFlix (a wrapper around PeerFlix for easier searching): https://github.com/ItzBlitz98/torrentflix

Torrentflix works nicely for me in command line..


3. For streaming live TV:

- VLC and Mplayer can handle this, and other dedicated tools:

- ArchWiki to the rescue: https://wiki.archlinux.org/index.php/DVB-T

(says ffmped +tzap can do it, also has a CLI channel browser Smile )

- DVB-T in VLC: https://forum.videolan.org/viewtopic.php?t=72118

- DVB5, example: Record live TV to a file, using dvbv5
Code:
dvbv5-zap --lna=1 -c path/to/channels.conf "BBC ONE HD" -r -o path/to/record.mts


- TV Tuner linux setup: http://billauer.co.il/blog/2017/02/linux-dvb-israel-digital-tv/

Cli tool for setting up TV: https://github.com/lightful/DVBdirect/

No idea about this stuff...

4. Unlike Kodi, the UI could be simple and effective:

- Easy main menu creation, easily choose options, with fuzzy search: Pick: https://github.com/calleerlandsson/pick

- Or a good old ncurses dialog, or custom TPUT based menu..

- Or combine them..

Other notes:

Aria2 (aria2c) can download torrents and view their contents before download, etc..

The media library can just be a file browser/chooser, to case statement,
which decides what to to based on $file mimetype, extension or contents.

- choosing media files plays them right away
- choosing torrents will stream them
- choosing .m3u will load up the playlist as a menu, with PLAY ALL as 1st option ..
- etc

Other sources of playable media:

- the big torrent sites
- youtube
- soundcloud
- radio places (last.fm or something...?)
- lesser known, specialist torrent sites (old TV, classic movies, sports, etc)
- archive.org has lots of stuff too
- old, public domain radio, TV at various places

Need ways to parse/search it all though...


Not so lightweight:

Using Node/Npm backend (like Peerflix) and a web based UI to do it all in the browser: https://webtorrent.io/docs

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search

Last edited by sc0ttman on Fri 15 Sep 2017, 10:50; edited 2 times in total
Back to top
View user's profile Send private message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2548
Location: UK

PostPosted: Fri 15 Sep 2017, 09:10    Post subject:  

In short the very simplest version of this would be:

1. Setup and config:

a. Build radio/online tv stream lists (like pMusic, VLC-GTK, etc)

b. Grab lots (and lots) of torrent files, put them into a categorised folder like

/usr/share/modi/torrents/movies/Latest/
/usr/share/modi/torrents/movies/HD/
/usr/share/modi/torrents/movies/DVD-Releases/
/usr/share/modi/torrents/movies/Genres/*/
..etc..
/usr/share/modi/torrents/TV/Latest-Episodes/
/usr/share/modi/torrents/TV/Genres/*
.. blah..

Then to use it:

1. A ncurses (dialog) based main menu for browsing local files and the torrent dirs above:

a. file browser for the torrents and local media files

b. the list channels shell script from Arch wiki to list TV channels (if TV tuner)

c. maybe if no TV tuner, a "Live TV" streams list like in VLC-GTK (but they're a PITA to maintain.. unless we stick to only a small list of reliable sources by default)

d. a modi-player script, with a big case statement to exec different commands, depending on what was sent to it and whats installed


Dependencies:

vlc, mplayer, mpv, dialog, Go-PeerFlix

(If using regular PeerFlix, then node and npm too!)

Optional Dependencies:

the DVB-T (tv tuner) stuff

transmission-cli and surfraw (could grab extra info for a nice preview when you choose X from the list, before you play it ... could show title, director, actors, play trailer option, etc)

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search

Last edited by sc0ttman on Fri 15 Sep 2017, 10:08; edited 2 times in total
Back to top
View user's profile Send private message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2548
Location: UK

PostPosted: Fri 15 Sep 2017, 09:21    Post subject:  

Also see:

https://github.com/johang/btfs

With BTFS, you can mount any .torrent file or magnet link and then use it as any read-only directory in your file tree.
The contents of the files will be downloaded on-demand as they are read by applications. Tools like ls, cat and cp
works as expected. Applications like vlc and mplayer can also work without changes.

... could use this to properly browse the torrent files (filtering out crap before showing contents) in Modi menus..

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send private message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2548
Location: UK

PostPosted: Fri 15 Sep 2017, 10:23    Post subject:  

Could the builtin CLI cmds and progs in Puppy be used for the following? (I have no idea)

* Share the thing you're playing across your local network:
- create a URL like $dunno://192.168.0.5/modi/something
- that can be played by another client on the network in their VLC, mplayer, etc..
- ..something like this: https://github.com/mychris/xbmc-command
- ..networked media server people would know more about it

* Scraping good meta data of movies/tv/radio/torrents/etc:
- curl/wget/aria2 snippets, shell funcs, github gists, etc
- any other builtin tools or shell funcs you know of?


...I think all the core features should be fairly easy, even some of the cooler
ones (nice meta data, share on network, etc) could be easy - if we can collate
some nice snippets and funcs from the interwebz on here... (I'm gonna have a
search around...)

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send private message 
dancytron

Joined: 18 Jul 2012
Posts: 938

PostPosted: Fri 15 Sep 2017, 14:30    Post subject:  

This is a good idea.

My random ideas.

It seems to me, that at the base of this (like KODI), would be a file manager that works well from 10 feet way with a remote control. By work with a remote control, what I really mean is to be able to browse anywhere and open files with just the up arrow, down arrow, and enter key.

Get that set up, with the correct file associations, and you'd be part of the way there. Then the other functions could be added into that base, maybe even as some sort of plug in.

The main thing that a file manager needs to be able to browse anywhere with just the up arrow, down arrow, and enter key is a little thing. You needs to be able to browse to the parent directory. Of the common file managers, the only one that does this is XFE. I've used XFE to create a fairly lame version of this by turning off everything but the main file window, setting it for detailed view, making the font giant and associating the video files with mpv.

Anyway, just random thoughts.
Back to top
View user's profile Send private message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2548
Location: UK

PostPosted: Fri 15 Sep 2017, 17:53    Post subject:  

dancytron wrote:
It seems to me, that at the base of this (like KODI), would be a file manager that works well from 10 feet way with a remote control [browse anywhere and open files with just the up arrow, down arrow, and enter key.]

You *could* simply setup ranger to stream torrent files, but that would be cheating..

Ranger is a lovely command line file manager, with miller columns (3 panes, with a parent | current | preview layout, like Finder on Mac)..

You could edit its config files in ~/.config/ranger/, and in the MIME and file-type handling bit, make it load Peerflix for torrent files..

Not sure if it would work though, ranger can be fiddly and annoying, and behaves different in each terminal you use.. Mlterm works best for me.

dancytron wrote:
Get that set up, with the correct file associations, and you'd be part of the way there. Then the other functions could be added into that base, maybe even as some sort of plug in.
....
Anyway, just random thoughts.

For plugins, I think I would have shell scripts in /usr/lib/modo/plugins/myplugin.sh, with each one needing a setup() func which gets called when Modi loads..

All good thoughts.. Made me remember that ranger could be a really quick hacky solution..

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send private message 
battleshooter


Joined: 14 May 2008
Posts: 1352
Location: Australia

PostPosted: Sun 17 Sep 2017, 00:12    Post subject:  

Man Scott, you come up with some amazing ideas. I've been following along some of your other threads and you seem to be doing some serious brainstorming. Wish I could help with the implementation, but just wanted to let you know I think they're pretty cool
_________________
LMMS 1.0.2, Ardour 3.5.389, Kdenlive 0.9.8
Back to top
View user's profile Send private message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2548
Location: UK

PostPosted: Sun 17 Sep 2017, 07:12    Post subject:  

battleshooter wrote:
Man Scott, you come up with some amazing ideas. I've been following along some of your other threads and you seem to be doing some serious brainstorming. Wish I could help with the implementation, but just wanted to let you know I think they're pretty cool

Yeah lol, "ideas" being the key word... But thanks Smile Mate, I guarantee I'm about as capable of actually making these things as anyone else...

I was just reading about DNLA ..Seen the word, no idea what it is/does/etc..
Apparently it lets you search out and play media across your whole local network..
Sounds cool, I think .. Seems like a good fit for this Modi thing ..

Will find a simplest ever DNLA setup, then adapt it... Baby steps!


..As for helping, there should be lots of code snippets around this and the Arch forum,
for getting radio streams setup.. would be great to link to them here..

Also, good, reliable, long lasting linsk to TV streams (likely they will be mms://**, or rtmpdump cmds) anyone can find...

Also snippets and funcs on GitHub Gist, but there's a lot of crap to filter out on there ...

.... And I still have no idea how to grab a bunch of torrent files...
Lol, the very first step.. Embarassed

But I bet if we Puppy users could put our minds to it, we could create a great, tiny
media centre (ncurses/dialog based probably) in less than 1mb that gave
users access to **** loads of media, right out of the box...

.. Like a tiny Kodi Cool

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search

Last edited by sc0ttman on Sun 17 Sep 2017, 10:52; edited 1 time in total
Back to top
View user's profile Send private message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2548
Location: UK

PostPosted: Sun 17 Sep 2017, 07:22    Post subject:  

So, I'm hoping for suggestions for good, lightweight CLI tools and code snippets that can:

* batch download .torrent files (just the .torrent files themselves)
* fetch playlists, radio stations, IMDB meta info
* play various streams in vlc/mplayer/mpv
* stream torrents to media player
* share media across the network
* find torrent (magnet link) from film/programme name
* browsable DVB-T (tv tuner) channel lists
* playing live TV in media players

.. I'm looking around, found a bunch of things, but most web scrapers require Python (plus many deps), and many media streamers requires Node/Npm (plus a bunch of deps) ...

Plus it' a real shame, the open movie database (omdb) only recently started requiring
a API key to access their movie data ... You snooze, you lose Rolling Eyes

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send private message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2548
Location: UK

PostPosted: Sun 17 Sep 2017, 09:01    Post subject:  

Just for reference.. for later:

Tools

Live TV:

* StreamLink, watch popular streams in media player (Python tool): https://wiki.archlinux.org/index.php/Streamlink or https://github.com/streamlink/streamlink

* StreamLinks list of supported stream sources: https://streamlink.github.io/plugin_matrix.html

* TV Overlord (Python3, a semi-automatic CLI tool to download & manage TV shows from newsgroups or bittorent (nzb files or magnet links): https://github.com/8cylinder/tv-overlord

Looks like StreamLink might be very useful for playing live TV streams!


Magnet link, torrent and URL scrapers:

* torrench (Python3, very new, active): https://github.com/kryptxy/torrench and the forum

* yturl (Python, get the media URL from the youtube webpage URL): https://github.com/cdown/yturl

* Scrape Kickass (Python script): https://github.com/pantuts/asskick

* KickassGet (Python): https://github.com/jingnanshi/kickass-get

* PirateGet (Python, search pirate bay from command-line)https://github.com/vikstrous/pirate-get

* Magnet crawler (Python): https://github.com/upggr/myfilesearch.org

* Showdown (Python script, download latest TV episodes by typing name of show): https://github.com/MayankPratap/show-down

..Torrench looks great.. See homepage almost ideal..


Creating torrent files:

* Magnet2torrent (Python script): https://github.com/LordAro/Magnet2Torrent



Guides and Tutorials:

Torrent things:

* Get torrent file from magnet link (Aria2): https://kba49.wordpress.com/2013/02/05/retrieve-torrent-file-from-magnet-link-on-the-command-line/

* Scraping piratebay with wget: https://tflynnhk.wordpress.com/2014/01/04/html-scraping-thepiratebay/

* Trackers setup, SSL, certs, and rTorrent: https://forums.gentoo.org/viewtopic-t-710876-start-0.html

* Aria2 @ Arch Wiki: https://wiki.archlinux.org/index.php/aria2


Networked media:

* Streaming Media (general): https://wiki.archlinux.org/index.php/Streaming_media

* Networking stream video using FFmpeg/FFServer: https://wiki.archlinux.org/index.php/FFmpeg#FFserver

* DNLA: ReadyMedia (lightweight DNLA thing): https://wiki.archlinux.org/index.php/ReadyMedia

* DNLA: Fork of miniDNLA that re-scans external drives much faster (adds meta data files next to the media files): https://github.com/66Ton99/minidlna-fastscan

* UPnP: Easily share media across network (UPnP): https://wiki.archlinux.org/index.php/UShare


Live TV / DVB-T stuff:

* Streaming Twitch (rtmp, ffmpeg, various examples): https://wiki.archlinux.org/index.php/Streaming_to_twitch.tv

* DVB-T (tv tuner stuff): https://wiki.archlinux.org/index.php/DVB-T


Other stuff:

* A decent Inotify tutorial (monitoring files): https://www.ibm.com/developerworks/linux/library/l-ubuntu-inotify/index.html

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [10 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1946s ][ Queries: 12 (0.0109s) ][ GZIP on ]