[Service Discovery] mediathek (ARD, ZDF, ...)

Discuss your Lua playlist, album art and interface scripts.
roland1
Blank Cone
Blank Cone
Posts: 44
Joined: 01 May 2014 16:49

[Service Discovery] mediathek (ARD, ZDF, ...)

Postby roland1 » 17 Jun 2018 19:16

https://www.opendesktop.org/p/1241457/
Access to online streaming offering of public german TV channels ARD, ZDF, NDR, ...
Organized via persistent queries fully manipulated through the search field.
Uses the database of the MediathekView project https://mediathekview.de/

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: [Service Discovery] mediathek (ARD, ZDF, ...)

Postby Jean-Baptiste Kempf » 17 Jun 2018 22:28

Nice.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Peripatus
New Cone
New Cone
Posts: 2
Joined: 22 Nov 2018 10:40

Re: [Service Discovery] mediathek (ARD, ZDF, ...)

Postby Peripatus » 22 Nov 2018 11:15

Hello roland1,

This looks very promising, but I don't get it to work. I already use MediathekView, but on a low-resource system directly using VLC might be snappier.

First tried it on our 'television computer' (connected to tv screen) running 32bit BunsenLabs Helium (~Debian 9); then on my main computer running 64bit Manjaro with 4.9 kernel. Both using VLC v3.0.3. The result seems the same for both systems:

* 'mediathek' does show in VLC's 'Internet' list
* when clicking on that, a loading icon appears (pie-chart like) for a while in the box where the program list should appear; after some 20 seconds it stops 'turning' and nothing else appears in the box; when moving the mouse cursor over to the box, the icon disappears, and nothing else happens
* meanwhile the files mediathek.database (144.2 Mb) and mediathek.log (421 bytes) are created in ~/.local/share/vlc, with read/write access (the ~/.local/share/vlc folder has r/w access too)
* the content of the .database file looks sensible (all the expected program info); the .log file says:

Code: Select all

[2018-11-22-10-36-43] MESG: header=Sender Thema Titel Datum Zeit Dauer Größe [MB] Beschreibung Url Website Url Untertitel Url RTMP Url Klein Url RTMP Klein Url HD Url RTMP HD DatumL Url History Geo neu [2018-11-22-10-36-43] MESG: arglist=now,playcount,Sender,Thema,Titel,Datum,Zeit,Dauer,Gr_e_MB_,Beschreibung,Url,Website,Url_Untertitel,Url_RTMP,Url_Klein,Url_RTMP_Klein,Url_HD,Url_RTMP_HD,DatumL,Url_History,Geo,neu
So at first sight it looks like the database may be installed correctly, but VLC somehow can't handle it? I thought there might be a RAM/CPU bottleneck, but checking the system monitor, it doesn't really look like it (only a moderate and brief CPU spike)...

Any ideas, things to try?

Many thanks!

roland1
Blank Cone
Blank Cone
Posts: 44
Joined: 01 May 2014 16:49

Re: [Service Discovery] mediathek (ARD, ZDF, ...)

Postby roland1 » 22 Nov 2018 20:05

Hello Peripatus,
top-right to the
box where the program list should appear
there is (or imho should be) a search-field ready to consume keyboard input.
Type in Tatort followed by an Enter.
(In theory) Then a node is created in the box and will be populated (took 40secs here).
In case You were at that point already, kill vlc and do (in a shell)

Code: Select all

cd ~/.local/share/vlc || exit 1 cp mediathek.state mediathek.state~ printf '%s\t%s\n' Tatort 'Titel:lower():find("tatort", 1, true)' >> mediathek.state
and try vlc again. Feedback is welcome.
regards

Peripatus
New Cone
New Cone
Posts: 2
Joined: 22 Nov 2018 10:40

Re: [Service Discovery] mediathek (ARD, ZDF, ...)

Postby Peripatus » 23 Nov 2018 17:50

Thank you, roland1. Following your instructions, I got to work! Awesome stuff.

(It does not only work for Tatort but also for Yakari ;^) And for "Scientia Titel:lower():find("science", 1, true) or Titel:lower():find("wissenschaft", 1, true) or Beschreibung:lower():find("wissenschaft", 1, true) or Beschreibung:lower():find("science", 1, true)".)

I should have read the instructions on opendesktop.org more carefully. Perhaps it is useful to add a line there, warning that users should not expect to see the whole list of programs, unlike in MediathekView? Maybe it's just me, but the Titel etc. instructions looked a bit complicated, so I postponed them, wrongly assuming that they'd apply as a filter after a list of all programs would show.

