https://github.com/edenwareapps/tv.megacubo.ffmpeg
https://github.com/edenwareapps/tv.megacubo.ffmpeg
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/edenwareapps/tv.megacubo.ffmpeg
- Owner: EdenwareApps
- Created: 2021-03-14T19:45:44.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-03-04T02:36:39.000Z (3 months ago)
- Last Synced: 2025-03-04T03:28:26.400Z (3 months ago)
- Language: Java
- Size: 16.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Megacubo FFMPEG Plugin
Based on the excellent [cordova-plugin-ffmpeg](https://github.com/adminy/cordova-plugin-ffmpeg), customized for the Megacubo project.
# Install
```
cordova plugin add https://github.com/efoxbr/tv.megacubo.ffmpeg.git
```# Sample usage
```
let executionId
let cmd = ['-i', '/full/path/to/my/video']
// let cmd = ['-i', '"/full/path/to/my/video with spaces"']
ffmpeg.exec(cmd, data => {
console.log('ffmpeg.exec returned', cmd, data)
let pos = data.indexOf('-')
if(pos != -1){
let responseType = data.substr(0, pos), info = data.substr(pos + 1)
if(responseType == 'start'){
console.log('execution ID:', info)
executionId = parseInt(info)
// ffmpeg.kill(executionId)
} else if(responseType == 'metadata') {
console.log('partial response with metadata:', info)
} else {
console.log('command finished, output:', info)
}
} else {
console.error('ffmpeg.exec returned a badly formatted response (?!)', cmd, data)
}
}, err => {
console.error('ffmpeg.exec error', cmd, err)
})
```