Why local video cannot be rendered on UI?

This phenomenon occurs intermittently and it bothers me for days. logs:
Local Date: 5月 15 2020 Local Time: 15:59:18
Build info: Mar 4 2020 21:32:13 r
INFO 15:59:18:056 18692; API call to enable video
INFO 15:59:18:057 18692; API call to enable local audio
INFO 15:59:18:057 18692; API call to join channel ‘10’ uid 0, SDK ver 2.9.1.46 build 110, device info ‘Gigabyte Technology Co., Ltd./B250M-D2VX-SI/x64-based PC/Windows 10.0.18363’
INFO 15:59:18:058 18692; API call to create data stream, id = 49153
DEBUG 15:59:18:058 18692; async_queue created: 00000218BB6A8F30
DEBUG 15:59:18:062 19632; api call executed: rtc.log_file err 0, err msg is “no error”
DEBUG 15:59:18:062 19632; [asr] api call report, too frequently, cache item
INFO 15:59:18:062 19632; [rp] {“rtc.video.enabled”:true}
INFO 15:59:18:062 19632; API call to enable video
DEBUG 15:59:18:062 19632; api call executed: rtc.api.enable_video err 0, err msg is “no error”
DEBUG 15:59:18:062 19632; api call executed: rtc.video.enabled err 0, err msg is “no error”
DEBUG 15:59:18:062 19632; [asr] api call report, too frequently, cache item
INFO 15:59:18:062 19632; [rp] {“che.audio.enable.recording.device”:false}
DEBUG 15:59:18:062 19632; api call executed: che.audio.enable.recording.device err 0, err msg is “no error”
DEBUG 15:59:18:062 19632; [asr] api call report, too frequently, cache item
INFO 15:59:18:062 19632; [rp] {“rtc.audio.mute_me”:true,“che.audio.mute_me”:true}
DEBUG 15:59:18:062 19632; api call executed: rtc.audio.mute_me err 0, err msg is “no error”
DEBUG 15:59:18:062 19632; api call executed: che.audio.mute_me err 0, err msg is “no error”
DEBUG 15:59:18:062 19632; [asr] api call report, too frequently, cache item
INFO 15:59:18:062 19632; doStopLastmileProbeTest
INFO 15:59:18:062 19632; CALL BEGIN: appid:'3c*************************37’ cname:‘10’ info:’’ sid:‘F8E2FA1906CB454586901687560C93E8’
INFO 15:59:18:062 19632; addRef of media engine, ref=1
DEBUG 15:59:18:063 19632; async_queue created: 00000218AB6097B0
INFO 15:59:18:063 19632; [che] create chat engine, ctx:0000000000000000
INFO 15:59:18:063 19632; [MYDEBUG] large group call false
INFO 15:59:18:063 19632; ChatEngineParameterHelper::applyMediaEngineMode:
INFO 15:59:18:063 19632; applyMediaEngineMode(): Hardware encoding false Hardware decoding false
INFO 15:59:18:063 19632; engine git commit version:d5b9f90f7 and branch:(HEAD
INFO 15:59:18:064 19632; output: kPlatformDefaultAudio
INFO 15:59:18:064 19632; [WIN_CORE] +++++++Code block begins for checking CoreAudio properties++++++
INFO 15:59:18:066 19632; AgoraRTC::AudioDeviceNotificationWindows::AudioDeviceNotificationWindows created
INFO 15:59:18:069 19632; [WIN_CORE] ===================Render Devices Enumeration===================
INFO 15:59:18:069 19632; [WIN_CORE] #rendering endpoint devices (counting all): 6
INFO 15:59:18:069 19632; [WIN_CORE] ++Endpoint 0:
INFO 15:59:18:069 19632; [WIN_CORE] ID string : {0.0.0.00000000}.{50d569e9-5452-4c02-bf73-613d96bf480a}
INFO 15:59:18:069 19632; [WIN_CORE] friendly name: “鎵0鍣?(Realtek® Audio)”
INFO 15:59:18:069 19632; [WIN_CORE] state (0x1) : ACTIVE
INFO 15:59:18:069 19632; [WIN_CORE] ++Endpoint 1:
INFO 15:59:18:069 19632; [WIN_CORE] ID string : {0.0.0.00000000}.{570bbf74-617c-41ae-b5b1-7ff831e5175d}
INFO 15:59:18:070 19632; [WIN_CORE] friendly name: “Realtek Digital Output (Realtek® Audio)”
INFO 15:59:18:070 19632; [WIN_CORE] state (0x1) : ACTIVE
INFO 15:59:18:070 19632; [WIN_CORE] ++Endpoint 2:
INFO 15:59:18:070 19632; [WIN_CORE] ID string : {0.0.0.00000000}.{6303603a-6a22-4bc9-b2a5-3d12dad9093e}
INFO 15:59:18:070 19632; [WIN_CORE] friendly name: “NVIDIA Output (2- NVIDIA High Definition Audio)”
INFO 15:59:18:070 19632; [WIN_CORE] state (0x8) : UNPLUGGED
INFO 15:59:18:070 19632; [WIN_CORE] ++Endpoint 3:
INFO 15:59:18:070 19632; [WIN_CORE] ID string : {0.0.0.00000000}.{ab3ef1d0-0139-4336-a228-0cfccf775b48}
INFO 15:59:18:070 19632; [WIN_CORE] friendly name: “NVIDIA Output (2- NVIDIA High Definition Audio)”
INFO 15:59:18:070 19632; [WIN_CORE] state (0x8) : UNPLUGGED
INFO 15:59:18:070 19632; [WIN_CORE] ++Endpoint 4:
INFO 15:59:18:070 19632; [WIN_CORE] ID string : {0.0.0.00000000}.{b095da17-74cc-4e36-8ac7-78f065d8d28f}
INFO 15:59:18:070 19632; [WIN_CORE] friendly name: “DREAMWORLD (2- NVIDIA High Definition Audio)”
INFO 15:59:18:070 19632; [WIN_CORE] state (0x8) : UNPLUGGED
INFO 15:59:18:070 19632; [WIN_CORE] ++Endpoint 5:
INFO 15:59:18:070 19632; [WIN_CORE] ID string : {0.0.0.00000000}.{da24b399-4949-4c4f-9449-7e513a37e242}
INFO 15:59:18:071 19632; [WIN_CORE] friendly name: “NVIDIA Output (2- NVIDIA High Definition Audio)”
INFO 15:59:18:071 19632; [WIN_CORE] state (0x8) : UNPLUGGED
INFO 15:59:18:071 19632; [WIN_CORE] =========================EnumDeviceEnd==========================
INFO 15:59:18:076 19632; [WIN_CORE] ==================Capture Devices Enumeration===================
INFO 15:59:18:076 19632; [WIN_CORE] #capturing endpoint devices (counting all): 4
INFO 15:59:18:076 19632; [WIN_CORE] ++Endpoint 0:
INFO 15:59:18:076 19632; [WIN_CORE] ID string : {0.0.1.00000000}.{3bc4b8db-2fd4-49ab-83b4-bba80e1afa93}
INFO 15:59:18:077 19632; [WIN_CORE] friendly name: “楹﹀厠椋?(HD Pro Webcam C920)”
INFO 15:59:18:077 19632; [WIN_CORE] state (0x1) : ACTIVE
INFO 15:59:18:077 19632; [WIN_CORE] ++Endpoint 1:
INFO 15:59:18:077 19632; [WIN_CORE] ID string : {0.0.1.00000000}.{5c10f90e-cacb-42fa-8508-82657f9e62eb}
INFO 15:59:18:077 19632; [WIN_CORE] friendly name: “绔嬩綋澹版贩闊?(Realtek® Audio)”
INFO 15:59:18:077 19632; [WIN_CORE] state (0x2) : DISABLED
INFO 15:59:18:077 19632; [WIN_CORE] ++Endpoint 2:
INFO 15:59:18:077 19632; [WIN_CORE] ID string : {0.0.1.00000000}.{a171d21a-e027-445a-8fac-0e8976753041}
INFO 15:59:18:078 19632; [WIN_CORE] friendly name: “楹﹀厠椋?(Realtek® Audio)”
INFO 15:59:18:078 19632; [WIN_CORE] state (0x8) : UNPLUGGED
INFO 15:59:18:078 19632; [WIN_CORE] ++Endpoint 3:
INFO 15:59:18:078 19632; [WIN_CORE] ID string : {0.0.1.00000000}.{c7cff824-870c-49a3-a20a-759d8bc2eaf3}
INFO 15:59:18:078 19632; [WIN_CORE] friendly name: “绾胯矾杈撳叆 (Realtek® Audio)”
INFO 15:59:18:078 19632; [WIN_CORE] state (0x8) : UNPLUGGED
INFO 15:59:18:078 19632; [WIN_CORE] =========================EnumDeviceEnd==========================
INFO 15:59:18:088 19632; [WIN_CORE] *** Windows Core Audio is supported ***
INFO 15:59:18:088 19632; [WIN_CORE] ++++++++Code block ends for checking CoreAudio properties++++++++
INFO 15:59:18:088 19632; audio jitterbuffer new smooth
INFO 15:59:18:089 21864; Thread with name:AudioFileDecoderThread started
INFO 15:59:18:089 19632; OutputMixer: start audio file decoder thread successfully
INFO 15:59:18:089 19632; OS info: Microsoft (build 18363), 64-bit
INFO 15:59:18:100 19632; [WIN_CORE] Set playout device on Windows by Windows Device Type (-2): friendly name: “鎵0鍣?(Realtek® Audio)”
INFO 15:59:18:118 19632; [WIN_CORE] Set recording device on Windows by Windows Device Type (-2): friendly name: “楹﹀厠椋?(HD Pro Webcam C920)”
INFO 15:59:18:124 19632; StereoPlayoutIsAvailable(), output: available=1
INFO 15:59:18:124 19632; StereoRecordingIsAvailable(), output: available=1
DEBUG 15:59:18:124 19632; RegisterVADCallback()
INFO 15:59:18:124 31280; Thread with name:EngineMonitorThread started
INFO 15:59:18:124 19632; RegisterVolumeNotify
INFO 15:59:18:125 19632; build AEC 0 SL = 0 simulator = 0 route = -1 in SR =48000 out SR = -1 src = 1 stereo=0 streamType = 3 audiomode = 0
INFO 15:59:18:145 19632; [WIN_CORE] Audio Engine’s current mix format for rendering shared-mode streams:
INFO 15:59:18:145 19632; [WIN_CORE] wFormatTag : 0xFFFE (65534)
INFO 15:59:18:145 19632; [WIN_CORE] nChannels : 2
INFO 15:59:18:145 19632; [WIN_CORE] nSamplesPerSec : 48000
INFO 15:59:18:145 19632; [WIN_CORE] wBitsPerSample : 32
INFO 15:59:18:166 19632; [WIN_CORE] IsFormatSupported : nChannels=2, nSamplesPerSec=48000 is supported
INFO 15:59:18:166 19632; [WIN_CORE] VoE selected this rendering format:
INFO 15:59:18:166 19632; [WIN_CORE] wFormatTag : 0x1 (1)
INFO 15:59:18:166 19632; [WIN_CORE] nChannels : 2
INFO 15:59:18:166 19632; [WIN_CORE] nSamplesPerSec : 48000
INFO 15:59:18:166 19632; [WIN_CORE] wBitsPerSample : 16
INFO 15:59:18:190 19632; [WIN_CORE] render Initialize time 0 hr 0
INFO 15:59:18:190 19632; [WIN_CORE] IAudioClient::GetBufferSize() => 1056 (<=> 4224 bytes)
INFO 15:59:18:190 19632; [WIN_CORE] render side is now initialized
INFO 15:59:18:191 28668; [WIN_CORE] render thread is now registered with MMCSS (taskIndex=1191)
INFO 15:59:18:191 28668; [WIN_CORE] [REND] size of buffer : 1056
INFO 15:59:18:191 28668; [WIN_CORE] [REND] max stream latency : 0 (0.00 ms)
INFO 15:59:18:192 28668; [WIN_CORE] [REND] device period : 100000 (10.00 ms)
INFO 15:59:18:192 28668; [WIN_CORE] [REND] initial delay : 30
INFO 15:59:18:192 28668; [WIN_CORE] [REND] endpointBufferSizeMS : 22.00
INFO 15:59:18:192 19632; [WIN_CORE] rendering audio stream has now started…
INFO 15:59:18:193 19632; output: enabled=0
INFO 15:59:18:193 19632; output: volume=33
INFO 15:59:18:193 19632; => OnWindowsCurrentDeviceChange() : kPlayoutDevice attributes 0
INFO 15:59:18:193 19632; StartPlayout complete
INFO 15:59:18:193 19632; setMuteStatus, muted: On
INFO 15:59:18:193 19632; setMuteOutput, muted: false
INFO 15:59:18:194 13112; Thread with name:AudioAsyncTask started
INFO 15:59:18:194 19632; Audio Engine Init success
INFO 15:59:18:194 19632; PipelineManager::SetDest engine = 000002193426B690
INFO 15:59:18:194 19632; agora::media::VideoEngine::CreateVideoSendTrack
INFO 15:59:18:194 2164; Thread with name:VideoAsyncTask started
INFO 15:59:18:194 19632; agora::media::VideoEngine::init: feature prerotation disabled
INFO 15:59:18:196 19632; Device Enum:Device Name:HD Pro Webcam C920
INFO 15:59:18:218 19632; Device Enum:Device Name:Logi Capture
INFO 15:59:18:247 19632; Agora Engine video codec set to custom mode role mode 0
INFO 15:59:18:247 19632; Agora Engine video codec index 1
INFO 15:59:18:247 19632; Agora Engine video stream type = 0
INFO 15:59:18:247 30740; Thread with name:VideoEncodeThread started
INFO 15:59:18:247 19632; last unique frame idx: -1 - -1
INFO 15:59:18:247 19632; EncoderWrapper::Create hardware_ = 0, hardware_low_ = 0
INFO 15:59:18:247 19632; low bit rate limit 1610612736
INFO 15:59:18:248 19632; dont need to increase unique frame idx
INFO 15:59:18:248 19632; the init unique frame idx: -1 - -1
INFO 15:59:18:248 21288; Thread with name:VideoProcessThread started
INFO 15:59:18:248 19632; agora::media::VideoEngine::setCodec: index=1 width=640 height=360 framerate=15
INFO 15:59:18:248 19632; agora::media::VideoEngine::setCodec: Intra Request = 0
INFO 15:59:18:248 30740; Thread with name:VideoEncodeThread stopped
INFO 15:59:18:248 9856; Thread with name:VideoEncodeThread started
INFO 15:59:18:248 19632; agora::media::VideoEngine::EnableLowBitRateStream: dual streams enabled 1 share 0 details 0
INFO 15:59:18:248 19632; agora::media::VideoEngine::h264WebInteropEnable: enable 0
INFO 15:59:18:248 19632; agora::media::VideoEngine::setCaptureDevice: index=0
INFO 15:59:18:248 19632; VideoSendTrackImpl::agora::VideoSendTrackImpl::UpdateCapturer capturer=00000218AB6A2210
INFO 15:59:18:248 19632; agora::media::VideoEngine::CreateVideoCapturer: interface=00000218AB6A2210
INFO 15:59:18:248 19632; agora::media::VideoEngine::setMaxVideoBitrate: max bitrate=0
INFO 15:59:18:248 19632; Setting video fec method 1, real using 1
INFO 15:59:18:248 19632; SetBandwidthAgressiveLevel to 2.
INFO 15:59:18:248 19632; dynamic sending rate control set to 2.

INFO 15:59:18:248 19632; videoEngine created and initialize here
INFO 15:59:18:248 19632; agora::media::VideoEngine::CreateVideoSendTrack
INFO 15:59:18:248 19632; [MIO] updateCapturer: (0000000000000000), type:(1)
INFO 15:59:18:248 19632; agora::media::VideoEngine::CreateAgoraDefaultCapture: type=0
INFO 15:59:18:248 19632; VideoSendTrackImpl::agora::VideoSendTrackImpl::UpdateCapturer capturer=00000218AB6A2210

Hey, could u provide complete log file? We need more information to analyze your case.

Thanks your resply,the log text is too large to paste completely. The problem I encountered is that when I use an external video source to render the texture of the remote camera to the local, and use the local camera data to render directly to the other end. I cnanot switch between the two modes in the same program. Otherwise, the local video cannot be rendered.

I descirbe my problem in detail here.

You can only have one mode in your call. If you want to switch to the other, the full rtcEngine has to be restarted which means you need to quit the channel and set the external source then re-join the call.

However, you can try to use API “DisableLocalVideo” and switch to other video souce then “enableLocalVideo” again to get access to your new video input.
Btw, https://github.com/AgoraIO/Advanced-Video/tree/master/iOS&macOS/Agora-Video-With-ARKit if u want AR demo :slight_smile:

Thank you for your reply:grin:! I will try your method and tell you my revised result. Thanks again!!!

I tried your method, but it did not work. I think I should explain my logic process to you more carefully.

  1. Load mRtEngin
  2. enable video and join channel; if (!mode1) set external video source;
  3. if (click “exit”) {disable video ; leavechannel; destroy mRtEngin;}
  4. switch to other mode named mode1, initialize mRtEngin [Go back To 1]
    It’s still not resolved. In addition, I’m building my program on unity3D. The ios code demo you recommend is not suitable for me. Hope to get your further help.

Instead of restarting the engine, can you try to leave the channel and change your setting, then re-join the channel?

And make sure in your Unity editor, you have added two different texture to in order to load two different video source.