Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
112 user(s) are online (65 user(s) are browsing Forums)

Members: 1
Guests: 111

nbache, more...

Headlines

 
  Register To Post  

A little help with FFMpeg and FFplay
Quite a regular
Quite a regular


See User information
Using "winuae" in full window "any browser is able to play videos on Youtube.
Sure actually FFPlay is used but it is shown inside the "Workbench" as a result to start is fine.

I have a problem with the script which is this:


I report it here in full:
@ youtube-dl "% 1" -o - | ffmpeg -protocol_whitelist file, http, https, tcp, tls -movflags + frag_keyframe + rtphint output.mp4 -y -i pipe: -vcodec libx264 -acodec mp3 -f mpegts pipe: | ffplay -i pipe:

The important part is this:
+ frag_keyframe + rtphint

this allows the streaming to start immediately as soon as it starts converting the first streams of the video so FFmpeg doesn't have to wait for the entire video conversion to be able to show it in FFPlay.

Now the problem that I can't solve is that if I open a second video it also loads the previous video so in practice it resumes the conversion of the first video as well.

I can't find any options in FFMpeg to be able to stop for example the first video.

Anyone have any idea how to do there is some command that allows to stop the first conversion when starting the second when closing FFPlay ??

Or can it be done differently ??

Thanks for any suggestions.

Here an example with the old IBrowse 2.4 for 68k
but it also works on amigaOS 4.1 with other browsers including QT-Browser

https://we.tl/t-JLUCrpdHfV


Edited by white on 2022/11/9 11:35:05
Edited by white on 2022/11/9 11:46:42
Go to top
Re: A little help with FFMpeg and FFplay
Just popping in
Just popping in


See User information
@white

Use commande line :
Status command ffmpeg >env:varffmpeg
Break Getvar(varffmpeg)
Delete env:varffmpeg quiet

Go to top
Re: A little help with FFMpeg and FFplay
Quite a regular
Quite a regular


See User information
@sinisrus

Hi,
Thanks for the answer,
this probably seems to be the solution.
I tried looking for:
Break Getvar (varffmpeg) associated with FFMpeg for windows but couldn't find anything.

You would know how to implement this function in a .bat script for Windows so I would have a chance to try it out.
Thank you

Go to top
Re: A little help with FFMpeg and FFplay
Just popping in
Just popping in


See User information
@white

No sorry!

Go to top
Re: A little help with FFMpeg and FFplay
Quite a regular
Quite a regular


See User information
@sinisrus

I was able to fix it by simply causing an error in the ffmpeg program so that it hangs and cannot find the pipe:
but selecting a new video to watch it starts working again.

This with a dedicated server for the purpose should be overcome.

here the video of the test on 68k, clearly it also works on OS4 and with all Amiga browsers.
the video selected in the Amiga Browser is converted in real time.

https://we.tl/t-4sTGDZkAWW

Here you can see QT-Browser for OS4 practically not working with nothing but a little browsing.

But Youtube manages to work just the same.

a small example:
https://we.tl/t-AatbQvnQ8S

Go to top
Re: A little help with FFMpeg and FFplay
Not too shy to talk
Not too shy to talk


See User information
@white

I have no idea what you're trying to accomplish. ...and why
you just don't use YT.rexx. Are you trying to do something
more than playing videos???

I can just type this in the CLI:

<path>/YT.rexx <YT URL> autoplay

I get an MPlayer or FFplay window (as needed) and it just plays.
No fuss, no muss.

No clue about your videos (I guess).... How about posting
them something somewhere Amiga-Friendly?

Good luck,

PJS

Go to top
Re: A little help with FFMpeg and FFplay
Quite a regular
Quite a regular


See User information
@pjs
Hi,

I'm glad you answered,
in fact I would like to achieve more than just a windowed playback
to use AmigaOS 4.1 I use "winuae"
apart from some limitations the system is clearly fine.

The only sore point is the support for the video card.
So using Odyssey directly leads to video playback
much slower compared to YT.rexx - Aiostreams even though they work perfectly.

So I was looking for alternative solutions.
Also to do some experiments.

I found this:
https://github.com/atauenis/webone
(linux and windows and mac)

the project was created to support the playback of videos on YouTube with browsers that are no longer supported.

I made some changes and if you saw the video I was able to use ffmpeg for windows to convert the videos on the fly and retransmit them using the Amiga Browsers also using the Nvidia GPU

This succeeds because in this case using a proxy for example with Odyssey the program intercepts the link used within Odyssey and is then able to convert it in real time and pass it to FFPlay for Windows.

Actually the program should stream it directly within Odyssey but it can't because the author of the WebOne program didn't create something that works with Odyssey.

And of course it is almost impossible to report to him due to the fact that "Amiga" is not used by everyone.

The program is written in #C but actually with the configuration file and the batch script you can get a lot of extra things.

The fact that the program intercepts the Odyssey and converts the video on the fly is proof of this.

Here it would lack support for an Amiga Browser.
So it is normal that anyone who owns a real Amiga is not interested in this.

But I believe that with some modifications it can work directly with Odyssey using FFMpeg for Windows and therefore see videos smoothly.

But it would take someone to take a look at the program and see what needs to be fixed to make it compatible with Odyssey for example.

I point out that if I use a configuration recommended in the author's readme in reality the video starts inside Odyssey the video being loaded appears but then it stops.

