retina icon indicating copy to clipboard operation
retina copied to clipboard

Need help to run the code

Open thalesmaoa opened this issue 1 year ago • 8 comments

Hello, just arrived by a suggestion of @thatdevsherry, but I'm a completely dumb in rust. Never used and I'm having difficulties to understand its work flow. After some reading, I tried to run the example, but I get an error:

$ cargo run --package client mp4 --url rtsp://192.168.11.125:8800/ 
error: Found argument '--url' which wasn't expected, or isn't valid in this context

	If you tried to supply `--url` as a value rather than a flag, use `-- --url`

USAGE:
    cargo run --package [<SPEC>...]

For more information try --help

I have a cheap chinese brand that open using V380. I need to open it in the computer. I can find the reason for that.

thalesmaoa avatar Jun 26 '23 11:06 thalesmaoa

Hey, can you also try running my forked repo of retina? I had tried messing around with it to support my v380 camera. If it doesn't work on upstream retina but works on my fork, then both of our cameras have the same problem.

I'm able to use my forked version to get an RTSP stream, using the following command

cargo run --package client mp4 --url rtsp://192.168.10.10 out.mp4

Relevant V380 PR

thatdevsherry avatar Jun 26 '23 16:06 thatdevsherry

$ cargo run --package client mp4 --url rtsp://192.168.11.125:8800/

Sorry, typo in the README. Instead of mp4 --url, it should read mp4 -- --url. The extra -- ends the arguments to cargo itself (Rust's build tool) and starts the arguments that should be passed through to the program being run.

scottlamb avatar Jun 26 '23 16:06 scottlamb

Sorry, but I've being trying to understand my problem, but I think this is a really simple and noob problem.

$ cargo run --package client mp4 -- --url rtsp://10.254.1.223:8800 --username admin --password password out.mp4
error: package(s) `mp4` not found in workspace `/home/thales/chinese_camera/retina`

Really need help.

thalesmaoa avatar Jun 29 '23 12:06 thalesmaoa

Hello, not sure why I had this problem before. I've made a new clone and everything works great.

$ cargo run --package client mp4 --url rtsp://10.254.1.223:8800 --username admin --password password out.mp4
    Finished dev [unoptimized + debuginfo] target(s) in 0.23s
     Running `target/debug/client mp4 --url 'rtsp://10.254.1.223:8800' --username admin --password password out.mp4`
E20230713 11:03:10.417 main client] Fatal: Error reading from RTSP peer: EOF while expecting response to DESCRIBE CSeq 1

conn: 10.0.2.15:50776(me)->10.254.1.223:8800@2023-07-13T11:03:10
msg: 0@2023-07-13T11:03:10

@thatdevsherry , I've tried your repo, but I get the following error.

Here is the capture of wireshark. wireshark.pcapng.zip

thalesmaoa avatar Jul 13 '23 14:07 thalesmaoa

@thalesmaoa I see that you're using rtsp://10.254.1.223:8800. Can you try using just rtsp://10.254.1.223 or rtsp://10.254.1.223:554, since RTSP usually has port 554 assigned. I have seen 8800 open on my v380 cam as well, but I'm pretty sure it's used for something else.

thatdevsherry avatar Jul 13 '23 14:07 thatdevsherry

The only opened port is the 8800.

$ sudo nmap 10.254.1.223
[sudo] senha para thales:        
Starting Nmap 7.80 ( https://nmap.org ) at 2023-07-13 12:00 -03
Nmap scan report for 10.254.1.223
Host is up (0.0031s latency).
Not shown: 999 closed ports
PORT     STATE SERVICE
8800/tcp open  sunwebadmin

Nmap done: 1 IP address (1 host up) scanned in 1.90 seconds

If I try without it:

$ cargo run --package client mp4 --url rtsp://10.254.1.223 --username admin --password password out.mp4
    Finished dev [unoptimized + debuginfo] target(s) in 1.06s
     Running `target/debug/client mp4 --url 'rtsp://10.254.1.223' --username admin --password Cameraadmin123 out.mp4`
E20230713 11:59:33.262 main client] Fatal: Unable to connect to RTSP server: Connection refused (os error 111)

thalesmaoa avatar Jul 13 '23 15:07 thalesmaoa

I have a feeling that your v380 firmware doesn't support ONVIF. Mine didn't either. I had to contact the v380 team with my cam details and they sent me a new firmware to flash to the cam. After that, I could see onvif setting in my cam settings on v380 app under Advanced settings > Onvif setting.

Could you verify that you have Onvif setting in your cam settings under v380 app?

thatdevsherry avatar Jul 13 '23 15:07 thatdevsherry

I will try as you suggested and let you know. Thanks

thalesmaoa avatar Jul 13 '23 15:07 thalesmaoa