{"id":24725291,"url":"https://github.com/fausto95/react-native-forge","last_synced_at":"2026-02-11T01:32:47.108Z","repository":{"id":274178545,"uuid":"922167650","full_name":"Fausto95/react-native-forge","owner":"Fausto95","description":"A powerful video processing module for React Native and Expo. Providing essential video manipulation features with native implementation for iOS and Android","archived":false,"fork":false,"pushed_at":"2025-01-25T14:16:38.000Z","size":2422,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-18T02:52:55.016Z","etag":null,"topics":["expo","expo-av","expo-video","react-native","react-native-video"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/react-native-forge","language":"Kotlin","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/Fausto95.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}},"created_at":"2025-01-25T13:57:55.000Z","updated_at":"2025-01-27T12:44:36.000Z","dependencies_parsed_at":"2025-01-25T14:15:19.550Z","dependency_job_id":null,"html_url":"https://github.com/Fausto95/react-native-forge","commit_stats":null,"previous_names":["fausto95/react-native-forge"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Fausto95/react-native-forge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fausto95%2Freact-native-forge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fausto95%2Freact-native-forge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fausto95%2Freact-native-forge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fausto95%2Freact-native-forge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Fausto95","download_url":"https://codeload.github.com/Fausto95/react-native-forge/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fausto95%2Freact-native-forge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29324208,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T00:34:26.354Z","status":"ssl_error","status_checked_at":"2026-02-11T00:34:09.494Z","response_time":65,"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":["expo","expo-av","expo-video","react-native","react-native-video"],"created_at":"2025-01-27T13:17:47.950Z","updated_at":"2026-02-11T01:32:47.092Z","avatar_url":"https://github.com/Fausto95.png","language":"Kotlin","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/logo.svg\" width=\"200\" height=\"200\" alt=\"React Native Forge Logo\"\u003e\n\u003c/p\u003e\n\n# React Native Forge\n\nA powerful video processing module for React Native and Expo. Providing essential video manipulation features with native implementation for iOS and Android\n\n## Demo\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/demo.gif\" alt=\"React Native Forge Demo\" width=\"280\"\u003e\n\u003c/p\u003e\n\n## Installation\n\n```bash\nnpx expo install react-native-forge\n```\n\n## Features\n\n- Generate video frames at specific timestamps\n- Extract all frames from a video\n- Get video duration\n- Pad video to specific aspect ratios\n- Cross-platform support (iOS, Android, Web)\n\n## API Reference\n\n### getAllFrames\n\nExtracts all frames from a video at one-second intervals.\n\n```typescript\nfunction getAllFrames(\n  inputPath: string,\n  outputFolder: string,\n  duration: number,\n  size?: { width: number; height: number }\n): Promise\u003cstring[]\u003e;\n```\n\nParameters:\n\n- inputPath : Path to the input video file\n- outputFolder : Directory where frames will be saved\n- duration : Duration of the video in seconds\n- size (optional): Desired dimensions for the output frames\n  Returns: Promise resolving to an array of frame file paths\n\n### getFrame\n\nExtracts a single frame from a video at a specific timestamp.\n\n```typescript\nfunction getFrame(\n  inputPath: string,\n  outputPath: string,\n  timestamp: number,\n  quality?: number,\n  size?: { width: number; height: number }\n): Promise\u003cstring\u003e;\n```\n\nParameters:\n\n- inputPath : Path to the input video file\n- outputPath : Path where the frame will be saved\n- timestamp : Time in seconds to extract the frame from\n- quality (optional): JPEG compression quality (1-100, default: 15)\n- size (optional): Desired dimensions for the output frame\n  Returns: Promise resolving to the output file path\n\n### padToRatio\n\nPads a video to match a specific aspect ratio.\n\n```typescript\nfunction padToRatio(\n  inputPath: string,\n  outputPath: string,\n  targetRatio: number\n): Promise\u003c{ outputPath: string; ratio: number }\u003e;\n```\n\nParameters:\n\n- inputPath : Path to the input video file\n- outputPath : Path where the processed video will be saved\n- targetRatio : Desired aspect ratio (width/height)\n  Returns: Promise resolving to an object containing the output path and final ratio\n\n### getDuration\n\nGets the duration of a video in seconds.\n\n```typescript\nfunction getDuration(inputPath: string): Promise\u003cnumber\u003e;\n```\n\nParameters:\n\n- inputPath : Path to the video file\n  Returns: Promise resolving to the video duration in seconds\n\n| Feature               | iOS | Android |\n| --------------------- | --- | ------- |\n| Generate All Frames   | ✅  | ✅      |\n| Generate Single Frame | ✅  | ✅      |\n| Pad Video             | ✅  | ✅      |\n| Get Duration          | ✅  | ✅      |\n\n## Example Usage\n\n```typescript\nimport ReactNativeForge from \"react-native-forge\";\n\n// Extract a frame at 5 seconds\nconst frame = await ReactNativeForge.getFrame(\n  \"file:///path/to/video.mp4\",\n  \"file:///path/to/output.jpg\",\n  5,\n  80,\n  { width: 1280, height: 720 }\n);\n\n// Get video duration\nconst duration = await ReactNativeForge.getDuration(\n  \"file:///path/to/video.mp4\"\n);\n\n// Extract all frames\nconst frames = await ReactNativeForge.getAllFrames(\n  \"file:///path/to/video.mp4\",\n  \"file:///path/to/frames\",\n  duration,\n  { width: 1280, height: 720 }\n);\n```\n\n## License\n\nMIT\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffausto95%2Freact-native-forge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffausto95%2Freact-native-forge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffausto95%2Freact-native-forge/lists"}