mpromonet / webrtc-streamer

WebRTC streamer for V4L2 capture devices, RTSP sources and Screen Capture
https://webrtcstreamer.agreeabletree-365b9a90.canadacentral.azurecontainerapps.io/?layout=2x2
The Unlicense
3k stars 604 forks source link

I do not see cameras #382

Open kovenko opened 3 years ago

kovenko commented 3 years ago

Michel, I have installed webrtc-streamer in docker Rasberry Pi4 Ubuntu 20.04.2 server. However, I do not see cameras. Can you help me understand why?

~$ sudo ufw status
Status: inactive
$ sudo docker run -p 8000:8000 -it mpromonet/webrtc-streamer -n raspicam -u rtsp://194.32.173.211/axis-media/media.amp
Version:v0.3.5-9-g5765b35/Linux-arm64 civetweb@v1.13 webrtc@a208861401-dirty live555helper@897450c
{
        "urls" :
        {
                "raspicam" :
                {
                        "video" : "rtsp://194.32.173.211/axis-media/media.amp"
                }
        }
}Logger level:3
[000:000][1] (audio_device_pulse_linux.cc:1553): failed to load symbol table
[000:006][1] (audio_device_pulse_linux.cc:144): failed to initialize PulseAudio
[000:010][1] (audio_device_impl.cc:342): Audio device initialization failed.
HTTP Listen at 0.0.0.0:8000
[000:426][1] (PeerConnectionManager.h:228): virtual void PeerConnectionManager::PeerConnectionObserver::OnRenegotiationNeeded() peerid:0.08108894681720002
[000:434][1] (PeerConnectionManager.h:234): virtual void PeerConnectionManager::PeerConnectionObserver::OnSignalingChange(webrtc::PeerConnectionInterface::SignalingState) state:3 peerid:0.08108894681720002
[000:458][1] (webrtc_video_engine.cc:3382): Absent receive stream; ignoring clearing encoded frame sink for ssrc 0
[000:458][1] (PeerConnectionManager.h:213): virtual void PeerConnectionManager::PeerConnectionObserver::OnAddStream(rtc::scoped_refptr<webrtc::MediaStreamInterface>) nb video tracks:1
[000:459][11] (audio_device_pulse_linux.cc:1553): failed to load symbol table
[000:459][11] (audio_device_pulse_linux.cc:144): failed to initialize PulseAudio
[000:459][11] (audio_device_impl.cc:342): Audio device initialization failed.
[000:460][11] (CapturerFactory.h:214): audiourl: idx_audioDevice:-1/-1
[000:460][11] (PeerConnectionManager.cpp:1143): Cannot create capturer audio:raspicam
[000:461][1] (PeerConnectionManager.h:228): virtual void PeerConnectionManager::PeerConnectionObserver::OnRenegotiationNeeded() peerid:0.08108894681720002
Created new TCP socket 15 for connection
[000:465][1] (PeerConnectionManager.h:234): virtual void PeerConnectionManager::PeerConnectionObserver::OnSignalingChange(webrtc::PeerConnectionInterface::SignalingState) state:0 peerid:0.08108894681720002
Start playing sink for "video/H264" subsession
markerSize:4
[003:103][67] (h264_decoder_impl.cc:288): avcodec_receive_frame error: -11
[003:103][67] (VideoDecoder.h:67): VideoDecoder::DecoderThread failure:-1
[015:633][78] (PeerConnectionManager.cpp:752): Remove PeerConnection peerid:0.08108894681720002
[015:634][78] (PeerConnectionManager.cpp:769): hangUp stream is no more used raspicam||tcp60
[015:634][78] (PeerConnectionManager.cpp:777): hangUp stream closed raspicam||tcp60
Close session: video/H264
[015:645][1] (PeerConnectionManager.h:228): virtual void PeerConnectionManager::PeerConnectionObserver::OnRenegotiationNeeded() peerid:0.08108894681720002
[015:647][1] (PeerConnectionManager.h:234): virtual void PeerConnectionManager::PeerConnectionObserver::OnSignalingChange(webrtc::PeerConnectionInterface::SignalingState) state:5 peerid:0.08108894681720002

Try build in Ubuntu 20.04.2 server, error 'build.ninja': No such file or directory.

root@ubuntu:~/build# cmake .
WEBRTCBUILD = Release
WEBRTCROOT = /root/build/../webrtc
WEBRTCDESKTOPCAPTURE= ON
CMAKE_CXX_COMPILER_ID=GNU
CMAKE_FIND_ROOT_PATH =
ALSA_FOUND = FALSE
PulseAudio_FOUND = 0
Traceback (most recent call last):
  File "/root/depot_tools/gn.py", line 75, in <module>
    sys.exit(main(sys.argv))
  File "/root/depot_tools/gn.py", line 70, in main
    return subprocess.call([gn_path] + args[1:])
  File "/usr/lib/python2.7/subprocess.py", line 172, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 394, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child
    raise child_exception
OSError: [Errno 8] Exec format error
ninja: error: loading 'build.ninja': No such file or directory
-- Configuring done
CMake Error at CMakeLists.txt:131 (add_executable):
  Cannot find source file:

    /root/webrtc/src/out/Release/obj/rtc_base/rtc_json/json.o

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx

CMake Error at CMakeLists.txt:131 (add_executable):
  No SOURCES given to target: webrtc-streamer

CMake Generate step failed.  Build files cannot be regenerated correctly.

Thanks.

mpromonet commented 3 years ago

Hi @kovenko

It may have 2 reasons, either webrtc-streamer doesnot receive the RTP packet, or the ICE negociation fails. Did you try to start docker adding --net=host ?

About building on raspberry, I think this is not supported by WebRTC SDK, you should cross-compile.

Best Regards, Michel.