web_video_server icon indicating copy to clipboard operation
web_video_server copied to clipboard

Can this tool publish more video?

Open BGMjie opened this issue 5 years ago • 1 comments

I hava read the wiki form http://wiki.ros.org/web_video_server. But I do not find something says about how to send multiple video. I am a java engineer. My team ask me to show the video from the robot. Today I try to do it. And I find that this tool show the video though a tag. If this tool can make more resource url , I think this problem should been sloved.

BGMjie avatar Mar 14 '19 09:03 BGMjie

i not get what means "multiple video", if you want use this to remote moitor you robot, you can do this.

# roscd web_video_server 
# sudo mkdir launch && cd launch
# sudo vim web_video.launch
<launch>                                                            
  <node pkg="web_video_server" type="web_video_server" name="web_video_server"  output="screen">
    <param name="port" type="int" value="8080" />
    <param name="address" type="string" value="0.0.0.0" />        
    <param name="server_threads" type="int" value="1" />           
    <param name="ros_threads" type="string" value="2" />           
    <param name="type" type="string" value="h264" /> <!-- this config not valid -->
    
    <param name="width" type="int" value="1280" />                
    <param name="height" type="int" value="720" />  
  </node>                                                            
</launch>
# roslaunch web_video_server web_vide.launch

after this, you can use ffmpeg conver this stream to RTMP server

# sudo apt-get install ffmpeg
# # ffmpeg -f mjpeg -i http://192.168.50.51:8080/stream?topic=/camera/color/image_raw -f flv -vcodec libx264 -s 1080*720 rtmp://192.168.50.174:1938/live/home

gm100861 avatar Nov 08 '19 11:11 gm100861