{"id":35037944,"url":"https://github.com/emrahcom/rating","last_synced_at":"2026-05-21T09:37:05.171Z","repository":{"id":319468279,"uuid":"1074309221","full_name":"emrahcom/rating","owner":"emrahcom","description":null,"archived":false,"fork":false,"pushed_at":"2026-05-12T08:25:47.000Z","size":323,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-12T10:33:02.401Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/emrahcom.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":"2025-10-11T14:48:44.000Z","updated_at":"2026-05-12T08:25:51.000Z","dependencies_parsed_at":"2026-04-26T12:05:02.285Z","dependency_job_id":null,"html_url":"https://github.com/emrahcom/rating","commit_stats":null,"previous_names":["emrahcom/rating"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/emrahcom/rating","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emrahcom%2Frating","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emrahcom%2Frating/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emrahcom%2Frating/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emrahcom%2Frating/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emrahcom","download_url":"https://codeload.github.com/emrahcom/rating/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emrahcom%2Frating/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33295798,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-21T02:57:32.698Z","status":"ssl_error","status_checked_at":"2026-05-21T02:57:31.990Z","response_time":62,"last_error":"SSL_read: 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":[],"created_at":"2025-12-27T08:03:05.380Z","updated_at":"2026-05-21T09:37:05.165Z","avatar_url":"https://github.com/emrahcom.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rating\n\n## Required packages\n\n```bash\napt-get install imagemagick bc\n```\n\n## Source video\n\n```bash\nEPISODE=1\n\nffmpeg -ss 00:00:05.0 -i tbd-$EPISODE-raw.mp4 \\\n  -vf \"scale=1920:1080:flags=lanczos\" -c:v libsvtav1 -movflags faststart \\\n  -c:a copy -y tbd-$EPISODE-1080.mp4\n```\n\n## Source graph\n\n- Graph is a chart prepared by LibreOffice Calc using the rating data.\n  - First, save as ODS, `minutes.ods`\n  - Copy the sheet as 'rating', don't update the original sheet.\n  - Don't remove the advertisement periods.\n  - Start ~10 min earlier (select an even minute)\n  - Stop after ~2 min (select an even minute)\n- Create an empty sheet, `graph`\n  - Insert chart\n  - Line -\u003e Lines only, Line type: smooth or straight\n  - Data series in columns.\n  - Display the legend at top\n  - Make full screen with even numbers in X axis.\n  - Put space between X axis and the bottom to make it visible all the time.\n- Graph is captured by scrot while zooming (`ctrl+shift+j`) in Calc.\n- Graph is a chart modified by GIMP.\n  - It should have the same resolution with the source video, `1920x1080`\n  - First, calculate PPS (pixel per second)\n  - X axis should be shifted to the left by 30 seconds since the value of point\n    is the average rating of the next minute.\n  - Start and end time with color `#0815ca` (delete and fill)\n  - Add advertisement periods by putting rectangle areas with color `#d9e303` on\n    a layer with `50%` transparency.\n  - Merge visible layers.\n  - Export\n  - Inverted color.\n  - Graph should be transparent, remove black area.\n  - Export as inverted.\n\n## Parameters\n\n- `GRAPH` is the path of PNG file.\n- `X0` is the pixel coordinate for starting point on X axis. Use minus 1 pixel\n  because the vertical line's width is 2 pixels.\n- `PPS` is the pixels per second.\n  - Select a long range such as from 21:00 to 24:00\n  - Get the pixel difference of these two points.\n  - Calculate the pixels per second.\n    `PPS = number_of_pixels / time_difference_as second`\n  - Check `PPS` line in script and put correct values to calculate it.\n- `Y0` is the pixel coordinate for top point of the slider on Y axis.\n- `Y1` is the pixel coordinate for bottom point of the slider on Y axis.\n- `SECONDS` is the length of the video (MP4 file) in seconds.\n- `FRAMERATE` is the number of frames per second (default 0.5).\n- Set `BREAKS`.\n\n## Generating frames\n\n```bash\ndeno run --allow-run --allow-read --allow-write graph-to-video.ts \u003cGRAPH\u003e\n```\n\n## Output Video\n\nWatch `timer.mp4` before generating graph videos. Check if timer in graphic and\nthe actual timer match each others.\n\n```bash\nFRAMERATE=0.5\nffmpeg -r $FRAMERATE -i frames/%06d.png -vcodec h264 -y /tmp/timer.mp4\n\n# Watch and check /tmp/timer.mp4\nmpv /tmp/timer.mp4\n\nffmpeg -i source.mp4 -r $FRAMERATE -i frames/%06d.png \\\n  -filter_complex \"overlay=0:0\" -c:v libsvtav1 -movflags faststart \\\n  -y output/rating.mp4\n\n# or\n\nffmpeg -i source.mp4 -r $FRAMERATE -i frames/%06d.png \\\n  -filter_complex \"overlay=0:0\" -c:v h264 -movflags faststart \\\n  -y output/rating.mp4\n```\n\n## Sample\n\nA sample frame from video with a realtime embedded graph. The red line shows the\ncurrent position on the timeline.\n\n[![Sample frame](images/frame.jpg)](images/frame.jpg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femrahcom%2Frating","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femrahcom%2Frating","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femrahcom%2Frating/lists"}