coffesld
v1.0.0
Published
Spoof Animation & Audio Extraction Library - 3D animations (X/Y/Z), audio extraction (WAV, MP3, etc), web viewer & CLI tools
Maintainers
Readme
⬡ CoffeSLD
Spoof Animation & Audio Extraction Library
by Infinityftee | Website: https://coffesld.infinityfreeapp.com
Features
- 🎭 Spoof Animation — 3D animations with X, Y, Z axis control
- 🌐 3D Engine — Three.js powered, full rotation/scale/position
- 🎵 Audio Extraction — Extract WAV, MP3, FLAC, OGG, AAC, OPUS from ANY file
- 💻 CLI Tools —
spoofpublish&spoofeaudiocommands - 🖥️ Web Viewer — Live 3D animation viewer (hosted on InfinityFree)
- 📦 JSON Scripts — Save/load animations as portable
.coffesld.jsonfiles
Installation
npm install coffesld
# or globally:
npm install -g coffesldRequirements:
- Node.js >= 16
- ffmpeg (for audio extraction):
sudo apt install ffmpeg/brew install ffmpeg
CLI Commands
spoofpublish — Animation Publisher
# List all presets
spoofpublish --list
# Run a preset animation
spoofpublish --preset spin
spoofpublish --preset bounce --duration 3000
spoofpublish --preset orbit --loop
spoofpublish --preset spoof --intensity 2.5
# 3D axis control
spoofpublish --preset float --x 50 --y -20 --z 100
spoofpublish --preset wave --rotX 30 --rotY 45 --rotZ 0
# Save animation script to file
spoofpublish --preset spin --output my_spin.json
# Create new animation script
spoofpublish --create myAnimation
# Load & run from JSON file
spoofpublish --file my_spin.coffesld.jsonAvailable Presets:
| Preset | Description |
|--------|-------------|
| spin | Rotate 360° on Y axis |
| bounce | Bounce up and down |
| float | Gentle floating motion |
| shake | Side-to-side shake |
| explode | Scale up and fade |
| orbit | Orbit around center (X+Z axis) |
| wave | Wave motion on Y+X |
| flip3d | Full 3D flip |
| spoof | Randomized noise animation |
spoofeaudio — Audio Extractor
# Basic extraction (to WAV)
spoofeaudio input.mp4
# Specify output format
spoofeaudio input.mp4 --format mp3
spoofeaudio input.mkv --format flac
spoofeaudio input.avi --format ogg
spoofeaudio input.mov --format aac
spoofeaudio input.webm --format opus
# Custom settings
spoofeaudio input.mp4 --format mp3 --bitrate 320k --sample-rate 48000
spoofeaudio input.mp4 --channels 1 # mono
# Output directory
spoofeaudio input.mp4 --output ./my_audio
# Trim/clip audio
spoofeaudio input.mp4 --start 10 --end 60
# Normalize audio levels
spoofeaudio input.mp4 --normalize
# Adjust volume
spoofeaudio input.mp4 --volume 1.5
# Get file info only
spoofeaudio input.mp4 --info
# Split audio at timestamps (seconds)
spoofeaudio input.mp4 --split 30,60,90,120
# Batch extract entire folder
spoofeaudio --batch ./videos --format mp3
spoofeaudio --batch ./music --format flac --normalize
# List supported formats
spoofeaudio --formatsSupported Input Formats:
- Audio:
wav,mp3,flac,ogg,m4a,aac,opus,wma,aiff - Video:
mp4,mkv,avi,mov,webm,wmv,flv,ts
Supported Output Formats:
| Format | Type | Description |
|--------|------|-------------|
| wav | Lossless | Best quality, large files |
| mp3 | Lossy | Universal compatibility |
| flac | Lossless | High quality, compressed |
| ogg | Lossy | Open-source standard |
| aac | Lossy | Mobile/Apple standard |
| opus | Lossy | Best quality at low bitrate |
| aiff | Lossless | Mac/Pro audio |
coffesld — Main CLI
coffesld info # Package info
coffesld animate # Animation commands
coffesld audio # Audio commands
coffesld web # Start web viewer (port 3000)
coffesld web 8080 # Custom portJavaScript API
const coffesld = require('coffesld');
const { SpoofAnimation, AudioExtractor } = coffesld;
// ── Animation ──────────────────────────────────────────
// Create animation
const anim = new SpoofAnimation({
name: 'myAnim',
duration: 2000,
fps: 60,
loop: true,
mode: '3d'
});
// Axis control
anim.setX(100).setY(-50).setZ(200);
anim.setRotation(30, 45, 0); // rotX, rotY, rotZ
anim.setScale(1.5, 1.5, 1.5);
// Load preset
anim.loadPreset('spin'); // or 'bounce', 'float', etc.
// Custom keyframes
anim.addKeyframe(0, { x: 0, y: 0, rotY: 0 }, 'easeOut')
.addKeyframe(1000, { x: 100, y: -50, rotY: 180, z: 30 }, 'easeInOut')
.addKeyframe(2000, { x: 0, y: 0, rotY: 360, z: 0 }, 'bounce');
// Events
anim.on('play', () => console.log('Playing!'));
anim.on('frame', (transform) => {
console.log(`X:${transform.x} Y:${transform.y} Z:${transform.z}`);
});
anim.on('complete', () => console.log('Done!'));
// Playback
anim.play();
anim.pause();
anim.stop();
// Export/Import
const json = anim.toJSON();
const loaded = SpoofAnimation.fromJSON(json);
// ── Audio Extraction ───────────────────────────────────
const extractor = new AudioExtractor();
// Extract audio
const result = await extractor.extract('video.mp4', {
format: 'wav', // wav | mp3 | flac | ogg | aac | opus
output: './audio', // output directory
bitrate: '320k',
sampleRate: 44100,
channels: 2, // 1=mono, 2=stereo
startTime: 10, // start at 10s
endTime: 60, // end at 60s
normalize: true, // normalize levels
volume: 1.2 // 20% louder
});
console.log(result.output); // path to extracted file
// Batch extract
const results = await extractor.extractBatch([
'video1.mp4', 'video2.mkv', 'audio.mp3'
], { format: 'flac', output: './extracted' });
// Get audio info
const info = await extractor.getInfo('audio.mp3');
console.log(info.duration, info.bitrate, info.sampleRate);
// Split audio
await extractor.splitAudio('long.mp3', [30, 60, 90], { format: 'wav' });Web Viewer (InfinityFree)
The web viewer is hosted at: https://coffesld.infinityfreeapp.com
Local Development
# Start local server
coffesld web
# Open http://localhost:3000Deploy to InfinityFree
- Create free account at https://infinityfree.com
- Create new hosting → note your domain (e.g.
coffesld.infinityfreeapp.com) - Upload contents of
/public/topublic_html/via FTP or File Manager - Done! Visit your InfinityFree URL
InfinityFree FTP settings:
- Host:
ftpupload.net - Upload:
public/index.html,public/.htaccess,public/index.php
Animation Script Format (.coffesld.json)
{
"name": "myAnimation",
"fps": 60,
"duration": 2000,
"loop": true,
"mode": "3d",
"intensity": 1.0,
"keyframes": [
{
"time": 0,
"props": { "x": 0, "y": 0, "z": 0, "rotY": 0 },
"easing": "easeInOut"
},
{
"time": 1000,
"props": { "x": 100, "y": -50, "z": 30, "rotY": 180 },
"easing": "easeInOut"
},
{
"time": 2000,
"props": { "x": 0, "y": 0, "z": 0, "rotY": 360 },
"easing": "bounce"
}
]
}Easing options: linear, easeIn, easeOut, easeInOut, bounce, elastic
Props: x, y, z, rotX, rotY, rotZ, scaleX, scaleY, scaleZ, opacity
License
MIT © Infinityftee
