https://github.com/miyako/ffmpeg
https://github.com/miyako/ffmpeg
4d-class 4d-component ffmpeg
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/miyako/ffmpeg
- Owner: miyako
- License: mit
- Created: 2024-11-11T00:36:46.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-15T00:40:16.000Z (10 months ago)
- Last Synced: 2025-05-15T01:33:09.988Z (10 months ago)
- Topics: 4d-class, 4d-component, ffmpeg
- Language: 4D
- Homepage: https://miyako.github.io/ffmpeg/
- Size: 93.8 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README


[](LICENSE)

### Licensing
* the source code of this component is licensed under the [MIT license](https://github.com/miyako/ffmpeg/blob/master/LICENSE).
* see [ffmpeg.org](https://www.ffmpeg.org/legal.html) for the licensing of **ffmpeg**.
# ffmpeg
based on [eugeneware/ffmpeg-static](https://github.com/eugeneware/ffmpeg-static)
## dependencies.json
```json
{
"dependencies": {
"ffmpeg": {
"github": "miyako/ffmpeg",
"version": "latest"
}
}
}
```
the macOS executable targets Apple Silicon. you may download a universal binary edition from releases.
---
example of a synchronous call
```4d
var $in : 4D.File
$in:=Folder(fk desktop folder).file("sample.mov")
var $ffmpeg : cs.FFmpeg.FFmpeg
$ffmpeg:=cs.FFmpeg.FFmpeg.new()
var $info : Text
$info:=$ffmpeg.start(["-i"; $in]).worker.wait().error
ALERT($info)
```
example of an asynchronous call
```4d
#DECLARE($params : Object)
If ($params=Null)
/*
async calls must be performed in a worker or form
*/
CALL WORKER(1; Current method name; {})
Else
$in:=Folder(fk desktop folder).file("sample.mov")
$out:=Folder(fk desktop folder).file("sample.mp4")
var $ffmpeg : cs.FFmpeg.FFmpeg
$ffmpeg:=cs.FFmpeg.FFmpeg.new()
$ffmpeg.start(["-i"; $in; "-vcodec"; "libx264"; $out])
End if
```
## note on notarisation
need to increase size when creating `.dmg`. `ffmpeg` needs `1GB`, `ffprobe` needs `5GB`.
```
hdiutil create -format UDBZ -plist -srcfolder {in} {out} -size {size}
```
else possible "resource is busy" error.
```
hdiutil: create failed - リソースが使用中です
```