Most likely because FFMpeg is unable to process the video inside Odyssey but I think it is due to some wrong "string" or something similar in the "WebOne" program because it does not provide Odyssey as a Browser.

So it works it's just that you should find the solution for it.

Thanks if anyone would like to try it out.

Its use is simple you choose the freely configurable proxy such as PORT and IP address.

Locally and then in Odyssey just choose http proxy and port.

I believe that a solution can be found very old browsers are supported.

requires:
NET 6.0 Runtime and later are required on server PC

Go to top
Re: A little help with FFMpeg and FFplay
Quite a regular
Quite a regular


See User information
I found a solution,
and it is also easy to make.

But we need a little script on AmigaOS that does this:

The stream file is now downloaded directly to RAM:
is converted on the fly from FFmpeg (windows)

If I use Emotion-Player for example
It can display the video in real time while FFmpeg converts it on the fly.
The synthesis is this.

If I manually associate the downloaded file named "watch"
at Emotion-Player the video starts playing while FFmpeg converts it.

The question is this:
How do I associate with a script that tells the "watch" file I am downloading to associate with Emotion-Player?

I think it is easy to create, in practice I have to associate the file I am downloading to Emotion-Player and start playing it.

Thanks for any help.


separate note:
Once this is done, the next step would be to associate the downloaded file in RAM: "watch" for example to Odyssey and its internal Player and play it.
But that would be too much to ask for now

Go to top
Re: A little help with FFMpeg and FFplay
Quite a regular
Quite a regular


See User information
here is a small video easier to see than to explain it only needs a small script that does what I do manually:

https://we.tl/t-BJeUoiMtxR


We need something that does this:

automatically starts the "watch" file associated with the Player-Video as soon as the file is created in RAM: file -> "watch"

and in case you choose another video from YouTube

the RAM file: file -> "watch" must be overwritten or deleted or renamed.

Because the video stream is in real time and the file is always the one that is used.
Now I have also added GPU-Nvidia decoding to be a bit faster.

Do you have any ideas on how to do this, Thanks


Edited by white on 2022/11/13 16:57:21
Go to top
Re: A little help with FFMpeg and FFplay
Quite a regular
Quite a regular


See User information
@jpv

Here's something more I wanted to achieve
here the HTML5 code in use with Odyssey

Clearly it's only at the beginning it's little optimized but it's a good start at least in emulation.

Sorry for the 300mb file size
But it takes seconds to download it
The site is fast

I hope it's interesting.

https://we.tl/t-2poWQCtlix

Go to top
Re: A little help with FFMpeg and FFplay
Quite a regular
Quite a regular


See User information
Here I did a test with Browservice
with Odyssey to use HTML5
If anyone is interested, I'd appreciate it.
Now it is stable I have to make other changes always for WinUAE
Works well, now the base is ready

Browservice now uses the audio of your PC directly.
The card is completely disabled in WinUAE
this increases the speed.
Other small changes also on Odyssey because in this case many functions are useless.

Clearly something would be needed to make better use of "Vulkan.dll"

Or something similar to a plugin that can interact with WinUAE from the graphical side.

You really need an external plugin, at least that's my idea.

Thank you

https://www.youtube.com/watch?v=Qls2boXEI4g&t=700s


Edited by white on 2022/12/4 17:25:18
Go to top
Re: A little help with FFMpeg and FFplay
Quite a regular
Quite a regular


See User information
I made some small adjustments
now the user-agent is configurable directly in browservice without having to use OS4 spoffing

The speed is now also excellent.

I'm also trying with the 68k but something doesn't seem to work

For example WRP works with 68k but doesn't allow you to do what Browservice does.
https://github.com/tenox7/wrp

Who knows if the author of IBrowse for 68k and also of the PPC version
( because both IBrowse 68k and PPC OS 4.1 versions don't work with Browservice )

Can you give an answer to this.

here the new video of the test:
https://www.youtube.com/watch?v=qIPbMSTMWhY&t=11s

Go to top
Re: A little help with FFMpeg and FFplay
Quite a regular
Quite a regular


See User information
As for streaming on Youtube
everything works fine with OS4.
I did a test with two videos that can be seen simultaneously without problems.
Previously it was unthinkable to do it without Browservice.

Bearing in mind that it's all on the same computer

For example, for the TwichTV part, the sources must be recompiled for personal use because there are various patents.

Now the hardest part surfing the internet with sites and what to do to make surfing fast.

I'm very glad it was a lot that I wanted to do this

here the video:
https://www.youtube.com/watch?v=6LusLjKdXTc&t=258s


I would like to make it work also on 68k but IBrowse has this problem it accepts the connection but then the request doesn't appear.
In practice, the requester does not appear and I cannot navigate.
this also happens on OS4.

Go to top
Re: A little help with FFMpeg and FFplay
Quite a regular
Quite a regular


See User information
Here OWB 1.6 68k in UAE-GFX version
which can see youtube videos

now you need a 68k system made to be as fast as possible.

These are just tests

uae-gfx:

https://www.youtube.com/watch?v=_Opf6eogPdA

Picasso-IV

https://www.youtube.com/watch?v=4eDQBk2lNa8


Edited by white on 2022/12/7 14:23:48
Go to top

  Register To Post

 




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




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project