-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timestamps #13
Comments
Hi Clyde, thanks! Gstreamer presents buffers to the sink node with a When the stream goes to playback, the ros sinks capture A lot of my work is with live data feeds, so I hadn't considered the past-timestamps case. Are you using this with rosbag? I think the best bet would be to add an element property to override the time-offset. Cheers, |
Hi Brett, thank you for the quick response! For reference, here is my use case: I am building an underwater stereo camera using Raspberry Pi Zeros and Pi cameras. In the live case, each Pi uses gstreamer to send h264 data to the primary computer, which runs 2 gstreamer pipelines. The Pi's are not hardware synchronized, so I will use an approximate sync message filter to get reasonable stereo pairs. But there are lots of variations on this use case, including running without the primary computer while I'm running tests. Decoding the h264 and saving a ROS bag with uncompressed images on the Pi Zero would be difficult. My thought was to simply record the streams in mp4 files on the Pi Zeros, pull the SD cards and then play back the mp4 files on the host computer. This depends on my ability to get the same timestamps on playback so that I can sync the images. If I understand you correctly, I could use ffprobe or another tool to get the creation_time for each file, then override the time-offset. This would work well. Let me know if you'd like some help! I'm still curious if there's a way for gstreamer to send time-offset information along a pipeline. This seems like a common use case. Thanks again! |
I get the feeling most people using this package are trying to store compressed video for later playback alongside rosbag data. As far as I know, the buffers passed to sinks only carry timestamps representing when they should be decoded, and when they should be presented (rendered). Have a poke around the filesrc and qtdemux to see if they can report any useful timestamps, it would be good to make this a standard feature without additional dependencies. I'm up to my elbows in the |
Ack. I'm happy to help test when it's ready.
There isn't a well supported solution yet. I took a crack at recording h264 packets as ROS messages (https://github.com/clydemcqueen/h264_image_transport) but a lot depends on how the h264 data is generated. Still, it could be a useful idea. |
I haven't implemented the clock override, but I've made space for it in the new base classes. Otherwise, I found a bunch of context: |
@clydemcqueen, can I get your opinion on #15? |
#15 LGTM. I will try it next week. Thanks for the pointers to rosbag2. Interesting discussion. The high frequency /clock workaround is clever. I would love to see time extrapolation in Gazebo / Ignition as well. It would be nice to have a small ROS message for streaming video and audio so that streams can be bagged with other messages. Do you think GStreamer Data Protocol could be put into a ROS message, and then played back? Something like:
I'm curious as to your thoughts on this. |
I'm a little concerned that gdppay hasn't made it out of plugins-bad yet, but I'm definitely on board for a flexible node type. |
Nice package!
I'm confused about gstreamer timestamps. I ran this test:
... and the resulting ROS timestamps were fairly close to
node.now()
. Fromffprobe
I know thatsave.mp4
has acreation_time
field with the original timestamp from several days ago, so I expected the ROS message to have the older timestamps. Is there some setting that I can change? Or I suppose this could be a limitation ofqtdemux
or some other element in the pipeline. Any pointers would be appreciated.Thanks in advance,
/Clyde
The text was updated successfully, but these errors were encountered: