Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Video Stream #4263

Closed
nor0x opened this issue Oct 25, 2020 · 17 comments
Closed

[Question] Video Stream #4263

nor0x opened this issue Oct 25, 2020 · 17 comments

Comments

@nor0x
Copy link

nor0x commented Oct 25, 2020

I'm pretty sure it's not the intended behavior of the newly added video features and IVideo, but would it be possible to retrieve a live video stream from a headless browser context, similar to continuous calls to page.ScreenshotAsync.

As far as I understood the new video feature, it's for recording and saving it afterwards?

@nor0x nor0x changed the title Video Stream [Question] Video Stream Oct 25, 2020
@kblok
Copy link
Contributor

kblok commented Oct 26, 2020

Hey @nor0x can you share a use case for that?

@nor0x
Copy link
Author

nor0x commented Oct 26, 2020

in my specific usecase i would want to display a (in the best case live) feed of browser pages. A headful browser is not an option in my case because the view is rendered manually on various platforms

@kblok
Copy link
Contributor

kblok commented Oct 27, 2020

cc @arjunattam

@arjunattam
Copy link
Contributor

arjunattam commented Oct 27, 2020

Thanks for this @nor0x. Yes, the video feature is built to record and save a file. We could consider providing it as a stream. Does your scenario require cross-browser support? If not, we could explore a Chromium-only workaround to support this scenario.

I will move this issue to the main playwright repo, since this is an upstream change. We could use this issue to collect more feedback on this request.

@arjunattam arjunattam transferred this issue from microsoft/playwright-dotnet Oct 27, 2020
@nor0x
Copy link
Author

nor0x commented Oct 28, 2020

thanks for the reply @arjunattam - currently Chromium-only would be very fine. Do you have a hint at what code to look at?

@atemiz
Copy link

atemiz commented Oct 28, 2020

I think eliminating the delays (currently min 100ms) between ScreencastFrame events might be useful.

https://chromedevtools.github.io/devtools-protocol/tot/Page/#event-screencastFrame

@nor0x
Copy link
Author

nor0x commented Oct 28, 2020

@atemiz good idea, i didn't know that there are 100ms between ScreencastFrame events. Just to make sure i get this right - these 100ms are in Chromium or playwright?

@pavelfeldman
Copy link
Member

Note that non-Chromium do not have this limitation and stream into vp8.

@pavelfeldman
Copy link
Member

@atemiz: thanks for the pointer, I removed the limitation upstream: https://chromium-review.googlesource.com/c/chromium/src/+/2546475, I believe that was a regression. We are still dropping frames based on the backpressure, but it should not be as bad as it used to be.

@nor0x
Copy link
Author

nor0x commented Nov 19, 2020

thanks for the update @pavelfeldman i will see how i can use this

@nor0x
Copy link
Author

nor0x commented Nov 22, 2020

Hey @pavelfeldman, another (maybe stupid) question. Chromium uses Skia for rendering, right?
If i wanted to get a snapshot or preview of the current browser content, do i always have to go through snapshotting - even if i use Skia for rendering the content on my side (currently as images)

@dgozman
Copy link
Contributor

dgozman commented Nov 23, 2020

@nor0x In theory it is possible to expose some other format representing the content being drawn (DisplayList? Maybe even Skia commands list?), but that's not the usecase Playwright focuses on.

@nor0x
Copy link
Author

nor0x commented Nov 24, 2020

@dgozman alright got it! thanks

@pavelfeldman
Copy link
Member

Thank you for reporting this issue and providing comments to those that might be facing a similar problem. I am now closing this as a part of the triage, please feel free to file a new issue with additional details. Given the limited resource and a lot of requests, we need to fulfill most popular requests and at the same time keep our issue database manageable.

@jfloodnet
Copy link

@nor0x I have a similar use case, did you get something working?

@frmsaul
Copy link

frmsaul commented Nov 19, 2024

I'm curious also. Any progress on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants