Color issue - broadcasting black & white

Michael

Member
Some of our broadcasters started to experience problems in the video color. The publisher playback video is fine, but when broadcasting through Flashphoner servers, the subscriber receives the image with a different color profile/problem (black, white and purple image).


We could reproduce it using:

Google Chrome 91.0.4472.101
Windows 10
Webcam: logitech brio 4k pro

Constraints:

Code:
{
"video":{
"width":"640",
"height":"480",
"maxBitrate":1024,
"minBitrate":768,
"frameRate":{
"ideal":20
},
"deviceId":"ad8dbecf6808931b65171051698133c390391de226abca96f7a466b50b3e11f3"
},
"audio":{
"autoGainControl":false,
"maxBitrate":64,
"deviceId":"default"
}
}
If we change the constraints to the below the color is fixed but transmission quality is impaired:

Code:
{
"video":{
"width":"640",
"height":"480",
"maxBitrate":768,
"minBitrate":576,
"frameRate":{
"ideal":20
},
"deviceId":"ad8dbecf6808931b65171051698133c390391de226abca96f7a466b50b3e11f3"
},
"audio":{
"autoGainControl":false,
"maxBitrate":64,
"deviceId":"default"
}
}
I will send you pictures of the transmission problem by email to preserve the identity of the broadcaster.
 

Max

Administrator
Staff member
Good day.
Seems like the upper bitrate limit
"maxBitrate":1024,
is too high for publisher or player channel. Please clarify: the problem occurs for all the subscribers of the stream, or for certain one? In the first case, this is publisher channel problem, in the second, this is player channel.
Anyway, switching to TCP transport for publisher and player should prevent a possible packet loss
Code:
session.createStream({
    name: streamName,
    display: localVideo,
    constraints: constraints,
    ...
    transport: "TCP"
}).on(STREAM_STATUS.PUBLISHING, function (stream) {
...
}).publish();
If we change the constraints to the below the color is fixed but transmission quality is impaired:
Quality should not dramatically drop while decreasing bitrate only, 600 kbps seems to be enough for 640x480. Please clarify: do you use some transcoding on WCS (video downscaling, FPS equalizing etc)?
We also met the image distortion issue like this with Tepron 4k VR camera, but local video was also distorted. The problem was in FPS value, changing it to 24 resolved this. Please try to change FPS too.
I will send you pictures of the transmission problem by email to preserve the identity of the broadcaster.
Please use the "Report" button to send any private data
1623896380627.png

If the issue is reproducing in your test environment, please collect a report as described here including client debug logs and traffic dump on server side (traffic dump collection should be started before publishing a problem stream). Please use UDP for publishing while collecting the report, in this case we can parse the dump and play the stream from it to reproduce the issue in our environment. Send the report using this private from.
 

Michael

Member
is too high for publisher or player channel. Please clarify: the problem occurs for all the subscribers of the stream, or for certain one? In the first case, this is publisher channel problem, in the second, this is player channel.
The issue happens to all subscribers.

Anyway, switching to TCP transport for publisher and player should prevent a possible packet loss
We already using TCP in session.createStream

Quality should not dramatically drop while decreasing bitrate only, 600 kbps seems to be enough for 640x480. Please clarify: do you use some transcoding on WCS (video downscaling, FPS equalizing etc)?
We are setting nothing for transcoder explicitly, but we have these options at flashphoner.properties:
Code:
# codecs
codecs                   =opus,alaw,ulaw,g729,speex16,g722,mpeg4-generic,telephone-event,h264,vp8,flv,mpv
codecs_exclude_sip       =mpeg4-generic,flv,mpv
codecs_exclude_streaming =flv,telephone-event
codecs_exclude_sip_rtmp  =opus,g729,g722,mpeg4-generic,vp8,mpv

# Webrtc
ice_tcp_transport=true
webrtc_aes_crypto_provider=JCE
rtc_ice_add_local_component=true
dtls_close_socket_after_tries=50
client_mode=false
periodic_fir_request=true

# HLS config
hls_list_size=3
hls_min_list_size=2
hls_time=2
hls_time_min=2000
hls_auto_start=true
hls_preloader_enabled=true
hls_segment_name_suffix_randomizer_enabled=true
hls_store_segment_in_memory=true

# Stream decoding on demand only must be switched on to reduce server load:
streaming_video_decoder_fast_start=true

# Other configs
decoder_priority=OPENH264,FF
enable_extended_logging=false
We also met the image distortion issue like this with Tepron 4k VR camera, but local video was also distorted. The problem was in FPS value, changing it to 24 resolved this. Please try to change FPS too.
Where we can change these configurations? on WebSDK? Flashphoner config? Or at camera configurations?
Is the constraints.video.frameRate option?
Our clients use common webcam, and can not change these configs.

We started getting a lot of complaints about this recently. All cases happening with publishers environment using Windows 10, Chrome 91 and Logitech webcams.

I am sending the prints by report button as requested.

Regards.
 
Last edited:

Max

Administrator
Staff member
is the constraints.video.frameRate option?
Yes. See also Media Devices sample.


1623942608003.png


We started getting a lot of complaints about this recently. All cases happening with publishers environment using Windows 10, Chrome 91 and Logitech webcams.
We will try to reproduce with our Logitech webcams.

For now, possible solutions:

1. Change FPS.
2. Maybe enable/disable hardware acceleration in Chrome.

However we have to reproduce this first.
 

Michael

Member
Hello

We have changed the constraints.video.frameRate to 24. But the issue persists.

I forgot to mention, we are using these constraints too, for the publishers who wants wide video, with greater width:
Code:
{
"video":{
    "width":"854",
    "height":"480",
    "maxBitrate":1024,
    "minBitrate":768,
    "frameRate":{
        "ideal":24
    },
    "deviceId":"ad8dbecf6808931b65171051698133c390391de226abca96f7a466b50b3e11f3"
},
"audio":{
    "autoGainControl":false,
    "maxBitrate":64,
    "deviceId":"default"
}
}
We will try to find the better bitrate to fix the issue, but It would be interesting if you guys tried it out and found out something else.

Regards
 

Max

Administrator
Staff member
We will try to find the better bitrate to fix the issue, but It would be interesting if you guys tried it out and found out something else.
We tested WebRTC publishing from Logitech C615HD camera, using Media Devices example with constraints you mentioned above, from Windows 10 Pro build 20H2. The problem described is not reproducing while playing WebRTC or HLS (according to your settings, HLS is transcoded to 480p).
But we met some other issues in this case (FPS may be lower than set in constraints). That seems like hardware and Microsoft standard drivers compatibility issue. May be the hardware issue occurs in your case too. Please check Logitech site for downloads for your camera, perhaps some utilities may help.
 

Max

Administrator
Staff member
Hello

We reproduced issue with webcam: logitech brio 4k pro

webrtc-chrome91-logitech-brio-4k-pro-webrtc-play-grey-screen.png


Fixed if we set resolution 800 x 450

Please note. If you set resolution 854 x 480, it does not fit 16:9 format. So webrtc endpoints like Chrome can handle such resolution inproperly.

Make sure constraints fit 16:9

800 x 450
832 x 468
864 x 486

etc.

Important. Resolution should be even. Decoders and encoders do not like odd resolutions.

BTW. We checked 864 x 486 much closer to 854 x 480 and that works fine with logitech brio 4k pro
 

Michael

Member
Hello

Thanks for your attention.

We was targetting the same height from 4:3 (640x480).
Is the reason for the 854x480 resolution, for who wants wide video.

We have tried this resolution, that fixed the issue: 1024x576

Thanks for your support
 
Top