Can't get cloud video working


I’m having trouble getting the list of streams from my drone. I can see live video feed when connected to flytconsole, using flytos_wifi. But when i try to use the cloud live feed it says it cant get video stream list.
Tried to use python cloud rest exaple, but it return 404 response. I can connect to drone thogh, send arm and disarm commands and get telemetry.

I am using cloud cliente sample to try acessing the list of streams from the drone. Here the code i´m trying to use:
printResponse( "list_streams ",put('' + namespace + ':8080/list_streams',headers = headers,data=json.dumps({"namespace": namespace})))

I´ve noticed i was using /rest/ros instead of /rest only, chenged it in code and still no results. When triing POST with the URL ‘’ i get 404 not found… when i try POST with the URL ‘’, i get 502 bad gateway error. Please help


@Dhirajd please help.


I think you need to include the namespace into your request between ros/ and /list_streams.


@Marcello the APIs that you are using are limited to video streaming over local network. So, they are not really useful to you over the cloud.

If your companion computer is a Raspberry Pi then you can use the following API, to have the FlytOS on raspi stream the video feed to a RTMP target of your choice (youtube, facebook, your custom Wowza server). The RTMP target should be accessible on the public web.

I’m providing a python snippet comprising the API.

    import json
    from requests import get, put
    headers = {'Authorization': 'Token 2345jkh1hjkhjk3l42h5j234l5hj234h5l', 'VehicleID': 'hjk2435kl'}
    res = put('<namespace>/video_streaming/start_raspicam_stream', headers=headers,
         data=json.dumps({"image_width": 0, "image_height": 0, "framerate": 0, "brightness": 0, "saturation": 0,
                          "flip": True, "remote_url":"rtmp://",
                          "remote_target": True, 'bitrate':0}))

    print res.status_code, res.content

The URL in payload data should be replaced by your own server URL or the RTMP target. E.g, Follow only the ‘setup the youtube live event’ part from following tutorial. At the end of the process, you will get a rtmp target from youtube video manager. You can use that URL in above API to have the raspi stream video to youtube live event.

After you are done, you can call following API to stop the video stream.

res = get('<namespace>/video_streaming/stop_raspicam_stream', headers=headers)

As @lesterthomas correctly suggested, you have to replace part with actual namespace, you can get it by making a get namespace API call to FlytOS. Typically, its value is ‘flytos’. Replace authorization token and vehicle ID with your drones credentials. You can find them in portal, ‘my devices’ tab if you have the cloud trial active.


I´ve modified the corrections, but when i call this API, it returns

{u'message': u'FlytOS namespace is  flytos', u'param_info': {u'param_value': u'flytos', u'param_id': u'global_namespace'}, u'success': True}
Your flytos is connected through cloud client
video_streaming/start_raspicam_streamService not available
Content "Service /flytos/video_streaming/start_raspicam_stream does not exist"

I did chenged the namespace to my global namespace after calling get_global_namespace api.
By checking Raspberry Pi console, running “rosservice list”, there is no such service as /flytos/video_streaming/start_raspicam_stream. Probably some node did not startup correctly… is there any node that is missing? Here the runlog ros startup section:

    core_api_navigation (core_api_nodes/navigation_api)
    core_api_param (core_api_nodes/param_api)
    core_api_payload (core_api_nodes/payload_api)
    core_api_setup (core_api_nodes/setup_api)
    flyt_cl (flyt_remote_link/flyt_remote_client)
    flyt_ms_node (flyt_ms/flyt_ms_node)
    flytcam (usb_cam/usb_cam_node)
    image_capture (vision_apps/image_capture)
    mavros (mavros/mavros_node)
    navigation_server (navigation_util/navigation_server)
    rosapi (rosapi/rosapi_node)
    rostful (rostful/devserver)
    video_streaming (vision_apps/video_streaming)
    web_video_server (web_video_server/web_video_server)

and then i get

