Comments (14)
Hello
I would start with a more simple pipeline first and see, what happens:
gst-launch-1.0 tcambin name=tcam0 ! video/x-raw,format=GRAY8, width=640, height=480,framerate=30/1,binning=2X2 ! videoconvert ! x264enc ! mp4mux ! filesink async=true sync=false name=save-sink location =/home/kevin/test.mp4 -e
And see, what happens.
I see, you show a live video window too. Do you see only one image there too?
Stefan
from tiscamera.
Hi Stefan
I tried the new one, the code is running but no running window pops up. Its shows up to redistribute latency... in the terminal only.
Need help!
Thanks
Rangeet
from tiscamera.
Hi Rangeet
there is no window, because the pipeline does not have one. More interresting: What is in the test.mp4 in kevins's directory?
Stefan
from tiscamera.
Dear Stefan,
the video has been saved and it works fine. But, is it possible anyhow to record and view the video simultaneously?
That would be great!
Thanks!
Rangeet
from tiscamera.
Hello Rangeet
If video saving works fine now, start enhancing your GStreamer pipeline with an ximagesink as you tried at beginning.
I suggest to to that step by step, so start with showing the video in the ximagesink, but do not add video saving.
Then start adding the tee and so one.
Do that step by step and always check the results you get.
It is all GStreamer usage. It is not camera related.
Stefan
from tiscamera.
Dear Stefan
With this code I can view the video in a window properly --------gst-launch-1.0 tcambin name=tcam0 ! video/x-raw,format=GRAY8, width=640, height=480,framerate=30/1,binning=2X2 ! videoconvert ! x264enc ! mp4mux ! filesink async=true sync=false name=save-sink location =/home/kevin/test.mp4 -e
With this code I can record a video properly------------gst-launch-1.0 tcambin name=tcam0 ! video/x-raw,format=GRAY8, width=640, height=480,framerate=30/1,binning=2X2 ! videoconvert ! x264enc ! mp4mux ! filesink async=true sync=false name=save-sink location =/home/kevin/test.mp4 -e
But, I could not able to combine both. Somehow error pops up or one shap shot happens. Need some solution !
Thanks !
Regards
Rangeet
from tiscamera.
Hello Rangeet
You need a "tee" filter : https://gstreamer.freedesktop.org/documentation/coreelements/tee.html?gi-language=c
It splits the GStreamer Pipeline into branches. One for display and another for video capture. You used that already in your first post.
Searching in the internet for "Gstreamer tee examples" you will find
https://stackoverflow.com/questions/45873407/gstreamer-tee-with-different-capabilities-on-each-branch
and more.
It is GStreamer usage, not a camera issue.
Stefan
from tiscamera.
Dear Stefan
I am trying with tee module but its not working...Anything is problem with this: queue max-size-time=0 max-size-bytes=0 max-size-buffers=0 ?
Best
Rangeet
from tiscamera.
Hello Rangeet,
I am sorry, but I am not familiar with the queue parameters. You may look at https://gstreamer.freedesktop.org/documentation/coreelements/queue.html?gi-language=c for the documentation.
Stefan
from tiscamera.
Hello Rangeet
I made some tests on my own. The pipeline is stripped down to the necessary parts and instead of the camera I use a videotestsrc:
gst-launch-1.0 videotestsrc name=tcam0 ! video/x-raw,format=BGRx, width=640, height=480,framerate=30/1 ! tee name=teemodule teemodule. ! queue ! videoconvert ! ximagesink sync=false teemodule. ! queue ! videoconvert ! x264enc ! mp4mux ! filesink sync=false name=save-sink location =./test.mp4
Thus: It is a pure GStreamer issue.
So, lets see, what happens if we use jpegenc and avimux instead of x264enc:
gst-launch-1.0 videotestsrc name=tcam0 ! video/x-raw,format=BGRx, width=640, height=480,framerate=30/1 ! tee name=teemodule ! queue ! videoconvert ! xvimagesink sync=false teemodule. ! queue ! videoconvert ! jpegenc ! avimux ! filesink sync=false name=save-sink location =./test.avi
And.... it works perfectly.
I am sorry, I have no solution for this issue. Thus, I suggest you ask the question with the videotestsrc pipeline above at https://stackoverflow.com/ or at https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues.
Stefan
from tiscamera.
Hi Stefn
thanks a lot, its working fine.
Regards
Rangeet
from tiscamera.
And what the solution?
from tiscamera.
gst-launch-1.0 tcambin name=tcam0 ! video/x-raw,format=BGRx, width=640, height=480,framerate=30/1,binning=2X2 ! tee name=teemodule teemodule. ! queue max-size-time=0 max-size-bytes=0 max-size-buffers=0 ! videoconvert n-threads=4 ! ximagesink sync=false teemodule. ! queue name=save-queue max-size-time=0 max-size-bytes=0 max-size-buffers=0 ! videoconvert n-threads=4 ! queue ! jpegenc ! avimux ! queue max-size-time=0 max-size-bytes=0 max-size-buffers=0 ! filesink async=true sync=false name=save-sink location =/home/kevin/test.avi -e
from tiscamera.
Ah, ok, the JPEG AVI solution.
from tiscamera.
Related Issues (20)
- Cannot get image/video from DFK 42BUC03 on Linux HOT 2
- ERROR tcam-libtcam timeout while waiting for new image buffer HOT 5
- Broken dependency HOT 4
- Failed to find any device to open DMK23G445 HOT 2
- Feature Requset: Callback for external trigger, before sensor read-off HOT 6
- Cmake cannot find tcam HOT 1
- PolarizedMono12Packed HOT 5
- Is there a DFK31BU camera driver available for the Raspberry Pi? HOT 7
- Intermittent failure to change pipeline state HOT 9
- Unable to use v4l2-ctl to update gain HOT 2
- Rasberry Pi 3 Arducam Day-Night Vision Camera not available HOT 1
- unable to detect camera on ubuntu HOT 5
- AttributeError: 'GstTcamBin' object has no attribute 'get_device_serials_backend' while running the 00-list-devices.py HOT 6
- support 23.04, 23.10, and 24.04 HOT 3
- Performance Variation Across Ubuntu Versions and tiscamera Package Versions HOT 4
- Is it Possible to Share a GigE Camera Feed Between Two PCs? HOT 2
- Use dfk 33ux287 tisCam code to install library fail HOT 7
- Stuck setting pipeline state to ready - pipeline.set_state(Gst.State.READY) due to TriggerMode HOT 3
- Cannot verify installation in Jetson AGX Orin HOT 8
- No v4l2 firmware support for DFK 61BUC02 Cameras HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tiscamera.