Coder Social home page Coder Social logo

Is this supposed to show a date? about sltk HOT 9 OPEN

jhdewitt avatar jhdewitt commented on September 23, 2024
Is this supposed to show a date?

from sltk.

Comments (9)

prahjister avatar prahjister commented on September 23, 2024 1

jacksonliam/mjpg-streamer#124

Can you reply to this...asking Exif or http header?

from sltk.

prahjister avatar prahjister commented on September 23, 2024

fyi this is how i start the stream

sudo ./mjpg_streamer -i "./input_uvc.so" -o "./output_http.so"

from sltk.

jhdewitt avatar jhdewitt commented on September 23, 2024

is this supposed to show a date?

Yes; first field is unix timestamp of local machine when the jpg image was fully downloaded. Second field is ts_late which is the amount of time between the JPG embedded timestamp and when the image was downloaded (two computer clock offset causes this to break). This relies on mjpg-streamer embedding a valid timestamp on outbound JPGs. Which it doesn't seem to be doing in your case

But we are in luck!

jacksonliam/mjpg-streamer@1b22b2e

As of Aug 5, 2016, mjpg-streamer added a -timestamp option to enable this functionality :)

So, your second field is showing an exceptionally high value. This suggests to me that adding -timestamp to your mjpg_streamer invocation should make this second field go to an appropriate value (<<1 second). The program relies on this to estimate which image is safe to save based on how much time has elapsed since the pattern output was updated.

sudo ./mjpg_streamer -timestamp -i "./input_uvc.so" -o "./output_http.so"

from sltk.

jhdewitt avatar jhdewitt commented on September 23, 2024

Just for reference, this is how I start it in a shell script:

mjpg_streamer -o "output_http.so -w ./www" -i "input_raspicam.so -quality 100 -x $X_RES -y $Y_RES -fps $FPS -ISO 100 -awb off -ex off --awbgainR $RED_GAIN --awbgainB $BLU_GAIN -timestamp -shutter $EXPOSURE_TIME"

The Software Setup Guide has been amended with two invocation examples.

from sltk.

prahjister avatar prahjister commented on September 23, 2024

that is wierd...it is not liking the timestamp switch
FYI
before i compile i have to

sudo apt autoremove python-opencv libopencv-dev

compile then i install again or else i get


/home/prahjister/mjpg-streamer/mjpg-streamer-experimental/plugins/input_opencv/input_opencv.cpp: In function ‘int input_init(input_parameter*, int)’:
/home/prahjister/mjpg-streamer/mjpg-streamer-experimental/plugins/input_opencv/input_opencv.cpp:275:23: error: ‘CAP_PROP_FRAME_WIDTH’ was not declared in this scope
     pctx->capture.set(CAP_PROP_FRAME_WIDTH, width);
                       ^
/home/prahjister/mjpg-streamer/mjpg-streamer-experimental/plugins/input_opencv/input_opencv.cpp:276:23: error: ‘CAP_PROP_FRAME_HEIGHT’ was not declared in this scope
     pctx->capture.set(CAP_PROP_FRAME_HEIGHT, height);
                       ^
/home/prahjister/mjpg-streamer/mjpg-streamer-experimental/plugins/input_opencv/input_opencv.cpp:279:27: error: ‘CAP_PROP_FPS’ was not declared in this scope
         pctx->capture.set(CAP_PROP_FPS, settings->fps);
                           ^
/home/prahjister/mjpg-streamer/mjpg-streamer-experimental/plugins/input_opencv/input_opencv.cpp: In function ‘void* worker_thread(void*)’:
/home/prahjister/mjpg-streamer/mjpg-streamer-experimental/plugins/input_opencv/input_opencv.cpp:399:15: error: ‘CAP_PROP_FPS’ was not declared in this scope
     CVOPT_SET(CAP_PROP_FPS, fps, "frames per second")
               ^
