{"id":39864912,"url":"https://github.com/clydemcqueen/gscam2","last_synced_at":"2026-01-18T14:06:49.675Z","repository":{"id":38674386,"uuid":"227719633","full_name":"clydemcqueen/gscam2","owner":"clydemcqueen","description":"ROS2 camera driver for GStreamer-based video streams, supports intra-process communication","archived":false,"fork":false,"pushed_at":"2025-11-27T21:16:13.000Z","size":59,"stargazers_count":110,"open_issues_count":7,"forks_count":28,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-11-30T12:06:39.649Z","etag":null,"topics":["gstreamer","ipc","ros2"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clydemcqueen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-12-13T00:08:45.000Z","updated_at":"2025-11-27T21:16:10.000Z","dependencies_parsed_at":"2024-05-18T17:25:35.556Z","dependency_job_id":"81ac368b-3cb1-417b-8721-5d93549a14ea","html_url":"https://github.com/clydemcqueen/gscam2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/clydemcqueen/gscam2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clydemcqueen%2Fgscam2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clydemcqueen%2Fgscam2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clydemcqueen%2Fgscam2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clydemcqueen%2Fgscam2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clydemcqueen","download_url":"https://codeload.github.com/clydemcqueen/gscam2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clydemcqueen%2Fgscam2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28537492,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T13:04:05.990Z","status":"ssl_error","status_checked_at":"2026-01-18T13:01:44.092Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gstreamer","ipc","ros2"],"created_at":"2026-01-18T14:06:49.103Z","updated_at":"2026-01-18T14:06:49.660Z","avatar_url":"https://github.com/clydemcqueen.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gscam2 ![ROS2 CI](https://github.com/clydemcqueen/gscam2/actions/workflows/build_test.yml/badge.svg?branch=main)\n\nROS2 port of [gscam](https://github.com/ros-drivers/gscam).\nSupports [ROS2 intra-process comms](https://docs.ros.org/en/humble/Tutorials/Demos/Intra-Process-Communication.html).\n\n\u003e Update 15-Jun-22: [gscam](https://index.ros.org/p/gscam/github-ros-drivers-gscam/) has been released for ROS2. It does not support IPC.\n\n\u003e Update 16-Mar-21: the package name has been updated to match the repository name (gscam2)\n\n## Install and build\n\nTested on ROS2 Humble, Jazzy and Kilted.\nSee the [Dockerfile](Dockerfile) for install and build instructions.\n\n## Usage\n\nMake sure your GStreamer pipeline runs successfully in gst-launch-1.0.\nFor example, here's a pipeline that works for the [Blue Robotics HD USB Camera](https://bluerobotics.com/store/sensors-sonars-cameras/cameras/cam-usb-low-light-r1/):\n~~~\ngst-launch-1.0 -v v4l2src device=/dev/video1 do-timestamp=true ! queue ! video/x-h264,width=1920,height=1080,framerate=30/1 ! h264parse ! queue ! avdec_h264 ! autovideosink\n~~~\n\nHere's the same pipeline in gscam2:\n~~~\nexport GSCAM_CONFIG=\"v4l2src device=/dev/video1 do-timestamp=true ! queue ! video/x-h264,width=1920,height=1080,framerate=30/1 ! h264parse ! avdec_h264 ! videoconvert\"\nros2 run gscam2 gscam_main\n~~~\n\nHere's an example with parameters:\n~~~\nros2 run gscam2 gscam_main --ros-args --remap /image_raw:=/my_camera/image_raw --params-file gscam_params.yaml -p camera_info_url:=file://$PWD/my_camera_info.ini\n~~~\n... where gscam_params.yaml is:\n~~~\ngscam_publisher:\n  ros__parameters:\n    gscam_config: 'v4l2src device=/dev/video1 do-timestamp=true ! queue ! video/x-h264,width=1920,height=1080,framerate=30/1 ! h264parse ! avdec_h264 ! videoconvert'\n    preroll: True\n    use_gst_timestamps: True\n    camera_name: 'my_camera'\n    frame_id: 'my_camera_frame'\n~~~\n\nHere's an example that uses a GStreamer tee to split the stream, with one stream producing ROS images\nand the second stream writing to MP4 files:\n~~~\nexport GSCAM_CONFIG=\"v4l2src device=/dev/video1 do-timestamp=true ! queue ! video/x-h264,width=1920,height=1080,framerate=30/1 ! h264parse ! tee name=fork ! queue ! splitmuxsink location=video%02d.mov max-size-bytes=10000000 fork. ! avdec_h264 ! videoconvert\"\nros2 run gscam2 gscam_main\n~~~\nThere's a [bug](https://github.com/clydemcqueen/gscam2/issues/4) where the last MP4 file is not closed correctly.\n\n### Intra-process comms\n\nIPC test -- CLI composition:\n~~~\n# Create the container in the first shell; output will appear here as nodes are loaded:\nexport GSCAM_CONFIG=\"videotestsrc pattern=snow ! video/x-raw,width=1280,height=720 ! videoconvert\"\nros2 run rclcpp_components component_container\n\n# Add the nodes to the container in the second shell:\nros2 component load /ComponentManager gscam2 gscam2::ImageSubscriberNode -e use_intra_process_comms:=true\nros2 component load /ComponentManager gscam2 gscam2::GSCamNode -e use_intra_process_comms:=true\n~~~\n\nLaunch file composition:\n~~~\nros2 launch gscam2 composition_launch.py\n~~~\n\nManual composition -- handy for debugging:\n~~~\nexport GSCAM_CONFIG=\"videotestsrc pattern=snow ! video/x-raw,width=1280,height=720 ! videoconvert\"\nros2 run gscam2 ipc_test_main\n~~~\n\n### Finding GStreamer plugins\n\nGStreamer scans various paths for plugins and builds a plugin registry.\n[The search process is described here](https://gstreamer.freedesktop.org/documentation/gstreamer/gstregistry.html?gi-language=c).\n\ngscam uses a parameter `gst_plugin_path` instead than the commandline option `--gst-plugin-path`.\nThe paths in `gst_plugin_path` are searched last, not first.\n\nIf you have custom plugins you may need to override the plugin path. Here's an example showing how this works:\n~~~\n# Disable default locations\nexport GST_PLUGIN_PATH=\"\"\nexport GST_PLUGIN_SYSTEM_PATH=\"\"\n\n# Provide the pipeline configuration\nexport GSCAM_CONFIG=videotestsrc pattern=snow ! video/x-raw,width=1280,height=720 ! videoconvert\n\n# Run gscam_main, providing a custom plugin path\nros2 run gscam2 gscam_main  --ros-args -p gst_plugin_path:=\"/home/me/myplugins\"\n~~~\n\n## Parameters\n\n| Parameter | Type | Default | Notes |\n|---|---|---|---|\n| `gst_plugin_path` | string | | Similar to `--gst-plugin-path`, searchs path for plugins |\n| `gscam_config` | string | | GStreamer pipeline configuration |\n| `sync_sink` | bool | True | Enable GstBaseSink synchronization |\n| `preroll` | bool | False | Transition to GST_STATE_PLAYING twice |\n| `use_gst_timestamps` | bool | False | Use gst time instead of ROS time |\n| `image_encoding` | string | `sensor_msgs::image_encodings::RGB8` |  ROS image encoding |\n| `camera_info_url` | string | | URL to camera info file, e.g., `file:///path/to/file` |\n| `camera_name` | string | | Replaces `${NAME}` in the URL  |\n| `frame_id` | string | camera_frame | Camera frame ID |\n| `skip` | int | 0 | Skip n frames for each frame sent; useful for reducing frame rates |\n\n## Topics\n- `camera_info`\n- `image_raw`\n- `image_raw/compressed` - only if image is encoded as a jpeg stream \n\n## Camera info file formats\n\nUses the [ROS standard camera calibration formats](http://wiki.ros.org/camera_calibration_parsers?distro=melodic).\nFiles must end in `.ini` or `.yaml`.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclydemcqueen%2Fgscam2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclydemcqueen%2Fgscam2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclydemcqueen%2Fgscam2/lists"}