ffmpeg

View the Project on GitHub miyako/ffmpeg

version platform license downloads

Licensing

ffmpeg

based on eugeneware/ffmpeg-static

dependencies.json

{
	"dependencies": {
		"ffmpeg": {
			"github": "miyako/ffmpeg",
			"version": "*"
		}
	}
}

the macOS executable targets Apple Silicon. you may download a universal binary edition from releases.


example of a synchronous call

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

#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 - リソースが使用中です