{"id":16038172,"url":"https://github.com/byroot/heywatch-ruby","last_synced_at":"2025-03-14T08:45:19.228Z","repository":{"id":66238840,"uuid":"2112098","full_name":"byroot/heywatch-ruby","owner":"byroot","description":"Client Library and CLI for encoding Videos with HeyWatch","archived":false,"fork":false,"pushed_at":"2011-07-27T10:25:22.000Z","size":96,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-21T03:25:10.576Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://heywatch.com","language":"Ruby","has_issues":false,"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/byroot.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}},"created_at":"2011-07-27T09:56:02.000Z","updated_at":"2018-08-29T06:30:03.000Z","dependencies_parsed_at":"2023-02-20T00:35:19.250Z","dependency_job_id":null,"html_url":"https://github.com/byroot/heywatch-ruby","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byroot%2Fheywatch-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byroot%2Fheywatch-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byroot%2Fheywatch-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byroot%2Fheywatch-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/byroot","download_url":"https://codeload.github.com/byroot/heywatch-ruby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243551230,"owners_count":20309291,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-08T22:40:37.068Z","updated_at":"2025-03-14T08:45:19.186Z","avatar_url":"https://github.com/byroot.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Client Library and CLI for encoding Videos with HeyWatch #\n\nHeyWatch is a Video Encoding Web Service.\n\n**This library is a complete rewrite of the old one and is not compatible.**\n\nFor more information:\n\n* HeyWatch: http://heywatch.com \n* API Documentation: http://dev.heywatch.com\n* Contact: [heywatch at particle-s.com](mailto:heywatch at particle-s.com)\n* Twitter: [@particles](http://twitter.com/particles) / [@sadikzzz](http://twitter.com/sadikzzz)\n\n## Install ##\n\n\tsudo gem install heywatch\n\n## Usage ##\n\n\trequire \"heywatch\"\n\t\n\t# login with your HeyWatch username and password\n\thw = HeyWatch.new(username, passwd)\n\t\n\t➔ {\n\t  \"created_at\": \"2006-11-29T17:59:45+01:00\",\n\t  \"updated_at\": \"2011-06-10T13:05:19+02:00\",\n\t  \"upload_key\": \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n\t  \"lastname\": \"Celeste\",\n\t  \"io\": 75162934,\n\t  \"firstname\": \"Bruno\",\n\t  \"login\": \"bruno\",\n\t  \"email\": \"bruno.celeste@gmail.com\",\n\t  \"default_format\": 10,\n\t  \"automatic_encode\": false\n\t}\n\t\n\t# get all your videos\n\thw.all :video\n\t\n\t➔ [\n\t\t\t{\n\t    \t\"created_at\": \"2011-06-15T12:05:25+02:00\",\n\t\t    \"title\": \"d41d8cd98f00b204e9800998ecf8427e\",\n\t\t    \"specs\": {\n\t\t      \"audio\": {\n\t\t        \"sample_rate\": 24000,\n\t\t        \"synched\": true,\n\t\t        \"stream\": 0.1,\n\t\t        \"codec\": \"aac\",\n\t\t        \"bitrate\": 0,\n\t\t        \"channels\": 2\n\t\t      },\n\t\t      \"size\": 318,\n\t\t      \"thumb\": \"http://raw-2.heywatch.com/5978aa591569a2e5e47805c8c008b1a2/CGI.29806.0.jpg\",\n\t\t      \"mime_type\": \"video/mp4\",\n\t\t      \"video\": {\n\t\t        \"stream\": 0.0,\n\t\t        \"codec\": \"mpeg4\",\n\t\t        \"container\": \"mov\",\n\t\t        \"aspect\": 1.33,\n\t\t        \"bitrate\": 501,\n\t\t        \"height\": 240,\n\t\t        \"length\": 5,\n\t\t        \"fps\": 0.0,\n\t\t        \"width\": 320\n\t\t      }\n\t\t    },\n\t\t    \"updated_at\": \"2011-06-15T12:05:25+02:00\",\n\t\t    \"id\": 9662090\n\t  }\n\t]\n\t\n\t# get information about a specific video\n\thw.info :video, 9662090\n\n### Filter results ###\n\nThe filters are only available in HeyWatch#all method.\n\n\t# Will only return formats that I've created and with the video codec h264\n\thw.all :format, :owner =\u003e true, :video_codec =\u003e \"h264\"\n\t\n### Create a download ###\n\n\thw.create :download, :url =\u003e \"http://site.com/yourvideo.mp4\", :title =\u003e \"yourtitle\"\n\n\t➔ {\n\t  \"created_at\": \"2011-06-15T19:00:11+02:00\",\n\t  \"error_msg\": null,\n\t  \"title\": \"yourtitle\",\n\t  \"video_id\": 0,\n\t  \"updated_at\": \"2011-06-15T19:00:11+02:00\",\n\t  \"url\": \"http://site.com/yourvideo.mp4\",\n\t  \"progress\": {\n\t    \"current_length\": 0,\n\t    \"speed\": 0,\n\t    \"percent\": 0,\n\t    \"time_left\": \"??\"\n\t  },\n\t  \"id\": 4950011,\n\t  \"error_code\": null,\n\t  \"length\": 0,\n\t  \"status\": \"pending\"\n\t}\n\n### Create a job ###\n\t\n\thw.create :job, :video_id =\u003e 9662090, :format_id =\u003e 31, :keep_video_size =\u003e true, :ping_url_after_encode =\u003e \"http://yoursite.com/ping/heywatch?postid=123434\", :s3_directive =\u003e \"s3://accesskey:secretkey@myvideobucket/flv/123434.flv\"\n\t\n\t➔ {\n\t  \"ping_url_after_encode\": \"http://yoursite.com/ping/heywatch?postid=123434\",\n\t  \"cf_directive\": null,\n\t  \"error_msg\": null,\n\t  \"created_at\": \"2011-06-15T12:13:13+02:00\",\n\t  \"video_id\": 9662090,\n\t  \"updated_at\": \"2011-06-15T12:13:13+02:00\",\n\t  \"progress\": 0,\n\t  \"ping_url_if_error\": null,\n\t  \"s3_directive\": \"s3://accesskey:secretkey@myvideobucket/flv/123434.flv\",\n\t  \"format_id\": 31,\n\t  \"id\": 4944088,\n\t  \"error_code\": null,\n\t  \"ftp_directive\": null,\n\t  \"encoded_video_id\": 0,\n\t  \"encoding_options\": {\n\t    \"keep_video_size\": true\n\t  },\n\t  \"status\": \"pending\",\n\t  \"http_upload_directive\": null\n\t}\n\t\n### Delete a video ###\n\n\thw.delete :video, 9662090\n\t\n\t➔ true\n\t\n### Generating thumbnails ###\n\n\t# Will return the binary data directly\n\thw.jpg 9662142\n\thw.jpg 9662142, :start =\u003e 4\n\t\n\t# Async method, you'll receive the thumbnails to \n\t# your s3 account and get pinged when it's done\n\thw.jpg 9662142, :async =\u003e true, :number =\u003e 6, :s3_directive =\u003e \"s3://accesskey:secretkey@mybucket/thumbnails/\", :ping_url =\u003e \"http://site.com/ping/heywatch/thumbs\"\n\t\n\t➔ true\n\n### Errors ###\n\n\thw.create :download, :url =\u003e \"not_a_valid_url\"\n\t\n\t➔ HeyWatch::BadRequest: {\"message\":\"Url is invalid\"}\n\n## Command-line CLI ##\n\n\tUsage: heywatch RESOURCE:METHOD [ID] [parameter1=value1 parameter2=value2 ...]\n\n\t    Resources:\n\n\t      account       # manage account       | create, update\n\t      video         # manage video         | all, info, delete, count, bin            \n\t      encoded_video # manage encoded video | all, info, delete, count, bin, jpg       \n\t      download      # manage download      | all, info, delete, count, create         \n\t      job           # manage job           | all, info, delete, count, create         \n\t      format        # manage format        | all, info, delete, count, create, update \n\n\t    Usage:\n\n\t      heywatch account\n\t      heywatch account:update env=sandbox\n\t      heywatch video:info 123456\n\t      heywatch job:all\n\t      heywatch download:create url=http://site.com/video.mp4 title=mytitle\n\t      heywatch encoded_video:jpg 9882322 start=4 \u003e thumb.jpg\n\t      heywatch format:all owner=true video_codec=h264\n\t      heywatch video:all \"[0]\"\n\t      heywatch job:all \"[0..10]\"\n\t      heywatch format:count owner=true\n\n\nReleased under the [MIT license](http://www.opensource.org/licenses/mit-license.php).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbyroot%2Fheywatch-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbyroot%2Fheywatch-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbyroot%2Fheywatch-ruby/lists"}