English Amiga Board


Go Back   English Amiga Board > Support > support.Apps

 
 
Thread Tools
Old 16 November 2022, 22:47   #41
White
Registered User
 
White's Avatar
 
Join Date: Sep 2016
Location: italy
Posts: 1,480
Done!!
Now the video opens by itself after the download is complete
It was enough to associate the Browser MIME :-) (.MP4)

Try it WebOne maybe you can change other things
If you can't I give you my version which is obviously modified for amigaOS.

Of course now I only need WebOne to understand how streaming works, then I bring everything to Apache

Where if I can I would like to implement HTML 5
But I do one thing at a time.

now it opens automatically

https://we.tl/t-GRKR76jYFd

Last edited by White; 16 November 2022 at 22:54.
White is offline  
Old 16 November 2022, 23:03   #42
DisasterIncarna
Registered User
 
DisasterIncarna's Avatar
 
Join Date: Oct 2021
Location: England
Posts: 1,172
yeah thats looking good.

btw have you seen Browservice?

https://github.com/ttalvitie/browservice

Code:
A web "proxy" server that enables browsing the modern web on historical browsers. It works by rendering the browser viewport into images, which are then shown by a JavaScript application running on the client browser.
it makes a "modern" css browser appearance work in old browsers by chopping a webpage up into small images and sending them to the old browser to be rebuilt, a bit like a weird form of RDP/VNC.

I wonder if this can be used/merged/adapted to work with webone so you not only get the "proper" webview on Amiga iBrowse, but also get the benefit of webone, converting videos as you have got working quite well now?

here is their demo vid showing an old internet explorer 6 "running" modern webpages via the service.

[ Show youtube player ]

if both webone and browservice can be used with iBrowse then perhaps that can be a more complete/better looking solution?
DisasterIncarna is offline  
Old 16 November 2022, 23:10   #43
White
Registered User
 
White's Avatar
 
Join Date: Sep 2016
Location: italy
Posts: 1,480
Exactly, just Browservice :-)
I tried it and it works on OS4 with Odyssey and TimberWolf it works.

And that's exactly what I would like to integrate.

The problem is that right now they don't seem to work together at the same time.

But I have to go back
Now I've spent some time with codecs for 68k

With apache surely I can configure them better (I hope).

here the video of the test:

https://we.tl/t-MsPJsZh0rc

Last edited by White; 16 November 2022 at 23:23.
White is offline  
Old 17 November 2022, 22:55   #44
DisasterIncarna
Registered User
 
DisasterIncarna's Avatar
 
Join Date: Oct 2021
Location: England
Posts: 1,172
If you dont wanna read all the boring crap, a youtube link is at the bottom showcasing what i did without any proxy service like webone/browservice, just using 1 amiga script and 1 windows batch file i quickly whipped up and ofc Winlaunch is needed for WinUAE.

If the video may still be processing the higher quality upload if you find its all blurry atm.

------------------

ok

so

Your attempts at getting this to work got me thinking of a different method, seeing as WinUAE is a requirement and you mentioning the use of a Shared directory to be used as a middleman between windows/ytdlp saving the videos and the amiga having access to play the ripped video, i tried a similar method that tries the same thing a different way.

I tried cutting out the html/proxy portion and tried seeing if simply using WinLaunch to run a windows BatchFile which itsself initiates a YTDLP rip into a shared folder would siffice, along with an amiga script to wait for the results, in my case i already use a RamDrive program on windows because ofc i do, soooo.

Stage 1:
Lets make a simple script that launches a windows batch file which does our YT-DLP rip and waits for the results so it can be played on the amiga.

copy/paste this into a script/text file on the amiga side called C:PlayYouTubeLink and Protect the file so it is executable as iBrowse will execute this script later.

EDITED: Added a flag to Winlaunch in the script so the WinUAE window doesnt lose focus.

Code:
.KEY YTLINK/A
Echo "<YTLINK>" >WRA:\YTURL.TXT
RUN >NIL: SYS:REXXC/RX "address ffplay_arexx quit"
RUN >NIL: WINLAUNCH /SW_SHOWNA "E:\YTCONV.BAT"

