com.unity.webrtc
com.unity.webrtc copied to clipboard
[BUG]: Video resolution with odd numbered size is resized unintendedly
Package version
2.4.0-exp.7
Environment
* OS:Windows 10
* Unity version:2019.4
Steps To Reproduce
- establish a stream between android and Windows, including video
- call
ReplaceTrack
on the video track on Android, including a size change - observe on Windows that
UnityVideoRenderer.OnVideoFrameResize
does not get called on Windows
Current Behavior
OnVideoFrameResize
doesn't get called, but only on Windows. ReplaceTrack
with a new video track of the same size continues to stream. Changing the video stream on Windows, the OnVideoFrameResize
call happens on Android.
Expected Behavior
Windows should also receive the callback from the c++ side.
Anything else?
This is a new issue, not found in 2.4.0-exp6.
memo: WRS-328
More details: A texture of size 720x405 does not trigger the callback. A texture of size 720x400 does trigger the callback.
Do the dimensions need to be a multiple of some number?
@mgodfreymodest Thank you for details. That is weird... Do you know what codec you are using?
I'm not sure exactly how to get the codec information, but the documentation suggests looking at the RTCRtpSender.
On Android I get the following mime types out of the sender codecs field: video/VP8, video/H264, video/VP9 and video/rtx
On Windows I get the following mime types out of the sender codecs field: video/VP8, video/H264, video/VP9 and video/rtx
Is this useful information?
@mgodfreymodest VP8 codec on windows. it works. H264 works too. If you check it, please checkout the repository and try the develop branch.
https://user-images.githubusercontent.com/1132081/171544759-347e1b47-e312-42f1-8040-0482451ff035.mp4
Using exp7 with the develop's sample scenes, my h264 codecs do a mix of changing the resolution from 720x405 on the send side to 720x406 on the received video, and crashing unity when you replace tracks to a differently-sized video.
There are several h264 options, in the following format, all behaving this way:
@mgodfreymodest Sure, I think the crash is fixed by this PR #737. Could you test the develop branch?
I installed the plugin dll's from the develop branch. The sizing issue persists in my app.
When testing with the ReplaceTrack sample, still getting crashes when replacing from 720x400 to 720x405 using the h264 codecs.
@mgodfreymodest Ah, I haven't uploaded the latest plugin. I am checking
@mgodfreymodest Updated. Please try it again. https://github.com/Unity-Technologies/com.unity.webrtc/pull/742
Using the latest plugin version on the sample code, the crash is resolved for h264.
Trying the latest plugin in my app, only even-numbered sizes stream, still.
@mgodfreymodest Sure, this is a issue that the odd numbered size is resized unintendedly.