I've configured YT.rexx to play videos from Odyssey. Tried with MPlayer and Emotion. Emotion would be the preferred played because of the Radeon RX video decoding acceleration. The issue is that both players present me with stuttering audio and video. The same video plays fine with the embedded video player.
I've noticed that YT.rexx gets its video from a domain called googlevideo.com. When i disable autoplay and download the video file from the YT.rexx website with links instead, I've noticed that the download speed is a very slow at ~80kb/s. So this slow download speed seems to be the root cause of the stuttering video. Is there any way or an alternative server available to speedup streaming video with YT.rexx?
There's a bug with Emotion that occurs with Radeon HD but I don't know if it is the case with Radeon RX : try to click outside of Emotion window (anywhere on the WB for example) when video is playing.
I use a similar command but without the "UsePipe".
But sometimes I get an IO error. So it really seems a streaming issue. The same streams runs fine on odyssey itself. When I pause the movie for a couple of seconds before hitting the play button again then it plays fine until some buffer is empty again.
I have no issue with playing movies on my harddisk with Emotion and RX acceleration. The issue occurs with MPlayer ( the RX YUV patched binary) as well.
Single file download speed with Odyssey is about 2MB/s. This is pretty much the limit what the X5000 can do. So it's not a bandwidth issue. Maybe it's a latency issue because I use a wireless router in bridge mode to my main router. More streaming cache would help here but I can't find a setting for it.
MPlayer itself works fine. I can play movies stored on my SSD with no issues. It's just that streaming youtube items from a odyssey contxt menu results in a stuttering stream with YT.
In the meantime I have installed aiostreams. And aiostreams works fine here. Streams 720p just fine with emotion and just 8% CPU load. For some reason, those higher resolutions streams do not contain an audio track. But even id 137 (1080p) plays with just 15% CPU load
MPlayer itself works fine. I can play movies stored on my SSD with no issues. It's just that streaming youtube items from a odyssey contxt menu results in a stuttering stream with YT.
Try this. On a YouTube video, us YT to creat the links webpage for the video. Once the webpage is displayed, try just playing the link directly with MPlayer. Do you still get studdering.
I use the same MPlayer you are using. The follwing is the command I use in the action field for the link with
Problem solved. There were 2 issues, but only 1 might be affecting other people. For anyone experiencing the same thing, change the stack size at the top of the script from 250000 to 500000, then before the next run, delete the YT directory in T: so it doesn't load bad cached information.
geennaam wrote:My problem is actually solved. I now use aiostreams from a odyssey context menu and the resulting stream in Emotion runs just fine.
Since Emotion used gpu video decoding, I have hardly any cpu load as well.
Could you or someone else briefly explain how to set up and use aiostreams with odyssey and YouTube.
The basic requirements for aiostream are met. I currently only watch TwitchTV with aiostream and would also like to be able to stream YouTube with Emotion.
The second issue was me doing a RTFM for once and installed the Javascript interpreter linked in yt.guide. This turns out to be a much older one then the one that is already supplied with YT.
So only install the new curl from os4depot in /Tools and do not replace js with the latest one from os4depot.
Everything work fine for me now. Stuttering is gone.
It works without problems, but the CPU load is very high here because we do not get accelerated video output. I use YT in the latest available version 2.8 of os4Depot.
FYI, YouTube is doing a lot of things lately which are breaking things. The A/B test workaround in v2.8 might not be working at all anymore, so if you managed to run it while they were still switching back and forth on the experiments, and you've got a cookies .txt from the good side of that experiment, then make a backup of it.
The issue you're having might not necessarily be an issue with Emotion. I don't have it so I can't test it.
There are other workarounds but involve using ffplay which has higher CPU usage. MPlayer can't cache when playing HLS. It reaches the end of a segment then pauses or stutters when loading the next segment. Perhaps Emotion can handle that better though? You could test a live stream link with it to see how it performs.
I don't know what the -u is in your context menu entry. The .rexx will just ignore that.
There are other workarounds but involve using ffplay which has higher CPU usage. MPlayer can't cache when playing HLS. It reaches the end of a segment then pauses or stutters when loading the next segment. Perhaps Emotion can handle that better though? You could test a live stream link with it to see how it performs.
Currently YouTube and TwitchTV is configured via Odyssey AioStreams/Emotion and it works really perfect, which I didn't expect, you can see it here in one of my videos.
But also with AioStreams there are problems again at the moment because something has been changed on YouTube again
I always prefer all alternatives and YT.rexx is one of them to be able to watch YouTube videos. As already mentioned, it works with MPlayer, but not with Emotion. This is how I configured it in YT, but I'm not sure if something is missing:
V2.8 /* Please don't change the formatting */
Embed="0" /* Request content as an embedded video by default? 0/1 */
HTML="0" /* Generate HTML page and open browser? 0/1 */
Debug="1" /* Write debug output to T:YT-Debug.log? 0/1 */
AutoPlay="0" /* Automatically stream videos in mplayer/ffplay? 0/1 */
SkipDASH="0" /* Skip processing of DASH links. 0/1 */
Captions="1" /* Display list of captions? Console mode only. 0/1 */
CapLang="" /* Caption language for autoplay. Blank for none. See docs. */
CapTrans="" /* Translate captions to this language. See docs. */
Browser="" /* Default browser: Odyssey/IBrowse/AWeb/NetSurf. */
ScanLimit="10" /* Maximum amount of video links to scan. */
UsePipe="0" /* Streams HTTPS to MPlayer via STDOUT/STDIN */
TagOrder="22 18 5 93 92" /* 720p/360p/240p / Live 360p/240p */
;PathMP="Workbench:Utilities/MickJT-MPlayer/mplayer" /* Full path to MPlayer executable */
;PathMP="AmigaOs4.1:Utilities/MPlayer/MPlayer" /* Full path to MPlayer executable */
PathMP="AmigaOs4.1:Utilities/Emotion/emotion" /* Full path to MPlayer executable */
;PathFP="APPDIR:ffplay" /* Full path to FFplay executable */
;ArgsMP="-quiet -really-quiet -vo comp_yuv2 -autosync 35 %u -cache 4096 -framedrop" /* Optional parameters for mplayer */
;ArgsMP="-quiet -really-quiet -vo comp -autosync 35 %u"
;ArgsFP="-loglevel quiet -infbuf -skip_loop_filter all -skip_frame noref"
/* Optional parameters for ffplay */
Emotion="0" /* For OLD versions of Emotion. Use APPDIR:Emotion with PIPE: */
/* Otherwise, set PathMP to Emotion and leave ArgsMP blank. */
Quote:
I don't know what the -u is in your context menu entry. The .rexx will just ignore that.
Yes you are right the line above makes no sense it should not be "c:rx AmigaOs4.1:Utilities/YT/YT.rexx %l -u silent autoplay" but "c:rx AmigaOs4.1:Utilities/YT/YT.rexx %l %u silent autoplay" in the context menu of Odyssey
If all else is equal and the only difference is changing PathMP from Emotion to MPlayer and it works on mplayer (repeatedly) and not on Emotion (repeatedly), then perhaps there's some TLS protocol update or something that Emotion needs. Does Emotion use AmiSSL or OpenSSL?
Edit: I just noticed you don't have ArgsMP as blank, you have it completely commented out which is likely to cause a problem, since it's an undefined variable rather than defined as an empty string, and the YT.cfg parser doesn't expect that. Try with ArgsMP=""
Edited by MickJT on 2024/8/10 17:27:21 Edited by MickJT on 2024/8/10 17:32:07
MickJT wrote:If all else is equal and the only difference is changing PathMP from Emotion to MPlayer and it works on mplayer (repeatedly) and not on Emotion (repeatedly), then perhaps there's some TLS protocol update or something that Emotion needs. Does Emotion use AmiSSL or OpenSSL?
Emotion uses AmiSSL for streaming. AioStreams uses pythonssl_amissl5 for streaming, maybe there are differences here.
Quote:
Edit: I just noticed you don't have ArgsMP as blank, you have it completely commented out which is likely to cause a problem, since it's an undefined variable rather than defined as an empty string, and the YT.cfg parser doesn't expect that. Try with ArgsMP=""
I added ArgsMP="" to my YT.cfg, but it still doesn't work.
I have a problem with YT.rexx, I try to make it work but I always have an output window that tells me "Unrecognizable Youtube URL, scanning for links instead Enter host password for user '-A': Unable to open T:YT/YT-Site.html
I also noticed that even with Aiostreams you can't play videos anymore.
Youtube where I don't know who is messing things up.