LAB CHKLoop
if exists WRA:CONVERTED.MP4
  SKIP FoundIt
endif
Wait 1
SKIP CHKLoop Back

LAB FoundIt
FFPlay WRA:CONVERTED.MP4 -fast -gui 0 -loglevel 0 -framedrop -loop 0
Delete WRA:#?CONVERT#?.MP4
ENDCLI >NIL:
In WINUAE WRA: points to my windows R:\ which is a ramdrive and ideal to be used as the shared folder/middleman for the ripped youtube videos and other disposable junk, replace all occurrences of WRA: to whatever shared folder/drive you have in WINUAE.

Our soon to be made Custom RightMouse menu entry in iBrowse will forward the URL of a youtube link by echoing the URL to a text file in our shared folder, in my case WRA: then the script launches a batch file which depends on that created text file containing the URL.

Here is the simple Windows Batch File, again copy/paste the text into a file called YTCONV.BAT, place it somewhere where you can still edit, so not in C:\ if you can help it, in my case that is my E:.

Code:
@Echo off
if not DEFINED IS_MINIMIZED set IS_MINIMIZED=1 && start "" /min "%~dpnx0" %* && exit
R:
CD \
DEL R:\CONVERT*.* >NUL:
yt-dlp --no-cache-dir --format "bestvideo[ext=mp4][height<480]+bestaudio[ext=m4a]/mp4" -ciw --merge-output-format mp4 --embed-thumbnail --add-metadata --xattrs -a R:\__uae____YTURL_TXT -o R:\CONVERTING
REN CONVERTING.MP4 CONVERTED.MP4
DEL R:\*YTURL_TXT >NUL:
EXIT
In this batch file, notice the references to R: again, change this to whatever shared folder name you are using on the windows side, also note that when the emulated amiga side created YTURL.TXT, that somehow becomes __uae____YTURL_TXT on the windows side, so the above script does not contain a weird typo/mistake, the output file does not end with .MP4 as YT-DLP adds .mp4 itsself, if you add it then your file will end in .MP4.MP4.

Stage 2:
We are simply adding a custom rightmouse menu entry to iBrowse, go to Preferences/Settings/GUI/FAB MENU. Double click the LINK menu entry on the right, we now see all the options we normally get when rightmousing html links in iBrowse, in the left window drag over the "CUSTOM" option into the LINK menus on the right, position it at the top, above "View Link".

Edit the new CUSTOM command,enter a name such as "Play Youtube Video", change the action to COMMAND and have it set to our C:PlayYouTubeLink script, in the box to the right add %l which represents the "Link URL".

Save all that and thats all iBrowse needs, now just use the Google/search bar at the top right and enter "YOUTUBE AMIGA", rightmouse on 1 of the video links and simply pick the new menu option you added to play a youtube video.

Here is a demo youtube video of all the above in action, my only current/lasting issue is that when WinLaunch runs the batch file, WinUAE loses focus of its window and when the batch file completes it does not refocus/relock back into WinUAE, i have to give 1 manual leftclick to refocus the window, not currently sure how to bypass that.

[ Show youtube player ]

It all tries to remain silent so the video is a capture of winuae and the window contents of my windows ramdrive, which you can see slowly fills up with download files from YT-DLP.

Last edited by DisasterIncarna; 18 November 2022 at 01:54.
DisasterIncarna is offline  
Old 17 November 2022, 23:25   #45
White
Registered User
 
White's Avatar
 
Join Date: Sep 2016
Location: italy
Posts: 1,480
@DisasterIncarna

I always read everything
so don't worry, in fact I'm glad.

Now I read everything calmly and I will try to understand all the functioning you have elaborated.

Reading everything is important helps to understand all the steps

This is the only way to understand the meaning of whoever is transmitting their own idea.

:-)
White is offline  
Old 17 November 2022, 23:39   #46
White
Registered User
 
White's Avatar
 
Join Date: Sep 2016
Location: italy
Posts: 1,480
@DisasterIncarna

You could attach a file of the batch files when you have time, so I download them.

this way of yours is interesting for when I will use apache because using WebOne as I repeated is just a faster way to check if everything was working. (and it actually works).

