Simple GUI toolset for FFmpeg
This commit resolves three critical issues:
1. **Fyne Threading Error on Startup**: Fixed by improving setContent() to
check the initComplete flag. During initialization, setContent() calls
SetContent() directly since we're on the main thread. After initialization,
it safely marshals calls via app.Driver().DoFromGoroutine().
2. **Queue Persisting Between Sessions**: Fixed by removing queue persistence.
The shutdown() function no longer saves the queue to disk, ensuring a
clean slate for each new app session.
3. **Queue Auto-Processing**: Fixed by making the queue start in 'paused'
state. Users must explicitly click 'Process Queue' to start batch
conversion. Queue methods PauseProcessing() and ResumeProcessing()
control the paused state.
Changes:
- main.go: Added initComplete flag to appState, improved setContent()
logic, disabled queue persistence in shutdown()
- queue/queue.go: Added paused field to Queue struct, initialize paused=true,
added PauseProcessing()/ResumeProcessing() methods
- ui/queueview.go: Added UI controls for queue processing and clearing
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
|
||
|---|---|---|
| assets/logo | ||
| docs | ||
| internal | ||
| .gitignore | ||
| DONE.md | ||
| go.mod | ||
| go.sum | ||
| install.sh | ||
| main.go | ||
| README.md | ||
| TODO.md | ||
VideoTools Prototype
Requirements
- Go 1.21+
- Fyne 2.x (pulled automatically via
go mod tidy) - FFmpeg (not yet invoked, but required for future transcoding)
Running
Launch the GUI:
go run .
Run a module via CLI:
go run . convert input.avi output.mp4
go run . combine file1.mov file2.wav / final.mp4
go run . logs
Add -debug or VIDEOTOOLS_DEBUG=1 for verbose stderr logs.
Logs
- All actions log to
videotools.log(override withVIDEOTOOLS_LOG_FILE=/path/to/log). - CLI command
videotools logs(orgo run . logs) prints the last 200 lines. - Each entry is tagged (e.g.
[UI],[CLI],[FFMPEG]) so issues are easy to trace.
Notes
- GUI requires a running display server (X11/Wayland). In headless shells it will log
[UI] DISPLAY environment variable is empty. - Convert screen accepts drag-and-drop or the "Open File…" button; ffprobe metadata populates instantly, the preview box animates extracted frames with simple play/pause + slider controls (and lets you grab cover art), and the "Generate Snippet" button produces a 20-second midpoint clip for quick quality checks (requires ffmpeg in
PATH). - Simple mode now applies smart inverse telecine by default—automatically skipping it on progressive footage—and lets you rename the target file before launching a convert job.
- Other module handlers are placeholders; hook them to actual FFmpeg calls next.