rzeldent / esp32cam-rtsp

Simple RTSP (streaming image) server for the ESP32CAM. Easy configuration and monitoring through the web interface.
544 stars 96 forks source link

Problems with RTSP Streaming #122

Open lynkos opened 2 months ago

lynkos commented 2 months ago

Similar to #98, except RTSP streaming doesn't work in my case. I get the following errors:

Connection failed
VLC could not connect to '10.0.0.134:554'.

and

Your input can't be opened
VLC is unable to open the MRL 'rtsp://10.0.0.134:554/mjpeg/1'.
Check the log for details.

Here's the aforementioned [debug] log:

main debug: VLC media player - 3.0.20 Vetinari
main debug: Copyright © 1996-2023 the VideoLAN team
main debug: revision 3.0.20-0-g6f0d0ab126
main debug: configured with /Users/d-fu/vlc-3.0/extras/package/macosx/../../../configure  '--prefix=/Users/d-fu/vlc-3.0/build-arm64/vlc_install_dir' '--enable-macosx' '--enable-merge-ffmpeg' '--enable-osx-notifications' '--enable-faad' '--enable-flac' '--enable-theora' '--enable-shout' '--enable-ncurses' '--enable-twolame' '--enable-realrtsp' '--enable-libass' '--enable-macosx-avfoundation' '--disable-skins2' '--disable-xcb' '--disable-caca' '--disable-pulse' '--disable-sdl-image' '--disable-vnc' '--build=x86_64-apple-darwin19' '--host=aarch64-apple-darwin19' '--with-macosx-version-min=10.7' '--with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk' '--with-breakpad=https://mac.crashes.videolan.org' 'build_alias=x86_64-apple-darwin19' 'host_alias=aarch64-apple-darwin19' 'CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang' 'CFLAGS=-g -arch arm64' 'LDFLAGS=-arch arm64' 'CXX=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++' 'CXXFLAGS=-g -arch arm64' 'OBJC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang' 'OBJCFLAGS=-g -arch arm64'

Here are the specs:

ESP32

Board type: esp32cam_ai_thinker
SDK Version: v4.4.6-dirty
CPU model: ESP32-D0WD-V3 rev. 3
CPU speed: 240 Mhz
CPU cores: 2
RAM size: 267.15 KB
PSRAM size: 4 MB
Flash size: 4 MB

Diagnostics

Uptime: 00:00:54
RTSP sessions: 0
Free heap: 150.26 KB
Max free block: 107.99 KB

Network

Host name: esp32-4022d8eecc98.local
Mac address: MAC_ADDR
Wifi mode: STA
Access point: WIFI_SSID
Signal strength: -55 dbm
IPv4 address: 10.0.0.134
IPv6 address: 0000:0000:0000:0000:0000:0000:0000:0000

Camera

Frame rate: 10 ms (100.0 f/s)
Frame size: QVGA (320x240)
JPEG quality: 50 [1-100]
Brightness: 0 [-2,2]
Contrast: 0 [-2,2]
Saturation: 0 [-2,2]
Special effect: Normal
White balance: Auto
AWB gain: Auto
WB mode: Home
Exposure control: Auto
Auto exposure control (dsp): Enabled
Auto Exposure level: 0
Manual exposure value: 300
Gain control: Auto
AGC gain: 0
Gain ceiling: 2X
Black pixel correct: Auto
White pixel correct: Auto
Gamma correct: Enabled
Lens correction: Enabled
Horizontal mirror: Normal
Vertical flip: Normal
Downsize enable: Enabled
Color bar: Camera
rzeldent commented 2 months ago

Hi Kiran,

Does the camera on the esp32-cam initialize properly? This should be present somewhere in the serial logging from the esp. If the camera can not be initialized, no connections are accepted for rtsp

lynkos commented 2 months ago

Hi Kiran,

Does the camera on the esp32-cam initialize properly? This should be present somewhere in the serial logging from the esp. If the camera can not be initialized, no connections are accepted for rtsp

Hi @rzeldent, thanks for reaching out! I'm not quite sure if it's initialized properly; HTTP streaming works perfectly, so I'm assuming it is?

rzeldent commented 2 months ago

Yes, if HTTP streaming is working the camera is certainly initialized...

Try using some more conservative settings like a lower framerate (40ms) and a lower jpeg quality. Not sure but 100f/s is a bit too much..

FallcorpIndustries commented 2 months ago

Did you resolve it ?

ylongwang2782 commented 1 month ago

I think I have meet the same problem~ All the setting is deafault. The http stream http://192.168.8.106/stream works very well. But the RTSP camera stream: rtsp://192.168.8.106:554/mjpeg/1 works bad in case that I am using the VLC to connect to the rtsp camera. The result is that VLC can connect to the RTSP camera but there is nothing but black