ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Theora image latency

asked 2022-04-15 12:35:48 -0500

JoloGermanAg gravatar image

updated 2022-04-17 10:42:46 -0500

lucasw gravatar image

I have several cameras - different models and different ros drivers - that show significant latency (about one second) between theora and image_raw, while there is no latency between compressed and image_raw.

I am wondering what causes this. Does theora get processed on the computer or is this a driver/setup related issue?

I was unable to find a good answer online for this so I am hoping someone could clarify this.

Thank you

EDIT: Clarification

edit retag flag offensive close merge delete

Comments

You question is not clear: your first paragraph says theora has low latency, and your 2nd implies it has high latency.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2022-04-15 12:45:44 -0500 )edit

Sorry if I was unclear i will edit the post, There IS latency between theora and image_raw, there is no or little latency between compressed and image_raw

JoloGermanAg gravatar image JoloGermanAg  ( 2022-04-15 12:58:02 -0500 )edit
1

I'm not seeing a good reference right now but theora is compressing the images a lot more aggressively than the regular compressed so takes more time to do it, and is very probably looking at multiple frames in a sequence for better compression so always is more behind. Regular compressed is doing jpeg or png compression on a single frame but won't take advantage of a series of images that are mostly the same.

Take a look at https://github.com/daniilidis-group/f..., which is similar high compression and definitly looking at multiple frames so will have latency, but maybe less than theora (also depending on configuration)- possibly ffmpeg is better optimized than theora compression because it is so much more widely used.

lucasw gravatar image lucasw  ( 2022-04-17 10:49:36 -0500 )edit

Thank you, this certainly makes sense.

JoloGermanAg gravatar image JoloGermanAg  ( 2022-04-17 17:09:30 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-04-17 15:47:07 -0500

Mike Scheutzow gravatar image

updated 2022-04-17 15:52:05 -0500

I agree with @lucasw. theora is a video codec, and the default config for these codecs tend to prioritize image quality over low latency. I have not used this theora plugin, but have used other similar video codecs.

If you want smaller end-to-end latency, try this: use keyframes more often, use variable bitrate, and use worse image quality (note: the wiki doesn't tell us if that means you should configure a higher or lower numeric value; usually it's a higher numeric value.)

http://wiki.ros.org/theora_image_tran...

Just be aware that, in terms of end-to-end latency with compression, you are unlikely to do better than compressed_image_transport.

edit flag offensive delete link more

Comments

Thank you, I suppose that I don't really have a need for using theora at the moment but I'll look into this.

JoloGermanAg gravatar image JoloGermanAg  ( 2022-04-17 17:10:42 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2022-04-15 12:35:48 -0500

Seen: 379 times

Last updated: Apr 17 '22