But it is only the first step for a larger project.

So if you attach the files for me that would be great

Thank you
White is offline  
Old 17 November 2022, 23:48   #47
White
Registered User
 
White's Avatar
 
Join Date: Sep 2016
Location: italy
Posts: 1,480
I am currently doing two scripts one is for 68k
it's the other one for OS4 that runs in realtime basically

The os 4.1FE reads the stream in real time because Emotion and FFplay for OS4 support the stream directly while processing it in real time.

But obviously the scripts are different between 68k and OS4

And a pity you don't use OS4 otherwise we could see together for those too.

But the OS 4.1 one is pretty much perfect, I just need to see how to process it on Apache
White is offline  
Old 18 November 2022, 01:52   #48
DisasterIncarna
Registered User
 
DisasterIncarna's Avatar
 
Join Date: Oct 2021
Location: England
Posts: 1,172
remember both the amiga script and the windows batch file need drive/directory names changed to suit yourself.

Also i'm using Winlaunch : https://aminet.net/search?query=winlaunch and now ive actually read it properly like i probably should have done ages ago, it can use a flag called /SW_SHOWNA which fixes the issue of having to reclick WinUAE into focus, with that flag it just works, almost seamlessly.

Heres the scripts, feel free to use/improve them, they really are a quick throw together just to see if it could work, it could easily be made better around that idea/method, there are far better scripters on these forums.
Attached Files
File Type: zip scripts.zip (834 Bytes, 36 views)
DisasterIncarna is offline  
Old 18 November 2022, 20:30   #49
AMIGASYSTEM
Registered User
 
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,248
Tested your scripts and they work well, as shared I used a Network Drive, this way it can be shared with other PCs or other connected in Local Network.
AMIGASYSTEM is offline  
Old 18 November 2022, 21:01   #50
DisasterIncarna
Registered User
 
DisasterIncarna's Avatar
 
Join Date: Oct 2021
Location: England
Posts: 1,172
the scripts can most likely be improved a lot, im far from a script guru
DisasterIncarna is offline  
Old 18 November 2022, 23:05   #51
AMIGASYSTEM
Registered User
 
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,248
Meanwhile, they work well, that is important !
AMIGASYSTEM is offline  
Old 19 November 2022, 04:17   #52
DisasterIncarna
Registered User
 
DisasterIncarna's Avatar
 
Join Date: Oct 2021
Location: England
Posts: 1,172
so.... making "some" progress with this video playback stuff, made myself a small GUI which simply informs me of whats happening on the Windows Side as YT-DLP/FFMPEG do their thing. It needs work, mostly as its checking specific filenames to exist during the rip/conversion process, filenames that are almost always the same name, but sometimes change..... for reasons that escape me, im guessing because of original file codecs/quality or something. Need to play around more to find a solution that doesnt break.

heres a vid of what i have so far, all work in progress ofc, this is on FS-UAE using the "Clipboard" command execution method i rattled up recently so even FS-UAE can execute Windows commands not just WinUAE.

[ Show youtube player ]

Also, because im not that great/informed about the "best/better" codecs/ripping methods to use, i am downloading (i think/hope) youtube videos as MP4, if i play these as they are then "some" videos play nice and speedy via FFPlay, but an equal amount or more play veeeeery slowly, so i am having to FFMPEG convert the file to MPEG which FFPLAY on the amiga side can handle better, it works but slows things down as you have to wait longer.
DisasterIncarna is offline  
Old 19 November 2022, 22:06   #53
White
Registered User
 
White's Avatar
 
Join Date: Sep 2016
Location: italy
Posts: 1,480
@DisasterIncarna

I tried your scripts and they work using "winlaunch"
But for what I'm doing they are not good for me.


Using "winlaunch" probably makes the download of the video you want to watch much slower, or you could try not converting it like you do now if you want to make it faster.

Clearly they are two different approaches to the same goal.

Using winlaunch maybe you are limited in terms of speed.

If you follow the reasoning maybe you can find a solution to get around these slower loading times.



Actually you wouldn't need to convert it for "Amiga" this makes opening the file slower

If you are sharing a file management directory via "winuae" as we said above, you could point directly to the file you download with YT-DLP.

You will notice that using -f 18 (640x) the video loading is instantaneous.

While instead you have to wait only a few seconds for -f 22 (1280x)

You will probably find a solution to this now that you know what to work on.

But I wanted to let you know because now you will probably find a solution.

Of course I don't know if you can do it with "winlaunch"

Here's a test with your own video you posted, you'll be able to see how fast the video opens if you can find a "winlaunch" solution similar to the one I'm using.

Hope it is useful for you :-)

here at -f 18 640x

here a -f 22 1280x (if you leave it blank YT-DLP will always give you the best video available)

640x
https://we.tl/t-JC49l9wQ8q

1280x
https://we.tl/t-8gdTvTLJ4g
White is offline  
Old 19 November 2022, 22:25   #54
White
Registered User
 
White's Avatar
 
Join Date: Sep 2016
Location: italy
Posts: 1,480
in the video you can also find how I set the MIME in "IBrowse"

which point directly to the video downloaded from YT-DLP

I also leave you the .bat if it can be useful: -f 18 640x or blank for better resolution

yt-dlp "%1" -o - | ffmpeg -protocol_whitelist file,http,https,tcp,tls -movflags +frag_keyframe+separate_moof+omit_tfhd_offset+empty_moov -c copy -bsf:a aac_adtstoasc -y C:\68k\output.mp4 -i pipe: -vcodec mpeg2video -acodec aac


clearly for codecs you can try the solutions that seem best for you
White is offline  
Old 22 November 2022, 09:05   #55
White
Registered User
 
White's Avatar
 
Join Date: Sep 2016
Location: italy
Posts: 1,480
I made another small change now also "RIVA" supports streaming with YouTube
Clearly the quality of the video is lower but the codec to be used for the conversion

could probably be improved as I put this:

-c:v libaom-av1 -crf 35 -b:v 2M -pass 2 -c:a libopus

if someone knows the right codec for "RIVA" the quality could increase.

And a lot that I don't use the 68k but with these changes it's nicer to use it now. :-)

of course the video can be added to your collection of files in .mpg format.
In addition to having it in streaming, it remains saved directly in the Workbench.

here "RIVA" which works in streaming with YouTube:

https://we.tl/t-OguHmigfVk
White is offline  
Old 22 November 2022, 12:32   #56
DisasterIncarna
Registered User
 
DisasterIncarna's Avatar
 
Join Date: Oct 2021
Location: England
Posts: 1,172
snippet from riva's readme/docs regarding its preferred codec/format.

Code:
Input steams / Quickstart:
 The input format supported by RiVA is MPEG-1 program streams. Modern video 
 formats can be converted to MPEG-1 using tools like ffmpeg or mencoder.

 Examples (assuming 16:9 aspect ratio content):
 ffmpeg -i source.mp4 -vcodec mpeg1video -filter:v scale=640:360 
        -b:v 1500k -maxrate 2200k -bf 3 -ac 2 -acodec mp2 -b:a 128k
dest_640x360.mpg
 mencoder -of mpeg -mpegopts format=mpeg1:tsaf:muxrate=1500 -o dest_640x360.mpg 
          -aid 1 -vf scale=640:360 -ofps 24 -oac lavc -ovc lavc -lavcopts 
 acodec=mp2:abitrate=128:vcodec=mpeg1video:vbitrate=1500:keyint=15:mbd=2:aspect=
16/9:vmax_b_frames=3  
          source.mp4
DisasterIncarna is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Tutorial and guide to using NetSurf to watch streaming Youtube videos White support.Apps 0 12 March 2018 14:47
YouTube live chat about the Amiga mjnurney Retrogaming General Discussion 0 26 February 2017 14:32
Live streaming Amiga games on Twitch! (Lots of obscure stuff) Macaw Amiga scene 3 08 March 2015 15:17
Live english Retro gamers Youtube channels? Retrofan Retrogaming General Discussion 0 12 April 2014 02:23
Amiga podcast/live/youtube channels you can recommend? diablothe2nd Amiga scene 2 07 January 2012 00:15

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 04:40.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.13247 seconds with 16 queries