mjpeg_server: Disconnecting HTTP client

asked 2014-03-20 21:43:15 -0600

seredin gravatar image

updated 2014-03-24 02:30:18 -0600

Hello all! I have a problem with mjpeg_server. I tried install it from package and source. On both variant all installed perfect. and I start thus:

1) roslaunch gscam gscam.launch

2) rosrun mjpeg_server mjpeg_server

3) http://localhost:8080/stream?topic=/c...

When I try see picture in browser I can't see it and have this output in jscam_server:

[ INFO] [1395386785.242284770]: Starting mjpeg server
[ INFO] [1395386785.254352299]: Bind(8080) succeeded
[ INFO] [1395386785.254510070]: waiting for clients to connect
[ INFO] [1395386828.484420727]: Client connected
[ INFO] [1395386828.484657349]: Client connected
[ INFO] [1395386828.655946731]: Subscribing to topic /camera/image_raw
[ INFO] [1395386828.926999222]: Disconnecting HTTP client

Why is HTTP client disconnect? I tryed different browsers. Ubuntu 12.04, groovy.

Update ----------------------

If I try use rosrun image_view image_view image:=/camera/image_raw, I can see the picture.

If I try to see snapshot in brouser: http://localhost:8080/snapshot?topic=... , I see it.

What is wrong?

Update ----------------

I am forgot of Firefox. It really work. I was try google chrome and chromium. Thanks for help.

edit retag flag offensive close merge delete

Comments

is there an image published on topic /camera/image_raw? Does rosrun image_view image_view image=/camera/image_raw show anything? You can choose other topics with the web viewer if you change the topic in the address https://localhost:808/stream?topic=/other_topic

Wolf gravatar image Wolf  ( 2014-03-22 11:32:03 -0600 )edit

Are you sure you tried it with Firefox? I noticed a while ago that Google Chrome broke something and now it no longer works to stream video from mjpeg_server (or Youtube for that matter). I am running the same setup as you and I also get the "Disconnecting" message and no image when using Chrome but it works fine in Firefox.

Pi Robot gravatar image Pi Robot  ( 2014-03-23 05:02:25 -0600 )edit

Does Chrome still not work with this setup?

Andrew.A gravatar image Andrew.A  ( 2014-10-23 04:38:23 -0600 )edit

@Andrew.A -- still does not work in Google Chrome on Ubuntu 12.04 (Version 37.0.2062.120 Ubuntu 12.04 (281580)) but works fine with Firefox. Note that Chrome also still does not stream Youtube videos but I'm not sure if that is related.

Pi Robot gravatar image Pi Robot  ( 2014-10-23 07:35:06 -0600 )edit

A change in Chrome is responsible for this not working. See https://github.com/RobotWebTools/mjpe... for more details. You can embed the stream in an element and everything should work. A new version of mjpeg server is under development as well.

rtoris288 gravatar image rtoris288  ( 2014-10-23 10:18:14 -0600 )edit

@rtoris288 did you mean, in an img element?

Andrew.A gravatar image Andrew.A  ( 2014-10-23 22:34:46 -0600 )edit

@Andrew.A yes, the formtter must have taken the tag out!

rtoris288 gravatar image rtoris288  ( 2014-10-24 07:06:39 -0600 )edit