Wayfarer e twitchTV
  • Butterfly
    Butterfly
    Posts: 92 from 2019/4/6
    I apologize if I have already written this question but I don't remember it.
    Wayfarer support is possible in the near future
    for TwitchTV?
    Can it be implemented?

    Thanks.

    Would be very nice :-)
  • »08.10.21 - 19:03
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 2513 from 2003/3/5
    From: Canada
    Nothing to implement here. The website most probably works, you would just need a 100GHz G5 to make it work reasonably well ;) It's a turd. As far as I can see it's trying to parse large data chunks via JavaScript, which takes so much CPU it does not even attempt to play anything.
  • »09.10.21 - 02:35
    Profile Visit Website
  • Just looking around
    wicknix
    Posts: 15 from 2020/12/1
    From: Wisconsin, USA
    I know this doesn't help for 'in browser' playback, but this works on 10.5.8 Leopard and PPC Linux on my machines:
    Code:
    youtube-dl -f 360p -o - https://twitch.tv/channel-name | ffplay -
    (or you can use mpv, vlc, etc (except mplayer) if you don't like ffplay) CPU use on a 1.67ghz Powerbook G4 averages 40-60% live streaming in 360p. Then connect your irc client to twitch to join the conversation. I haven't tried this on MorphOS yet though.

    twitch-chat-ppc-linux2-png.878759
    screenshot-480p-g4-png.880000




    [ Edited by wicknix 08.10.2021 - 23:15 ]
  • »09.10.21 - 05:05
    Profile Visit Website
  • MorphOS Developer
    jacadcaps
    Posts: 2513 from 2003/3/5
    From: Canada
    Sure, the stream is just MPEG-TS HLS which Wayfarer is perfectly capable of playing. Too bad the website appears to be trying to do the heavy lifting that the player should be doing in JavaScript…
  • »09.10.21 - 12:00
    Profile Visit Website
  • Butterfly
    Butterfly
    Posts: 92 from 2019/4/6
    I tried these links:

    https://thavixt.github.io/twitch-lite/

    (https://github.com/thavixt/twitch-lite)

    and this created by "walkero"
    https://aiostreams.amiga-projects.net/

    it seems that once the video starts (it continues to load but is not seen)
    after this "Wayfarer" is unable to exit the page and freezes.

    separate note:
    "walkero" talked about "python-ssl" to be associated with aiostreams
    but the version of python-ssl that was needed was not adequate.
    maybe it would be useful for slower processors.
    But you've probably talked about it before.
    With the 4.1FE emulation (winuae) it works perfectly
    even more than one stream at a time,
    here an example:
    https://www.youtube.com/watch?v=t-bCIwis39Y

    maybe somehow it can be useful

    i guess in this case ffmpeg needs python-ssl

    [ Edited by white 09.10.2021 - 14:23 ]
  • »09.10.21 - 13:19
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Zylesea
    Posts: 2017 from 2003/6/4
    Quote:

    jacadcaps schrieb:
    Nothing to implement here. The website most probably works, you would just need a 100GHz G5 to make it work reasonably well ;).


    I guess a Ryzen 5000 would do...

    ISA switch
    for twitch!
    --
    http://www.via-altera.de

    Whenever you're sad just remember the world is 4.543 billion years old and you somehow managed to exist at the same time as David Bowie.
    ...and Matthias , my friend - RIP
  • »09.10.21 - 22:58
    Profile Visit Website
  • Butterfly
    Butterfly
    Posts: 92 from 2019/4/6
    @jacadcaps
    I hadn't caught the ironic side of the answer :-)
    So "AIOSTREAMS" could somehow be a solution?
  • »10.10.21 - 06:41
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 2513 from 2003/3/5
    From: Canada
    Not sure what aiostreams are trying to solve. They just point back to the bloated twitch website. And by bloated I mean bloated - they even went to the lengths of optimizing their player with wasm... and you really don't need to do this to play HLS, you can just pass the url to the video tag element and that's it.

    No idea about any python stuff. You could probably patch the website with a user script though. All you really need is to obtain the m3u8 URL with a valid access token.
  • »10.10.21 - 15:00
    Profile Visit Website
  • Butterfly
    Butterfly
    Posts: 92 from 2019/4/6
    This is an early version of aiostreams
    where it worked there is a command line example.
    Later it was possible to insert it directly into the browser odyssey (4.1FE) with the python script
    is currently with the site:
    https://aiostreams.amiga-projects.net/

    you can directly see the previews of what you are looking for and start the videos with the script written in python

    I guess it can work the same way with Morphos because it is not integrated into the current Morphos browser.
    But the url is searched and the player (ffplay 4.1FE) takes care of starting the video to say it in a synthetic way.

    certainly some expert in this would be needed
    I don't know who can develop these tools with Morphos and what it would take to make it work.
    But this would allow you to watch videos on TwitchTV bypassing the browser

    here an old command line video:
    taking into account that I am using winuae and not real hardware the videos are very smooth
    https://www.youtube.com/watch?v=QabZGAKMfhM

    I tried to use it with morphos but from what I had read it seemed to me that "walkero" said that the problem was the python-ssl version of morphos not updated
    but I leave any opinions to those who are more experienced than me
    Thank you :-)

    I explained how it works as best I could
    I believe that a convenience like this cannot be missing on a system like Morphos.

    I hope I have not insisted too much on this subject
    but I guess it is possible for those who are able to develop it.
    I can only configure in my small way and have fun.

    I'm having a lot of fun with morphos and adding that to the system too would be very nice
    Thanks again. :-)

    [ Edited by white 16.10.2021 - 16:26 ]
  • »15.10.21 - 21:27
    Profile
  • Butterfly
    Butterfly
    Posts: 92 from 2019/4/6
    to try I downloaded from morphos storage:
    python
    https://www.morphos-storage.net/dl.php?id=1532050

    i moved python27.library to
    SYSMOS/libs
    and python in
    SYSMOS/c

    then I used the twitch.py script

    like this from shell:
    python twitch.py -sg "fortnite"

    and the output is the following:
    "no module name"

    (on OS4.1FE the list of channels to watch appears instead)

    at that point just do:
    python twitch.py -u <urlvideo>
    is the video is played with ffplay

    later it can be implemented in the browser (odyssey 4.1FE)
    with context menus:
    preferences / context-menus like so:
    Link --- >> TwitchTV
    Python Amiga/Utilties/aiostreams/AIO_browser_extension.py %l

    at that point by visiting the site:
    https://aiostreams.amiga-projects.net/

    just select the video and watch it without using the shell but simply clicking on the video to use the script

    the script also works on the twitchTv official site
    without problems.
    The motivation to use:
    https://aiostreams.amiga-projects.net/
    it is because it is lighter and more essential.

    this is the current version of python-ssl on osdepot
    without this aiostreams cannot work
    http://os4depot.net/share/library/misc/pythonssl.lha

    if someone more experienced wants to try
    maybe you can find a solution to have twitchTV videos on Morphos
    Thanks.

    I explained how it works as best I could
    I believe that a convenience like this cannot be missing on a system like Morphos.

    I made a little video
    here i am using aiostreams on the official TwitchTV site with Odyssey
    with the script running:
    https://www.youtube.com/watch?v=WBZ84t0roNA

    I hope I have not insisted much on this subject.
    I'm having a lot of fun with Morphos
    and to have streaming with Morphos too would be very nice.
    But perhaps for those who develop it is easy to make it for morphos
    Personally I can only set it up and have fun. :-)

    [ Edited by white 16.10.2021 - 16:36 ]
  • »16.10.21 - 12:24
    Profile
  • Butterfly
    Butterfly
    Posts: 92 from 2019/4/6
    I found the post
    where we talked about python and the "walkero" request
    maybe it is useful.
    https://morph.zone/modules/newbb_plus/viewtopic.php?topic_id=13113&forum=51
  • »17.10.21 - 12:35
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    polluks
    Posts: 665 from 2007/10/23
    From: Gelsenkirchen,...
    Quote:

    white schrieb:
    i moved python27.library to
    SYSMOS/libs
    and python in
    SYSMOS/c


    Better use Libs: and C: because this is save for updates.
    Pegasos II G4: MorphOS 3.9, Zalman M220W · iMac G5 12,1 17"
    Power Mac G3: OSX 10.3 · PowerBook 5,8: OSX 10.5, MorphOS 3.15
  • »17.10.21 - 20:25
    Profile
  • Butterfly
    Butterfly
    Posts: 92 from 2019/4/6
    @polluks
    Thank you for your suggestion,
    Many times to make sure I'm not wrong I do it this way.
    But my version of morphos is still in a personal beta :-)
    I'm trying everything I need to do a full install later.
    So far I am very excited about it.
    I have emulated 4.1FE with winuae for years.
    With Morphos I can finally have the same things I wanted to achieve with the 4.1 emulation with the difference that everything works perfectly.
    Later I will also devote myself to the graphic aspect.
    The tooltypes of icons etc.

    I always appreciate suggestions,
    Thanks again.
  • »17.10.21 - 21:44
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 2513 from 2003/3/5
    From: Canada
    You should be able to obtain the m3u8 address with something as simple as curl cmdline, really. It's mostly just about sending a POST request to the twitch APIS.

    See https://github.com/dudik/twitch-m3u8/blob/master/index.js
  • »17.10.21 - 23:24
    Profile Visit Website
  • Butterfly
    Butterfly
    Posts: 92 from 2019/4/6
    @jacadcaps
    Thanks but I am unable to get it to work
    i installed wget and curl
    but i have no idea how i can set it
    I copied to a text file named "index.js" in the link you put.
    then from shell I typed:
    ram:curl index.js
    but surely missing the parameters to make it work
    is it possible to have an example of its use?
    Thanks

    also i was trying YT.rexx (morphos storage) which uses curl and wget but at the moment i can't get it working i will do other tests.

    I also solved the rexxsyslib.library problem but probably YT.rexx is to be configured for Morphos.

    Again if someone uses it an example would be useful.
    Thanks again.

    (With the 4.1FE YT.rexx it works perfectly.)
    I do this example because only with 4.1FE I could try these programs and I am familiar with them and I have always used them.

    separate note:
    I also add this to not open another post.
    I noticed that the "search" works
    it doesn't work well on my system
    For example if I type in this case ffmpeg or ffplay
    i can't find its path.
    This also happens with other files.
    Not knowing the Morphos system yet, this function is very useful for me to understand where the files are.
    But it doesn't seem to work.


    [ Edited by white 18.10.2021 - 14:02 ]
  • »18.10.21 - 12:45
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 2513 from 2003/3/5
    From: Canada
    Quote:

    white wrote:
    @jacadcaps
    Thanks but I am unable to get it to work



    I'm afraid it's not that straightforward. You need to understand what you're doing there (as in, know JavaScript and understand what kind of data needs to be sent to the twitch API and how). Just sayin' it's doable, not how to do it exactly.
  • »18.10.21 - 14:11
    Profile Visit Website
  • Butterfly
    Butterfly
    Posts: 92 from 2019/4/6
    @jacadcaps
    Thanks anyway,
    And thanks also for the explanation.

    This is out of my reach,

    I really hope that somehow a port of python-ssl can be done.
    It is probably the only way to make sure that the G4 processor can see the live streams in this case on TwitchTV without requiring an exorbitant processor speed. :-)
  • »18.10.21 - 14:24
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 2513 from 2003/3/5
    From: Canada
    Did you try using https://pwn.sh/tools/getstream.html ?
  • »18.10.21 - 17:16
    Profile Visit Website
  • Butterfly
    Butterfly
    Posts: 92 from 2019/4/6
    Thank you for the link,
    I'd like to understand among the players available which ones support streaming.
    I guess ffmpeg (ffplay) supports this
    Because I would like to do a test to see the running speed of ffplay with a streaming video without going through the browser.
    Morphos is perfect for me.
    It would be nice as I said a program that deals with this.
    To increase the features of this system.

    Anyone know the command line for ffplay to open a video link of any kind?

    These scripts I mentioned take care of opening the link and making it work with ffplay as well.

    As I said I would like to do it manually what would be the right syntax to use with ffplay using Morphos?

    here is an example of what I mean by the "DLive" channel made with an old version of aiostreams (1.4.2) in 2019 using ffplay:

    https://www.youtube.com/watch?v=f6AtikycXS8
    Thanks
  • »19.10.21 - 11:00
    Profile
  • Butterfly
    Butterfly
    Posts: 92 from 2019/4/6
    I have now read here in another post concerning the topic on Morphos zone:
    maybe the ffmpeg versions are older than those of 4.1 etc.
    https://morph.zone/modules/newbb_plus/viewtopic.php?topic_id=12689&forum=9

    But perhaps the subject was not interesting

    but i believe many users would use this feature
    I like to talk about these things because they improve the system in use
    certainly good will is not enough.
    It takes work and time to make it happen
    But mine is just a small idea

    Thanks anyway to all the Morphos developers for your work which I always appreciate very much.
    :-)

    [ Edited by white 19.10.2021 - 12:35 ]
  • »19.10.21 - 11:24
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 2513 from 2003/3/5
    From: Canada
    Twitch Player for Wayfarer

    Note: if audio and video are not in sync, that means your CPU is too slow. I recommend sticking to 360p unless you're on G5.

    [ Edited by jacadcaps 19.10.2021 - 19:23 ]
  • »19.10.21 - 14:18
    Profile Visit Website
  • Butterfly
    Butterfly
    Posts: 92 from 2019/4/6
    @jacadcaps
    Thanks !!!
    It works perfectly

    I just add some personal notes:
    Using a PowerBook g4 1.67
    360p is perfect
    only if I put the video to full screen the audio is asynchronous
    but 360p in the window is perfect
    I guess it can be developed for a video search in the future etc.
    It works very well

    Thanks!!! :-)

    here the test and its use to look for the link:
    https://www.youtube.com/watch?v=okIEOUX-6dA

    I think I used it well

    maybe a small donation to have a more complete portal made by a set of users for those who can do it.

    [ Edited by white 19.10.2021 - 21:55 ]
  • »19.10.21 - 20:40
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 2513 from 2003/3/5
    From: Canada
    Why use Odyssey though? :)
  • »19.10.21 - 21:22
    Profile Visit Website
  • Butterfly
    Butterfly
    Posts: 92 from 2019/4/6
    @jacadcaps
    I still have to do some tests,
    But I have noticed that if I use Wayfarer
    for example on the twitchTV site to search for links
    Wayfarer tends to get stuck while with Odyssey it doesn't
    (basically no longer able to quit twitchTV)
    and in fact it freezes completely.
    I have to try again if it happens just trying to see the video without using the link for streaming, or even just looking for the link.
  • »19.10.21 - 21:57
    Profile