One more remark: it looks like nodes are created when typing in the text box even without hitting Enter. As I was experimenting with the lua syntax, this unintentionally created a bunch of bogus nodes. It was easy to remove them manually using the mediathek.state file you mentioned -- but then the user needs to be aware of that file. If it is possible to make the script require an Enter before a node is added, that might be more convenient.

Once again, many thanks for making this available!

roland1
Blank Cone
Blank Cone
Posts: 44
Joined: 01 May 2014 16:49

Re: [Service Discovery] mediathek (ARD, ZDF, ...)

Postby roland1 » 24 Nov 2018 16:14

I am glad that You got it working.
Instruction-wise there is potential for improvement, but, more surprisingly (to me)
nodes are created when typing in the text box even without hitting Enter.
There is no (obvious (after a quick test)) way to decide whether a given query is "spontanous" ;(
So, maybe mediathek should ignore queries not ending in "?".
"Tato" would be ignored, "Tatort?" would be processed.
Thanks for reporting and feedback
regards

meyertet
New Cone
New Cone
Posts: 2
Joined: 05 Dec 2010 20:14

Re: [Service Discovery] mediathek (ARD, ZDF, ...)

Postby meyertet » 20 Jan 2019 14:34

Hi there,

i am trying to get the mediathek plug in working on a WIndows 10 machine. I copied the mediathek.lua in the direrctory

C:\Program Files\VideoLAN\VLC\lua\extensions\mediathek.lua

and restartet VLC Player 3.0.2. The mediathek plug in shows up under "Ansicht" but not in the play list / Wiedergabeliste. Probably only a small thing i missed - can anybody help ?

Thanx in advance

PS Can somebody tell me how to upload an image / or two :)

Cheers
Tobias

roland1
Blank Cone
Blank Cone
Posts: 44
Joined: 01 May 2014 16:49

Re: [Service Discovery] mediathek (ARD, ZDF, ...)

Postby roland1 » 20 Jan 2019 22:52

Hi,
The path would have been
C:\Program Files\VideoLAN\VLC\lua\sd\mediathek.lua
but vlc MUST also have installed a module to decompress LZMA (afaik).
My windows test installation didn't provide it, so, mediathek is untested on windows.
Feedback is welcome.
regards

nierewa
New Cone
New Cone
Posts: 4
Joined: 31 May 2021 13:34

Re: [Service Discovery] mediathek (ARD, ZDF, ...)

Postby nierewa » 31 May 2021 13:45

Hi,
great work :D
I love it.

I have to make a folder lus\sd in AppData\Roaming\VLC
then the mediathek plug in shows up under play list / Wiedergabeliste.

Copied only in program folder\lua did not work.

Had the same problem like Peripatus.
The Database is there but it can not be decompressed.

Some questions:
1. Is it possible to show all entriey without using the search field?

2. You wrote
vlc MUST also have installed a module to decompress LZMA (afaik)
Where can I get some? At this time I decrompressed the mediathek.database.xz with 7-zip manually.

3. Can I stream the mediathek Video to TV?

roland1
Blank Cone
Blank Cone
Posts: 44
Joined: 01 May 2014 16:49

Re: [Service Discovery] mediathek (ARD, ZDF, ...)

Postby roland1 » 31 May 2021 20:51

Hi,
ad 1)
There are atm 462998 entries, nevertheless one can define a filter rule to match them...
ad 2)
mediathek is tested to work under windows 7 x64 with 7zip installed into the default/standard directory (s.t. mediathek can find it). 7zip is only necessary if the LZMA module is missing to vlc, which was is the case on my windows system. I guess, vlc must be compiled with this module, at least, I havent found a way to get it.

mediathek also has a mediathek.log file next to the database, maybe there is some error msg? To get a meaningfull error msg, rename the database file(s?) and start vlc and mediathek (the log is overwritten each run). Btw which OS are You running?
ad 3)
Depends on the TV.

nierewa
New Cone
New Cone
Posts: 4
Joined: 31 May 2021 13:34

Re: [Service Discovery] mediathek (ARD, ZDF, ...)

Postby nierewa » 02 Jun 2021 09:05

I guess, vlc must be compiled with this module, at least, I havent found a way to get it.
So I've to use 7-zip
Depends on the TV.
It's a Samsung UE40F6500SSXZG.
I don't want to activate Smart Hub.


Return to “Scripting VLC in lua”

Who is online

Users browsing this forum: No registered users and 22 guests