Comments (12)
We will release the new version of the package until the end of April.
WebRTC API is changed a lot, please see the reference and let me know if your problem hasn't solved yet.
https://docs.unity3d.com/Packages/[email protected]/api/Unity.WebRTC.VideoStreamTrack.html
from com.unity.webrtc.
This issue is reported on Unity Forum. It seems a bug caused by the method, not WebRTC package.
https://forum.unity.com/threads/resulting-screenshot-image-in-game-is-upside-down-and-not-correctly-positioned.848230/
Regarding the support for RenderTexture, the new API for VideoStreamTrack looks great.
Regarding the GameView, I guess it's a bug related to the Engine in general.
In the attached image, you can see that CaptureScreenshotIntoRenderTexture from a GameView of 480*640px to a RenderTexture of the same size, outputs cut and flipped image to the RenderTexture.
from com.unity.webrtc.
I didn't test it(need to upgrade my project to 2019.3), but from the API it looks good.
So sure, you can close.
Thanks for adding the feature :)
from com.unity.webrtc.
Can you please elaborate what you mean by streaming the GameView in the editor ?
In the sample we provided, we are already showing the rendering results on both the browser, and the editor.
from com.unity.webrtc.
Streaming the editor tab Game View(And not the game view in a compiled game), to a WebRTC instance(web page, android app, etc...).
The current package only enables to stream a camera, without screen space overlay canvases...
Thanks
from com.unity.webrtc.
The template does the following
- Renders to a render texture
- Streams the render texture to the network (WebRTC instance)
- Blits the render texture in the game view
So we have the rendered results showing in both the WebRTC instance, and the game view in the editor.
The code to blit the render texture only exists in the template, not in the package, so perhaps this is the part you are looking for ?
from com.unity.webrtc.
The constructors of MediaStream are internals:
internal MediaStream(RenderTexture[] rts, IntPtr ptr)
internal MediaStream(IntPtr ptr)
The Context in WebRTC is internal:
internal static Context Context { get { return s_context; } }
I need to be able to call MediaStream(RenderTexture[] rts, IntPtr ptr) from my own code, so I'll be able to stream my own RenderTexture, and not just use
public static MediaStream CaptureStream(this Camera cam, int width, int height)
Which set a RenderTexture on a single camera
cam.targetTexture = rts[0];
I want to be able to stream the game view tab, including canvases that are set to screen space overlay, and not just canvases that are set to screen space camera.
Similar to how Unity Remote apps works.
https://play.google.com/store/apps/details?id=com.unity3d.genericremote
Thanks
from com.unity.webrtc.
RenderTexture is required to send the rendered result to the WebRTC plugin (which will then be encoded and sent to the network).
Which means that, you still need to render your screen space overlay canvases into a texture.
I think we can probably add another CaptureStream method that accepts RenderTexture directly.
Is this something that will work for you ?
from com.unity.webrtc.
Yes. CaptureStream for RenderTexture would be great.
And if it's possible to also add CaptureStream for the GameView tab it'll be nice.
Thanks
from com.unity.webrtc.
+1
I also want a CaptureStream that accepts RenderTexture directly Or Public MediaStream.
Case 1
https://assetstore.unity.com/packages/tools/camera/super-cubemapper-360-texture-sharing-154428
This asset renders an Equirectanguler in a RenderTexture. I want to send this RenderTexture.
Case 2
I have implemented a paint function using RenderTexture and want to send it.
from com.unity.webrtc.
Regarding the support for RenderTexture, the new API for VideoStreamTrack looks great.
Regarding the GameView, I guess it's a bug related to the Engine in general.
In the attached image, you can see that CaptureScreenshotIntoRenderTexture from a GameView of 480*640px to a RenderTexture of the same size, outputs cut and flipped image to the RenderTexture.
from com.unity.webrtc.
Would you mind that I close this issue?
Please let me know if anyone has problems related to the issue.
from com.unity.webrtc.
Related Issues (20)
- [BUG]: VideoReceiveSample received texture not updating HOT 4
- [BUG]: Simulcast only working stable on 720p or lower qualities HOT 9
- [BUG]: Plugin crashes during load with NVIDIA gpu that doesn't support NVDEC HOT 15
- [REQUEST]: How can I set the `DegradationPreference` which defined in `rtp_parameters.h` in webrtc source code? HOT 1
- [BUG]: Missing meta files for /Runtime/Plugins/iOS HOT 4
- [BUG]: Memory leak when receiving long-running video stream (iOS, Mac, Linux) HOT 3
- [BUG]: VideoStream onTrack doesn't work in the Android environment. HOT 1
- [REQUEST]: Can the receiving party extract float-type data containing the other party's voice data? HOT 1
- [REQUEST]: Manually set VideoStreamTrack label HOT 2
- [BUG]: Erratic ICE with multiple parallel PeerConnections HOT 1
- [REQUEST]: Add a public function to update the frame rendering under application control HOT 2
- [REQUEST]: WebRTC for VisionOS HOT 15
- [BUG]: No data sent on VideoStreamTracks on Pico after multiple cleanups HOT 1
- [BUG]: Segmentation Fault on Startup with High Resolution Display (Version 2021.3.20f1) HOT 1
- [BUG]: Freezing when RTCPeerConnection is closing HOT 2
- [BUG]: Encoder/Decoder priority HOT 2
- [BUG]: Wrong Candidate Pair Generation while establishing ICE Connection HOT 1
- [BUG]: E2ELantency calculation
- [BUG]: High Latency in Receiving Video Stream with H264 codec
- [REQUEST]: Implemention of RtcDataChannel bufferedAmountLowThreshold and bufferedamountlow HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from com.unity.webrtc.