ozonesecurity / ozonebase Goto Github PK
View Code? Open in Web Editor NEWOpen Source, MIT licensed, SDK for Video Innovation & CCTV solutions http://ozone.network
License: Other
Open Source, MIT licensed, SDK for Video Innovation & CCTV solutions http://ozone.network
License: Other
Hi,
I wanna save the video from ip camera.
however, I received an error message below:
[swscaler @ 0x7fde2c001d80] deprecated pixel format used, make sure you did set range correctly
[mpeg4 @ 0x7fde2c0018e0] intra_quant_bias = 0 inter_quant_bias = -64
terminate called after throwing an instance of 'std::runtime_error'
what(): 04/16/20 04:50:16.974709 starter-example[23709].FAT-/home/build/ozonebase/server/src/consumers/ozMovieFileOutput.cpp/201 [Could not open output filename '/transfer/test2-1587012616.mp4'
Here's my code :
string camera2 = "rtsp://192.168.0.10/profile2/media.smp";
AVInput test2("test2", camera2);
app.addThread(&test2);
VideoParms videoParms( 640, 480 );
AudioParms audioParms;
MovieFileOutput movie( test2.cname(), "/transfer", "mp4", 100, videoParms, audioParms );
movie.registerProvider( test2 );
app.addThread( &movie );
Please let me know which part did I make mistake.
Thanks.
For @web2wire:
We need to modify ozone code to work with open264 and not x264. I suspect the problem lies in the av_ apis used in ozFfmpeg.cpp but don't know enough to change it.
trying to write an mp4 file for events produces
Jul 6 20:08:25 ubuntu nvrcli[22863]: FAT [Could not open video codec]
Why open264? Using open264 doesn't require --enable-gpl with ffpmeg. License & faq.
Steps to reproduce:
a) Build open264, release 1.5
git clone https://github.com/cisco/openh264.git
cd openh264/
git checkout openh264v1.5
make; sudo make install
b) Build ffmpeg with open264
git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
git checkout release/2.8
./configure --enable-shared --enable-libopenh264 --extra-ldflags=-L/usr/local/lib
make; sudo make install
c) Try to create an mp4 file - write a simple example, or use nvrcli
Error:
nput #0, rtsp, from 'rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov':
Metadata:
title : BigBuckBunny_115k.mov
Duration: 00:09:56.48, start: 0.000000, bitrate: N/A
Stream #0:0, 13, 1/12000: Audio: aac (LC), 12000 Hz, stereo, fltp
Stream #0:1, 28, 1/90000: Video: h264 (Constrained Baseline), yuv420p(left), 240x160, 1/48, 24 fps, 24 tbr, 90k tbn, 48 tbc
detected 2 logical cores
[libx264 @ 0x7fdef00018c0] broken ffmpeg default settings detected
[libx264 @ 0x7fdef00018c0] use an encoding preset (e.g. -vpre medium)
[libx264 @ 0x7fdef00018c0] preset usage: -vpre <speed> -vpre <profile>
[libx264 @ 0x7fdef00018c0] speed presets are listed in x264 --help
[libx264 @ 0x7fdef00018c0] profile is optional; x264 defaults to high
Note that the ffmpeg cli is able to encode to mp4 (I tried converting an avi to mp4) - validated it links to openh264
pp@ubuntu:~/ozonebase/server/src/examples/nvrcli$ ldd /usr/local/bin/ffmpeg
linux-vdso.so.1 => (0x00007fff25b47000)
libavdevice.so.56 => /usr/local/lib/libavdevice.so.56 (0x00007faa36b46000)
libavfilter.so.5 => /usr/local/lib/libavfilter.so.5 (0x00007faa36803000)
libavformat.so.56 => /usr/local/lib/libavformat.so.56 (0x00007faa3640f000)
libavcodec.so.56 => /usr/local/lib/libavcodec.so.56 (0x00007faa350a2000)
libswresample.so.1 => /usr/local/lib/libswresample.so.1 (0x00007faa34e87000)
libswscale.so.3 => /usr/local/lib/libswscale.so.3 (0x00007faa34bfe000)
libavutil.so.54 => /usr/local/lib/libavutil.so.54 (0x00007faa34993000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007faa34672000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007faa34453000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007faa34089000)
libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x00007faa33e79000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007faa33c5d000)
libopenh264.so.1 => /usr/local/lib/libopenh264.so.1 (0x00007faa33962000)
/lib64/ld-linux-x86-64.so.2 (0x00007faa36d57000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007faa33652000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007faa3343c000)
Is this repo actively developing or a dead project?
I noticed this error while compiling and it shows up in your automated compiles as well. Is this going to cause any issues for the nvrcli sample or any custom apps?
[ 65%] Performing configure step for 'ffmpeg' cd /home/travis/build/ozonesecurity/ozonebase/ffmpeg-prefix/src/ffmpeg-build && PKG_CONFIG_PATH=/home/travis/build/ozonesecurity/ozonebase/buildroot/home/travis/ozoneroot/lib/pkgconfig /home/travis/build/ozonesecurity/ozonebase/externals/ffmpeg/configure --enable-shared --libdir=/home/travis/build/ozonesecurity/ozonebase/buildroot/home/travis/ozoneroot/lib --prefix=/home/travis/build/ozonesecurity/ozonebase/buildroot/home/travis/ozoneroot --enable-libopenh264 --extra-ldflags=-L/home/travis/build/ozonesecurity/ozonebase/buildroot/home/travis/ozoneroot/lib --extra-cflags=-I/home/travis/build/ozonesecurity/ozonebase/buildroot/home/travis/ozoneroot/include/wels --pkg-config-flags=--define-variable=libdir=/home/travis/build/ozonesecurity/ozonebase/buildroot/home/travis/ozoneroot/lib --pkg-config-flags=--define-variable=includedir=/home/travis/build/ozonesecurity/ozonebase/buildroot/home/travis/ozoneroot/include Out of tree builds are impossible with config.h in source dir. If you think configure made a mistake, make sure you are using the latest version from Git. If the latest version fails, report the problem to the [email protected] mailing list or IRC #ffmpeg on irc.freenode.net. Include the log file "config.log" produced by configure as this will help solve the problem. make[2]: *** [ffmpeg-prefix/src/ffmpeg-stamp/ffmpeg-configure] Error 1 make[2]: Leaving directory
/home/travis/build/ozonesecurity/ozonebase'
make[1]: *** [CMakeFiles/ffmpeg.dir/all] Error 2
make[1]: Leaving directory /home/travis/build/ozonesecurity/ozonebase' make: *** [all] Error 2
need to make sure we are compliant with ffmpeg licensing https://www.ffmpeg.org/legal.html
In other words, we need to be able to git clone and build our own ffmpeg lib with the right compile options as per the url above. This will also avoid the endless loops of diff. host system ffmpeg versions and issues.
Goal is:
The cmake build system has been tested successfully from-source on redhat and ubuntu distros.
Today I moved into a (rpm) package building environment and got the unexpected linker error:
../libgen/libgen.so: undefined reference to
gConfig'`
This only occurs when attempting to build via the rpmbuild tool.
That is when I remembered the original autotools build system built static, instead of share libraries. Sure enough, changing the cmake files to build Static libraries allowed rpmbuild to successfully a package.
This issue is to remind myself to do two things:
Hi
I tried saving movie files recoded from ip camera.
But it does not create actual mp4 files while in running ozone.
MovieFileOutput recorder( "recorder" , "/tmp", "mp4", 20, videoParms, audioParms);
I think bc it does not passing progress stage while recording.
Is there any idea to solve this issue to create a recorded file?
here is the shell message:
./starter_example
Got disk I/O notification frame
DiskIO write starting for file /tmp/recorder-1587087914.mp4
Got disk I/O notification frame
DiskIO write completed for file /tmp/recorder-1587087914.mp4, 506894 bytes, result 1
Here's debug results:
[swscaler @ 0x7f72a0001d80] deprecated pixel format used, make sure you did set range correctly
[mpeg4 @ 0x7f72a00018e0] intra_quant_bias = 0 inter_quant_bias = -64
[mp4 @ 0x7f72a00008e0] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead.
Got disk I/O notification frame
DiskIO write starting for file /tmp/recorder-1587104130.mp4
[mpeg4 @ 0x7f72a00018e0] AVFrame.format is not set
[mpeg4 @ 0x7f72a00018e0] AVFrame.width or height is not set
[mp4 @ 0x7f72a00008e0] Encoder did not produce proper pts, making some up.
[mpeg4 @ 0x7f72a00018e0] AVFrame.format is not set
[mpeg4 @ 0x7f72a00018e0] AVFrame.width or height is not set
....
[h264 @ 0x7f72b0003620] RTP: missed 11 packets
....
[h264 @ 0x7fb06c003620] RTP: missed 64 packets
[h264 @ 0x7fb06c003620] unknown SEI type 229
Invalid UE golomb code
[h264 @ 0x7fb06c57eb40] unknown SEI type 229
Invalid UE golomb code
[h264 @ 0x7fb06c57eb40] bytestream overread -8
[h264 @ 0x7fb06c57eb40] error while decoding MB 79 38, bytestream -8
[h264 @ 0x7fb06c57eb40] concealing 3570 DC, 3570 AC, 3570 MV errors in I frame
...
[AVIOContext @ 0x7fb068649620] Statistics: 10 seeks, 227 writeouts
[swscaler @ 0x7fb068649900] deprecated pixel format used, make sure you did set range correctly
[mpeg4 @ 0x7fb068028580] intra_quant_bias = 0 inter_quant_bias = -64
[avi @ 0x7fb0680008c0] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead.
Got disk I/O notification frame
DiskIO write completed for file /tmp/recorder-1587104428.avi, 1266682 bytes, result 1
real life situations, mostly in home and in front of door. Purpose - craft a 'people detector' algorithm.
should put in some safeguards to return an error or wait till init is done but not crash
Ideally, to create a server implementation, a single header include and a single library include will be a very low barrier to entry for a 3rd party person wanting to get a quick start. He should be able to copy a lib and a header to his own dir and write a simple_example with just g++ example.cpp -lozoneserver -I.
or something
[ 53%] Performing configure step for 'ffmpeg'
cd /home/build/ozonebase/ffmpeg-prefix/src/ffmpeg-build && PKG_CONFIG_PATH=/home/build/ozonebase/buildroot/home/build/ozoneroot/lib/pkgconfig /home/build/ozonebase/externals/ffmpeg/configure --enable-shared --libdir=/home/build/ozonebase/buildroot/home/build/ozoneroot/lib --prefix=/home/build/ozonebase/buildroot/home/build/ozoneroot --enable-libopenh264 --extra-ldflags=-L/home/build/ozonebase/buildroot/home/build/ozoneroot/lib --extra-cflags=-I/home/build/ozonebase/buildroot/home/build/ozoneroot/include/wels --pkg-config-flags=--define-variable=libdir=/home/build/ozonebase/buildroot/home/build/ozoneroot/lib --pkg-config-flags=--define-variable=includedir=/home/build/ozonebase/buildroot/home/build/ozoneroot/include
Out of tree builds are impossible with config.h in source dir.
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
[email protected] mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solve the problem.
CMakeFiles/ffmpeg.dir/build.make:108: recipe for target 'ffmpeg-prefix/src/ffmpeg-stamp/ffmpeg-configure' failed
make[2]: *** [ffmpeg-prefix/src/ffmpeg-stamp/ffmpeg-configure] Error 1
make[2]: Leaving directory '/home/build/ozonebase'
CMakeFiles/Makefile2:144: recipe for target 'CMakeFiles/ffmpeg.dir/all' failed
make[1]: *** [CMakeFiles/ffmpeg.dir/all] Error 2
make[1]: Leaving directory '/home/build/ozonebase'
Makefile:132: recipe for target 'all' failed
make: *** [all] Error 2
Hi I got an issue above while compiling.
After copy and paste libv4l2.pc, fontconfig.pc, then typed command $ make , showing this error message.
is there anything I missing while I compile this?
Hi, I downloaded ozone on my ubuntu rn.
it's bit confused few things to run ozone for the first time.
I compiled and ran starter_example, then running html file.
Thus, it is failed to load video sources from sftp.
To set the $scope.baseurl from html file, which location should I exactly put it in?
For example, if my linux server ip is 192.111.23.231, is it correct to put this ip address?
or adding the location that "./starter_example" stored?
Please, let me know the details
Thanks
There are two copies of ozConfigDefines.h in this project:
server/src/ozConfigDefines.h
server/src/base/ozConfigDefines.h
This is confusing. One of them should be deleted. The contents of these files are quite a bit different from one another so I cannot tell which one is "right" simply based on their contents.
Both the cmake and autotools build systems use the one under the base subfolder.
Anyone have any thoughts before I nuke server/src/ozConfigDefines.h ?
@web2wire , I'm going to start tinkering with https://github.com/node-ffi/node-ffi too replicate stater-example in NodeJS and learn how stuff works here.
Would it be possible for you to create a single library, maybe something like libozoneserver.a as part of the build process?
I vote to remove Rtmp as a protocol handler- I think its pretty much dead as of today. Comments?
Sorry to do this here, but I'm not sure where else to ask.
Your project is C++ and cross-platform. It uses cmake for building on each system. I am starting a project with a similar set of properties. I would like to know what IDE you use and does it create the cmake files for you and maintain them? Also, how do you easily integrate the submodules into the build as static libraries?
putting up a placeholder - one of us will get to this eventually
It is useful for application developers to know when a particular class has completed a transaction it was meant to do.
Example, my app may want to know when EventRecorder has finished completing an event recording to update my DB, or when MovieFileOutput writes a video.
This should in in addition to the API docs - which is really, a deeper device.
Hi
Is it available to save recording files as m3u8 format threw oZone?
I'd tried using MovieFileOutput to save it but error came out.
Please let me know any idea to get m3u8 from ozone
Thanks
so our example code can look like:
oz::Application app
and so forth, for all public APIs
This is particularly useful for local videos that can expire soon.
Fatal should be sparingly used and program exits only when its in a really messed up state. Missing RTSP feeds/timeouts etc are not candidates for program exit.
I tried to run the examples through the docker images: https://hub.docker.com/u/web2wire/
However, I wasn't able to reproduce the same results of the page: http://demo.ozone.network:9280/demo.html
Step-by-step this is what I did:
$ docker pull web2wire/ozonedev
$ docker run -it web2wire/ozonedev /bin/bash
container$ ./bootstrap-ozone.sh
container$ cd demo
container$ ./run-demo.sh
and this was the output:
2016-12-13 17:56:48,791 CRIT Set uid to user 1000
2016-12-13 17:56:48,799 INFO RPC interface 'supervisor' initialized
2016-12-13 17:56:48,799 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2016-12-13 17:56:48,799 INFO supervisord started with pid 96
2016-12-13 17:56:49,802 INFO spawned: 'app' with pid 99
2016-12-13 17:56:49,803 INFO spawned: 'schedule' with pid 100
2016-12-13 17:56:49,881 INFO exited: app (exit status 1; not expected)
2016-12-13 17:56:50,883 INFO spawned: 'app' with pid 115
2016-12-13 17:56:50,884 INFO success: schedule entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-12-13 17:56:50,957 INFO exited: app (exit status 1; not expected)
2016-12-13 17:56:52,959 INFO spawned: 'app' with pid 120
2016-12-13 17:56:53,037 INFO exited: app (exit status 1; not expected)
2016-12-13 17:56:56,040 INFO spawned: 'app' with pid 125
2016-12-13 17:56:56,110 INFO exited: app (exit status 1; not expected)
2016-12-13 17:56:57,111 INFO gave up: app entered FATAL state, too many start retries too quickly
I notice the files on /ozonebase/server/src/examples/
but I'm not sure how to access starter_example.html from my host browser...
I hope someone can assist me on solving this, so I can be able to try oZone
While committing please refer to #7
Hi
I wanted to play mp4 on html5 after saving RTSP video files created by MovieFileOutput.
MovieFileOutput recorder("cam", "video", "mp4" ,40, videoParms, audioParms );
recorder.registerProvider(people2);
Because it's encoded to MP4V, however, there is a codec issue to play it on html5.
Is there any solution to record MP4 files with h264?
Ubuntu version is 16.04
Please let me know the details.
Thanks.
a) figure out a way not to build ffmpeg each time
b) reduce noise on slack
The build system is inherited from ZM V1 and has tools and headers that aren't really relevant to V2. Should be tidied and updated.
Lets see what happens
Related to #45
- When not reachable
- When reachable but no feed
- When blank screen/blue screens are being shown (maybe keep a counter of same frames and report if all of them are uniform color) -not sure if SignalChecker does this? Not sure if this is the same as "reachable but no feed"
- When motion is detected
- When a "new event" recording is started
- When a "new event" recording is completed
- When a "new movie" recording is started
- When a "new movie" recording is stopped
I get a lot of errors, but the rest of them might be a domino effect. The first error is:
/home/phire/ozonebase/server/src/base/../libimg/libimgImage.h: At global scope: /home/phire/ozonebase/server/src/base/../libimg/libimgImage.h:276:28: error: expected identifier before numeric constant enum { CHAR_HEIGHT=11, CHAR_WIDTH=6 }; ^
It seems the newer gcc libraries now define a CHAR_WIDTH and CHAR_HEIGHT in the standard headers. I would just rename them, but am unsure how to find all of the references in all of the files to do so.
This code loops a video when it reaches EOF. However, the browser needs to be refreshed to see the looped video (frames keep going, but seems the persistent connection with the browser is terminated before the loop starts).
a) fills in dummy frames when there is no provider (at any time)
b) Be able to generate some form of notification to the app when its being used (app will use this to detect the case when there is no camera feed)
c) Ensure downstream processors don't analyze when we have dummy frames
zmConfgen, zmDB and stuff like that should be taken out (plus all namespaces to be oz #5 )
Code uses custom counted pointers, pthreads and other functions that are native in more recent version of C++. Suggest migrating to C++11.
Also quite a lot of warnings needs to be tidied.
Probably should be evident from the class names what the component is
Start with http://dlib.net/face_detection_ex.cpp.html
and go from there
output:
git submodule update --init --recursive Submodule path 'externals/dlib': checked out '97151133b07c434c16222a2e11ec735ab19e2540' Submodule path 'externals/ffmpeg': checked out 'da4ea971617351600f49437bc9d489e650b4de38' Submodule path 'externals/json': checked out '0f04e42dd5ee53af466e25a82667fe4c3b039775' Submodule path 'externals/openh264': checked out '9e75838c8638c48a32b15c73c9da7b1fe942fd5f'
when I look up the commit for dlib, it is dated before the current master. I am unable to determine how it is choosing what version to check out.
I want to know if there is a way to save the original stream when there is an event instead of reencoding it? If I were using a camera directly connected through V4L, then I would want to encode the video for storage. With IP cams, the stream is already in h264 or h265 in most cases and I would want to preserve that.
If there isn't a way to do this currently, would you be open to the addition of the feature? I could work on it once the other PR gets merged.
We should create man page documentation of some sort. Since we are not distributing an executable, other than example programs, there is some question as to how to name it.
I'm looking at ffmpeg's manpage documentation and it looks like they've created the following man pages, which follow the names of their libraries:
ffmpeg-scaler
ffmpeg-resample
ffmpeg-codecs
ffmpeg-devices
If we followed that format, our project should have the following man pages added:
ozonebase-base (if it can be used by third parties)
ozonebase-consumers
ozonebase-encoders
ozonebase-libimg
ozonebase-libgen
ozonebase-processors
ozonebase-protocols
ozonebase-providers
or perhaps oz-libname for short
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.