0
$\begingroup$

Rosanswers logo

Hello,

I am trying to directly record a video from an image topic using video_recorder from image_view. I am testing it with my laptop camera running

roslaunch usb_cam usb_cam-test.launch

When I launch the recording with

rosrun image_view video_recorder image:="/usb_cam/image_raw" _filename:="/home/user/video.avi" 

I get the following error "Unable to convert rgb8 image to bgr8". I have also tryed using

rosrun image_view video_recorder image:="/usb_cam/image_raw" _filename:="/home/user/video.avi" _encoding:="rgb8"

but this produces "Unable to convert rgb8 image to rgb8".

The exact same happens for images published by the V-REP simulator (which is what I actually need to record in the end).

Any help would be very much appreciated. Thanks.

Riccardo


Originally posted by rick187 on ROS Answers with karma: 63 on 2016-03-03

Post score: 1


Original comments

Comment by ASeyfi on 2016-04-01:
I have the same problem. Did you find a solution?

Comment by rick187 on 2016-04-01:
No, I am afraid I didn't

$\endgroup$

3 Answers 3

0
$\begingroup$

Rosanswers logo

Hello! I just solved this issue, try to set the parameter "<param name="max_depth_range" value="0" />"enter code here . The default value is 5 and this seems to mess something up. That problem disappeared for me but I still cannot open the output video by the way.

Andrea


Originally posted by andrea-nisti with karma: 26 on 2016-04-07

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$
0
$\begingroup$

Rosanswers logo

Apparently there is a solution here


Originally posted by ASeyfi with karma: 21 on 2016-04-05

This answer was NOT ACCEPTED on the original site

Post score: 2

$\endgroup$
0
$\begingroup$

Rosanswers logo

I have accepted the last answer because it is more complete, but the one from ASeyfi points in the right direction too. I don't know the rules in these cases.

Anyway I finally solved with this command:

rosrun image_view video_recorder image:="/usb_cam/image_raw" _filename:="/tmp/video.avi" _max_depth_range:="0" _fps:="30" _codec:="I420"

I can open the file in VLC and it works perfectly. The last option (the codec) can be removed and the video still plays fine (but it is compressed in this case).

Thank you all.

Riccardo


Originally posted by rick187 with karma: 63 on 2016-04-07

This answer was NOT ACCEPTED on the original site

Post score: 2

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.