{"id":19093269,"url":"https://github.com/spacebanana420/ffscala","last_synced_at":"2025-04-30T12:43:29.131Z","repository":{"id":191620662,"uuid":"685036983","full_name":"spacebanana420/ffscala","owner":"spacebanana420","description":"FFmpeg wrapper library for the Scala language","archived":false,"fork":false,"pushed_at":"2024-07-06T19:22:16.000Z","size":282,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-19T02:23:15.783Z","etag":null,"topics":["audio","cli","encoding","ffmpeg","ffprobe","image","media","scala","transcoding","video","wrapper"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spacebanana420.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-08-30T11:33:52.000Z","updated_at":"2025-02-07T16:23:58.000Z","dependencies_parsed_at":"2023-10-16T10:32:50.059Z","dependency_job_id":"4a3c8330-ac22-424a-8f00-05ebf7ad0992","html_url":"https://github.com/spacebanana420/ffscala","commit_stats":null,"previous_names":["spacebanana420/ffscala"],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacebanana420%2Fffscala","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacebanana420%2Fffscala/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacebanana420%2Fffscala/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacebanana420%2Fffscala/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spacebanana420","download_url":"https://codeload.github.com/spacebanana420/ffscala/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251702735,"owners_count":21630080,"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":["audio","cli","encoding","ffmpeg","ffprobe","image","media","scala","transcoding","video","wrapper"],"created_at":"2024-11-09T03:23:54.323Z","updated_at":"2025-04-30T12:43:29.112Z","avatar_url":"https://github.com/spacebanana420.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FFscala\n\nFFscala is a simple wrapper library for the FFmpeg command line, written in Scala 3.\n\nFFscala works by using functions to transform your video encoding parameters into string lists composed of FFmpeg arguments. The command execution is independent of shell and OS, which makes it more portable.\n\nFFscala is still in an early phase and so a new version update might bring big changes to the design and structure of the library.\n\nTo get started with using FFscala, I recommend reading [this page](docs/gettingstarted.md)\n\n### Example 1 - Video transcoding\n```scala\nval encodeParams =\n  setVideoEncoder(\"x264\")\n  ++ setVideoBitrate(4000)\n  ++ setPixFmt(\"yuv420p\")\n  ++ setAudioEncoder(\"opus\")\n  ++ setAudioBitrate(320)\nval filters = scale(1920, 1080)\n\nencode(\"/home/banana/Videos/gameplay.mov\", \"/home/banana/Videos/gameplay.mp4\", encodeParams, filters)\n```\n\nThe equivalent command should be\n```\nffmpeg -loglevel quiet -y -i /home/banana/Videos/gameplay.mov -c:v libx264 -b:v 4000k -filter:v scale=1920:1080 -pix_fmt yuv420p -c:a libopus -b:a 320k /home/banana/Videos/gameplay_new.mp4\n```\nLike when you use FFmpeg directly, most parameters are optional, as you can see in the second example.\n\n### Example 2 - Image conversion and resize\n```scala\nval scaleimg = scale(700, 800)\nencode(\"image.bmp\", \"biggerimage.png\", filters = scaleimg)\n```\nThe equivalent command should be\n```\nffmpeg -loglevel quiet -y -i image.bmp -filter:v scale=700:800 biggerimage.png\n```\nHere, the relative paths for the images are used. Many less parameters are used here, you don't have to use all functions of this library.\n\nYour path names can have spaces between them, as the command execution is shell-independent.\n\n# Requirements\n\n* [FFmpeg](https://ffmpeg.org/)\n* [Scala 3](https://scala-lang.org/)\n\nFFmpeg tested with version 6, but you won't have problems using other versions.\n\nBy default, you need FFmpeg to be in your PATH, but ```encode()``` and similar functions let you optionally specify the path to the executable or the program name if you prefer that way. Any function that has the optional argument ```exec``` lets you set a custom executable path or name.\n\n(See [example 11](docs/examples.md))\n\n# Download \u0026 how to use\n\nYou can find releases of FFscala [here](https://github.com/spacebanana420/ffscala/releases)\n\nChoose the version of your choice (although the latest is recommended) and download the source code from that release.\n\nYou can download the archive on the releases page, if you just want the library files, or you can download the whole project from the repository.\n\nAdd all code in ```src``` into your project and import ```ffscala```. For video and audio capture support, you need to import ```ffscala.capture```:\n\n```scala\n  import ffscala.* //Most functionality\n\n  import ffscala.capture.* //Video and audio capture functionality\n```\n\n(See [example 7](docs/examples.md))\n\n\n# Documentation\n\nFFscala has documentation separated into multiple pages, each being respective to a component of the library and a different type of FFmpeg functionality.\n\n* [Getting Started](docs/gettingstarted.md)\n  * An introductory guide to FFscala, what it can do and how to use the library.\n* [FFmpeg](docs/ffmpeg.md)\n  * Main functions for media encoding\n* [Base](docs/base.md)\n  * Base encoding and FFmpeg arguments.\n* [Video](docs/video.md)\n  * Encoder-specific parameters for video and image.\n* [Audio](docs/audio.md)\n  * Encoder-specific parameters for audio.\n* [Filters](docs/filters.md)\n  * Filter parameters\n* [FFprobe](docs/ffprobe.md)\n  * Media parsing/probing functions\n* [FFplay](docs/ffplay.md)\n  * Media playback with FFplay\n* [Capture](docs/capture.md)\n  * Screen and audio capture and recording functionality\n* [Batch](docs/batch.md)\n  * Batch processing and multiple file encoding functions\n\n#### [List of examples](docs/examples.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspacebanana420%2Fffscala","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspacebanana420%2Fffscala","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspacebanana420%2Fffscala/lists"}