/home/prahjister/mjpg-streamer/mjpg-streamer-experimental/plugins/input_opencv/input_opencv.cpp:388:32: note: in definition of macro ‘CVOPT_OPT’
         if (!pctx->capture.set(prop, settings->var)) {\
                                ^
/home/prahjister/mjpg-streamer/mjpg-streamer-experimental/plugins/input_opencv/input_opencv.cpp:399:5: note: in expansion of macro ‘CVOPT_SET’
     CVOPT_SET(CAP_PROP_FPS, fps, "frames per second")
     ^
/home/prahjister/mjpg-streamer/mjpg-streamer-experimental/plugins/input_opencv/input_opencv.cpp:400:15: error: ‘CAP_PROP_BRIGHTNES ’ was not declared in this scope
     CVOPT_SET(CAP_PROP_BRIGHTNESS, co, "contrast")
               ^
/home/prahjister/mjpg-streamer/mjpg-streamer-experimental/plugins/input_opencv/input_opencv.cpp:388:32: note: in definition of macro ‘CVOPT_OPT’
         if (!pctx->capture.set(prop, settings->var)) {\
                                ^
/home/prahjister/mjpg-streamer/mjpg-streamer-experimental/plugins/input_opencv/input_opencv.cpp:400:5: note: in expansion of macro ‘CVOPT_SET’
     CVOPT_SET(CAP_PROP_BRIGHTNESS, co, "contrast")
     ^
/home/prahjister/mjpg-streamer/mjpg-streamer-experimental/plugins/input_opencv/input_opencv.cpp:401:15: error: ‘CAP_PROP_CONTRAST’ was not declared in this scope
     CVOPT_SET(CAP_PROP_CONTRAST, br, "brightness")
               ^
/home/prahjister/mjpg-streamer/mjpg-streamer-experimental/plugins/input_opencv/input_opencv.cpp:388:32: note: in definition of macro ‘CVOPT_OPT’
         if (!pctx->capture.set(prop, settings->var)) {\
                                ^
/home/prahjister/mjpg-streamer/mjpg-streamer-experimental/plugins/input_opencv/input_opencv.cpp:401:5: note: in expansion of macro ‘CVOPT_SET’
     CVOPT_SET(CAP_PROP_CONTRAST, br, "brightness")
     ^
/home/prahjister/mjpg-streamer/mjpg-streamer-experimental/plugins/input_opencv/input_opencv.cpp:402:15: error: ‘CAP_PROP_SATURATIO ’ was not declared in this scope
     CVOPT_SET(CAP_PROP_SATURATION, sa, "saturation")
               ^
/home/prahjister/mjpg-streamer/mjpg-streamer-experimental/plugins/input_opencv/input_opencv.cpp:388:32: note: in definition of macro ‘CVOPT_OPT’
         if (!pctx->capture.set(prop, settings->var)) {\
                                ^
/home/prahjister/mjpg-streamer/mjpg-streamer-experimental/plugins/input_opencv/input_opencv.cpp:402:5: note: in expansion of macro ‘CVOPT_SET’
     CVOPT_SET(CAP_PROP_SATURATION, sa, "saturation")
     ^
/home/prahjister/mjpg-streamer/mjpg-streamer-experimental/plugins/input_opencv/input_opencv.cpp:403:15: error: ‘CAP_PROP_GAIN’ was not declared in this scope
     CVOPT_SET(CAP_PROP_GAIN, gain, "gain")
               ^
/home/prahjister/mjpg-streamer/mjpg-streamer-experimental/plugins/input_opencv/input_opencv.cpp:388:32: note: in definition of macro ‘CVOPT_OPT’
         if (!pctx->capture.set(prop, settings->var)) {\
                                ^
/home/prahjister/mjpg-streamer/mjpg-streamer-experimental/plugins/input_opencv/input_opencv.cpp:403:5: note: in expansion of macro ‘CVOPT_SET’
     CVOPT_SET(CAP_PROP_GAIN, gain, "gain")
     ^
/home/prahjister/mjpg-streamer/mjpg-streamer-experimental/plugins/input_opencv/input_opencv.cpp:404:15: error: ‘CAP_PROP_EXPOSURE’ was not declared in this scope
     CVOPT_SET(CAP_PROP_EXPOSURE, ex, "exposure")
               ^
/home/prahjister/mjpg-streamer/mjpg-streamer-experimental/plugins/input_opencv/input_opencv.cpp:388:32: note: in definition of macro ‘CVOPT_OPT’
         if (!pctx->capture.set(prop, settings->var)) {\
                                ^
/home/prahjister/mjpg-streamer/mjpg-streamer-experimental/plugins/input_opencv/input_opencv.cpp:404:5: note: in expansion of macro ‘CVOPT_SET’
     CVOPT_SET(CAP_PROP_EXPOSURE, ex, "exposure")
     ^
plugins/input_opencv/CMakeFiles/input_opencv.dir/build.make:62: recipe for target 'plugins/input_opencv/CMakeFiles/input_opencv.dir/input_opencv.cpp.o' failed
make[3]: *** [plugins/input_opencv/CMakeFiles/input_opencv.dir/input_opencv.cpp.o] Error 1
make[3]: Leaving directory '/home/prahjister/mjpg-streamer/mjpg-streamer-experimental/_build'
CMakeFiles/Makefile2:237: recipe for target 'plugins/input_opencv/CMakeFiles/input_opencv.dir/all' failed
make[2]: *** [plugins/input_opencv/CMakeFiles/input_opencv.dir/all] Error 2
make[2]: Leaving directory '/home/prahjister/mjpg-streamer/mjpg-streamer-experimental/_build'
Makefile:127: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/prahjister/mjpg-streamer/mjpg-streamer-experimental/_build'
Makefile:17: recipe for target 'all' failed
make: *** [all] Error 2

from sltk.

prahjister avatar prahjister commented on September 23, 2024

ugh looks like i need opencv 3.1...trying to compile now following this

http://xfloyd.net/blog/?p=987

from sltk.

prahjister avatar prahjister commented on September 23, 2024

Even after compiling 3.1 no timestamp swtich available

from sltk.

prahjister avatar prahjister commented on September 23, 2024

after looking...it looks like input_raspicam.so is doing the timestamp and input_uvc.so doesnt support it.

It looks like the correct command is below if it supported it

sudo ./mjpg_streamer -i "./input_uvc.so -timestamp" -o "./output_http.so"

from sltk.

prahjister avatar prahjister commented on September 23, 2024

Is the timestamp somehow encoded in the stream? How does it read it?

from sltk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.