prsyahmi / v380 Goto Github PK
View Code? Open in Web Editor NEWExtract h264 from V380 camera
License: MIT License
Extract h264 from V380 camera
License: MIT License
Hi,
Could you help me with this?
I have compiled it on Linux with the make command on an Ubuntu 18.04.
Results:
./v380 -u admin -p xxx -port 8800 -addr 192.168.3.19 | ffplay -vcodec h264 -probesize 32 -formatprobesize 0 -avioflags direct -flags low_delay -i -
ffplay version 3.4.8-0ubuntu0.2 Copyright (c) 2003-2020 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
No protocol specified
stoi
stoi
stoi
stoi
stoi
Segmentation fault (core dumped)
Another issue:
./v380 -u admin -p xxx -port 8800 -addr 192.168.3.19 | ffmpeg -i - http://localhost:8090/feed1.ffm
ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
stoi
stoi
stoi
stoi
stoi
pipe:: Invalid data found when processing input
Thank u for you help!
What exactly should I put in the ffplay command?
▶ ./v380 -u device2 -p password2 -port 8800 -ip 192.168.1.9 | ffplay -vf \"setpts = N / (25 * TB)\" -i -
zsh: no matches found: (25 * TB)"
Camera address not set
Hello!
I'm using the v380 (C++) the connection is made but no video is being played by ffplay.
The video seems to be sending because the data is very similar to the data being sended when using the v380 pro android app.
I tried the nodejs implementation but it says that the password is invalid.
Also, if anyone find the problem that is happening and got the video playing, the video is kinda dark because the camera is in a place totally dark.
Wireshark dump: https://anonfiles.com/11n7K2V0xc/v380_video_dump_pcapng
I tried to connect to my camera by MAC Address but I can't seem to work it.
▶ ./v380 -p [insert password] -mac [insert mac address] | ffmpeg -i - http://localhost:8090/feed1.ffm
ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
built with Apple clang version 11.0.0 (clang-1100.0.33.8)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.1_2 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-13.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-13.jdk/Contents/Home/include/darwin -fno-stack-check' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
Recieve failed with error 54
Recieve failed with error 54
Recieve failed with error 54
Recieve failed with error 54
Recieve failed with error 54
pipe:: Invalid data found when processing input
How do I resolve this?
Hi, just trying out to record audio from my Chinese IP cam. In the v380 Android app it works great (2-way).
I´m using the following to get a .mp4 file
./v380 -u admin -p MYPWD -addr X.X.X.X | ffmpeg -i - -r 25 -vcodec copy -acodec copy -map 0 -t 10 ./test.mp4
Is it possible to save the output to files without being fast forward or lagging? I have been trying for months and I can't find out how to fix it...
I can see it live at normal speed with the following command (it's good):
v380 -u myuser -p mypassword -port 8800 -addr 192.168.0.80 | ffplay -vcodec h264 -probesize 32 -formatprobesize 0 -avioflags direct -flags low_delay -i -
I tried to save to file every 1 minute with the following command but the video is too fast. Can you help me?
v380 -u myuser -p mypassword -port 8800 -addr 192.168.0.80 | ffmpeg -vcodec h264 -probesize 32 -formatprobesize 0 -avioflags direct -flags low_delay -i - -c copy -f segment -strftime 1 -segment_time 60 -segment_atclocktime 1 -segment_format mp4 a%Y-%m-%d_%H-%M-%S.mp4
It looks like the password encryption details have changed, and one of the values in the login request. This issue documents how far I've got with working this out - but I still haven't quite got it working.
I am using a V380 with firmware Hw_AWT3610E_XHR_E_V1.0_WF_20231114. It works fine with the V380 Pro Android app. However when I use this v380 tool (on Linux) I see Login response: unsupported -11, continuing
.
I ran tcpdump comparing v380 with what the Android app is doing. My username is keith
, password abcDEF123
, device ID 80622350
. See below.
You can see from this that the password block is now 64 bytes rather than 32 bytes, and the overall buffer is 520 bytes rather than 256. You can also see that different values are set for unknown1, unknown2, unknown3, and the date is sent in the hostDateTime field.
I tried modifying the v380 code to set nBlocks to 3 rather than 1 when padding/encrypting the password and changing the length of the request, but this wasn't sufficient. However if I set unknown2 31 (instead of 2), the login works! Sadly there's more to go - while I get stream data, I can't yet play it.
Using this v380 tool:
00000000 8f 04 00 00 fe 03 00 00 02 01 00 00 00 0e 33 ce ........ ......3.
00000010 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000030 00 6b 65 69 74 68 00 00 00 00 00 00 00 00 00 00 .keith.. ........
00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000050 00 26 50 4d 23 00 34 5e 78 52 36 23 67 73 69 74 .&PM#.4^ xR6#gsit
00000060 78 c3 ee 55 15 fe 11 d1 14 a2 45 a8 d7 d4 5e 96 x..U.... ..E...^.
00000070 34 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 4....... ........
00000080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000000A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000000B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000000C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000000D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000000E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000000F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
Failing response:
00000000 9c ff ff ff 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
[...rest of response omitted; it's all nuls]
Using the Android app:
00000000 8f 04 00 00 78 00 00 00 1f 0a 00 00 00 0e 33 ce ....x... ......3.
00000010 04 32 30 32 34 2d 30 34 2d 31 33 20 31 39 3a 33 .2024-04 -13 19:3
00000020 30 3a 34 32 00 00 00 00 00 00 00 00 00 00 00 00 0:42.... ........
00000030 00 6b 65 69 74 68 00 00 00 00 00 00 00 00 00 00 .keith.. ........
00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000050 00 42 31 62 55 6a 39 41 50 6a 6b 76 4a 37 69 34 .B1bUj9A PjkvJ7i4
00000060 5a 85 a7 b2 d3 9e 88 63 a4 fd 0e 14 32 68 4d 52 Z......c ....2hMR
00000070 32 21 40 ba 6a 1d 9f 08 3a 88 42 d5 40 1f 6c 4d [email protected]... :[email protected]
00000080 23 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 #....... ........
00000090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000000A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000000B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000000C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000000D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000000E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000000F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000160 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000190 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000001A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000001B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000001C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000001D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000001E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000001F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000200 00 00 00 00 00 00 00 00 ........
Successful response:
00000000 90 04 00 00 e9 03 00 00 00 00 00 00 1f 14 9d 00 ........ ........
00000010 00 f0 15 00 00 01 00 01 00 01 00 38 30 36 32 32 ........ ...80622
00000020 33 35 30 2e 6e 76 64 76 72 2e 6e 65 74 00 00 00 350.nvdv r.net...
00000030 00 00 00 00 00 00 00 00 00 00 00 0e 33 ce 04 01 ........ ....3...
00000040 01 01 01 01 01 01 06 01 01 01 01 01 01 01 03 00 ........ ........
00000050 03 02 02 00 00 05 00 03 00 07 00 00 00 00 00 00 ........ ........
[...rest of response omitted; it's all nuls]
Hello @prsyahmi,
thanks for your work.
I was wondering if there is a way to send audio to the camera, i mean, in v380 app there is a button with microphone icon that let me send audio message played from the camera.
Do you know something about it?
Thank you
I have tried both the CPP and the NodeJS versions of your tool. While everything works well on the NodeJS app, I keep getting the following error on the CPP version of the app.
Unable to find camera with specified mac/id
(Yes, with the same details)
Any idea about why this might be happening?
Have you ever tried using a basic IP cam viewer? Unlike your app, they ask for other details apart from IP and login details like channel number and RTSP port. I'm trying to get the live stream locally on a custom (and older) Android device which doesn't support the official V380 apps. Even to watch a simple network stream, I'd need a URL with protocol, IP, port, login (and possible path/channel) details in it.
./v380 -p Secretpass1 -addr 192.168.0.31
Connection closed
Connection closed
Connection closed
Connection closed
Connection closed
i tried every option combination with the all possible params(except -retry --enable-ptz=0) but always receive connection closed
./v380 --discover
ID: 16171531
IP: 192.168.0.31
MAC: 1c:bf:df:ca:29:12
i have verified my values all are right(i have changed all given values for privacy)
It does work using the V380S Apk, but i would like to receive video for linux
OS: Debian GNU/Linux 10 (buster) x86_64 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1 (2020-01-26) x86_64 GNU/Linux
There is no firewall blocking and i can also open a telnet connection to port 8800
Hello, thanks for all your hard work on this. Works well when I am using only one LAN interface and have an explicit gateway specified, but when I change to using NO GATEWAY, I cannot connect to V380 IP camera. When no gateway is specified, I get
Discovery failed to send data 101
Camera is on same network segment, should be able to connect without gateway, not sure what's going on. I can ping it just fine with no gateway specified.
Hey prsyahmi. You ever figure out how to get audio out of these v380 cameras?
I remember you mentioning that the types that spit out video for me weren't in the standard. Can you point me to this standard? I can't find anything about a v380 standard.
Also, ffmpeg stopped supporting ffserver and after upgrading my ubuntu to 20.04, now my ffserver/ffmpeg RTSP stream is broken and I have been fighting for a week trying other options and trying to force ffserver to work without any luck. Any advice?
Thanks again for making this.
if structure use connecting by id to ffplay then is it capable. when equipment and app android aren't using internet together
After compilation I get this error:
./v380 --discover
terminate called after throwing an instance of 'std::runtime_error'
what(): Discovery failed to send data 1
./v380 -u admin -p Password -addr 192.168.1.13 -port 8800
Discovery failed to send data 1
Discovery failed to send data 1
Discovery failed to send data 1
Discovery failed to send data 1
Discovery failed to send data 1
Hello! I'm using v380 with the newest firmware
Software version: AppV380E31_V1.1.6.3_202111105
Firmware version: HwV380E31_WF8_PTZ_WIFI_20201218
The v380 tool successfully discovers the cam, but outputs errors on attempt to output video:
$ ./v380 -id 58017398 --addr --output=video -p
Login response: unsupported -11, continuing
Unknown 0x9c command
Stream stopped, restarting stream
Login response: unsupported -11, continuing
Unknown 0x9c command
Stream stopped, restarting stream
Login response: unsupported -11, continuing
Unknown 0x9c command
Stream stopped, restarting stream
Login response: unsupported -11, continuing
Unknown 0x9c command
Stream stopped, restarting stream
Login response: unsupported -11, continuing
Unknown 0x9c command
Stream stopped, restarting stream
Same for nodejs version:
$ npm run start
[email protected] start
ts-node src/app.ts
Login response: unsupported -11, continuing
RangeError [ERR_OUT_OF_RANGE]: The value of "value" is out of range. It must be >= 0 and <= 4294967295. Received -11
at checkInt (internal/buffer.js:68:11)
at writeU_Int32LE (internal/buffer.js:688:3)
at Buffer.writeUInt32LE (internal/buffer.js:701:10)
at Primitive.pack (/home/mike/git/v380/v380-nodejs/node_modules/typebase/typebase.js:162:21)
at Struct.pack (/home/mike/git/v380/v380-nodejs/node_modules/typebase/typebase.js:260:24)
at Socket. (/home/mike/git/v380/v380-nodejs/src/app.ts:268:22)
at Socket.emit (events.js:314:20)
at Socket.EventEmitter.emit (domain.js:483:12)
at emitReadable_ (_stream_readable.js:557:12)
at processTicksAndRejections (internal/process/task_queues.js:83:21) {
code: 'ERR_OUT_OF_RANGE'
}
What do I do with this?
Hi, after i run npm run start, the screen if flooded with unknown type 40 /unknown type 41 messages,
npm run start
[email protected] start /root/cam_380/v380/v380-nodejs
ts-node src/app.ts
Camera logged in
1920x1080 @ 20 fps
Server started at port 4000
unknown type 40
unknown type 40
unknown type 40
unknown type 40
unknown type 40
unknown type 40
unknown type 40
unknown type 40
unknown type 40
unknown type 40
unknown type 40
unknown type 40
unknown type 40
unknown type 40
unknown type 40
unknown type 40
unknown type 40
unknown type 40
unknown type 40
unknown type 40
unknown type 40
unknown type 40
unknown type 41
unknown type 41
unknown type 41
I think the latest commit it doesn't like DWORD
In file included from v380.cpp:8:
./FlvStream.h:7:2: error: unknown type name 'DWORD'
DWORD m_VideoTick;
^
./FlvStream.h:8:2: error: unknown type name 'DWORD'
DWORD m_AudioTick;
^
./FlvStream.h:9:2: error: unknown type name 'DWORD'
DWORD m_VideoCts;
^
./FlvStream.h:10:2: error: unknown type name 'DWORD'
DWORD m_VideoPts;
^
4 errors generated.
make: *** [v380.o] Error 1
Hi, I have some V380 (macrovideo) cameras and I want to be able to modify her firmware. How are you getting this information to build the program?
If you need collaboration I am available so as soon as possible I will work on porting your code to Python so that I can integrate with Home Assistant (https://home-assistant.io) for example.
Thanks.
Thanks for your work! Very useful and educational.
This is not related to existing code but just wondering while looking at network traffic if any info seen on switching cameras at night?
I use some basic ffmpeg + bash scripts to monitor the rtsp stream + ffmpeg scene change filter to dump images only when motion is detected and notify phone. Its very half baked and basic but it works for my needs (at least during the day).
Issue is at around 6-630 pm some type of camera switch event seems to take place and I get some other view pointing somewhere else. Sometimes this switchover doesn't happen or it happens briefly and switches back to the original view which is good enough even at night.
So was looking for ways to prevent this switching event and found your project. Any details or advice would be appreciated! Thanks 🙏
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.