auto-starting new master
e[1mprocess[master]: started with pid [2571]e[0m
e]2;/flyt/flytos/flytcore/share/core_api/launch/core_api_autopilot.launch http://localhost:11311a
e[1msetting /run_id to ca057b9a-852d-11e8-b940-b827ebe8bba4e[0m
e[1mprocess[rosout-1]: started with pid [2584]e[0m
started core service [/rosout]
e[1mprocess[flytos/mavros-2]: started with pid [2602]e[0m
e[1mprocess[flytos/core_api_param-3]: started with pid [2603]e[0m
e[1mprocess[flytos/core_api_setup-4]: started with pid [2604]e[0m
e[1mprocess[flytos/core_api_navigation-5]: started with pid [2605]e[0m
e[1mprocess[flytos/core_api_payload-6]: started with pid [2606]e[0m
e[1mprocess[flytos/navigation_server-7]: started with pid [2625]e[0m
e[1mprocess[flytos/rostful-8]: started with pid [2642]e[0m
+ python -tt -m rostful run -h -p 80 -s tornado '--ros-arg=~connections_list:=/rocon/connection_cache/list' '--ros-arg=~connections_diff:=/rocon/connection_cache/diff' --ros-arg=__name:=rostful --ros-arg=__log:=/root/.ros/log/ca057b9a-852d-11e8-b940-b827ebe8bba4/flytos-rostful-8.log
e[1mprocess[flytos/rosapi-9]: started with pid [2678]e[0m
e[1mprocess[flytos/flyt_cl-10]: started with pid [2692]e[0m
e[1mprocess[flytos/flyt_ms_node-11]: started with pid [2706]e[0m
e[1mprocess[flytos/flytcam-12]: started with pid [2719]e[0m
e[1mprocess[flytos/image_capture-13]: started with pid [2745]e[0m
e[1mprocess[flytos/web_video_server-14]: started with pid [2752]e[0m
e[1mprocess[flytos/video_streaming-15]: started with pid [2767]e[0m
e[0m[ INFO] [1531329245.881512012]: Waiting For connections on[0m
e[0m[ INFO] [1531329245.943990658]: FCU URL: /dev/ttyAMA0:921600e[0m
e[0m[ INFO] [1531329245.952303574]: serial0: device: /dev/ttyAMA0 @ 921600 bpse[0m
e[0m[ INFO] [1531329245.961747897]: GCS URL: tcp-l://:5760e[0m
e[0m[ INFO] [1531329245.981164408]: tcp1: Bind address:[0m
e[0m[ INFO] [1531329246.136682585]: [LIC] license file valid, checking for date validitye[0m
registered capabilities (classes):
 - rosbridge_library.capabilities.call_service.CallService
 - rosbridge_library.capabilities.advertise.Advertise
 - rosbridge_library.capabilities.publish.Publish
 - rosbridge_library.capabilities.subscribe.Subscribe
 - rosbridge_library.capabilities.advertise_service.AdvertiseService
 - rosbridge_library.capabilities.service_response.ServiceResponse
 - rosbridge_library.capabilities.unadvertise_service.UnadvertiseService
Azure sdk not found. Try 'sudo pip install azure-storage-blob'
e[0m[ INFO] [1531329247.802965032]: camera calibration URL: file:///flyt/flytos/flytcore/share/vision_apps/calibration/calibration.yamle[0m
e[33m[ WARN] [1531329247.822553053]: [head_camera] does not match name narrow_stereo in file /flyt/flytos/flytcore/share/vision_apps/calibration/calibration.yamle[0m
e[0m[ INFO] [1531329247.823667480]: Starting 'head_camera' (/dev/video0) at 1280x720 via mmap (mjpeg) at 30 FPSe[0m
[ERROR] [1531329249.646590]: Commercial License not found exiting Raspberry-Pi video streaming node.
e[1m[flytos/video_streaming-15] process has finished cleanly
log file: /root/.ros/log/ca057b9a-852d-11e8-b940-b827ebe8bba4/flytos-video_streaming-15*.loge[0m

Note that on the last line, it says Commercial License not found - exit vídeo streaming… Is there a way for me to test this feature without buying comercial license? We need to test this in the lab for validation of our solution