Cutting videos in the terminal with chafa and FFmpeg
The terminal video editor "vic" utilizes chafa and ffmpeg for playback and editing, allowing video cuts via command line. Future updates aim to improve installation, playback speed, and add audio support.
Read original articleThe article discusses the development of a terminal-based video editor named "vic," which utilizes the chafa and ffmpeg libraries for video playback and editing. The author highlights the aesthetic appeal of terminal graphics, particularly with chafa, which enhances video representation using various symbols. Initial performance issues were resolved, allowing for smooth playback at 20-30 frames per second. The program primarily relies on two ffmpeg commands: one for decoding videos into pixel frames and another for cutting videos based on user-defined timestamps. The author shares a bug encountered during testing, where the program became unresponsive after 270 seconds due to the accumulation of stderr messages from ffmpeg, which was resolved by redirecting stderr to /dev/null. Future improvements are planned, including simplifying installation, enhancing playback speed, and adding audio support to make the tool more functional. The author also contemplates the naming of the program and acknowledges the need for further refinements.
- The terminal video editor "vic" uses chafa and ffmpeg for video playback and editing.
- The program allows users to cut videos directly from the command line.
- A bug related to stderr message accumulation was identified and fixed.
- Future enhancements include better installation processes and audio support.
- The author is considering various names for the program and plans additional improvements.
Related
Chr – terminal editor inspired by Turbo Pascal editor from 1997
A terminal-based text editor "chr" on GitHub mimics desktop editors' shortcuts, blending modern GUI with retro text mode. Developed with Tui Widget, it welcomes contributions. Installation involves cloning, building, and compiling.
We increased our rendering speeds by 70x using the WebCodecs API
Revideo, a TypeScript framework, boosted rendering speeds by 70 times with WebCodecs API. Challenges overcome by browser-based video encoding. Limited audio processing and browser compatibility remain.
Ask HN: Share your FFmpeg settings for video hosting
A user is developing a video hosting site allowing MP4 uploads, utilizing H.264 for video and Opus for audio. They seek advice on encoding settings and challenges faced in the process.
Taking command of the Context Menu in macOS
The blog post outlines methods for processing video and audio files on macOS using command line tools and applications like ContextMenu and Automator, including ffmpeg for re-encoding media files.
Show HN: turn videos into ASCII art (open source, js+canvas)
The tool converts videos into ASCII pixel art from uploads or webcam feeds, allowing users to adjust settings. It is free, open-source, and processes videos client-side without storage.
That's kind of a nope. It's a feature, not a bug. FFMPEG will exit with 0 even on an actual error for what you were expecting. In one of TFA examples using -ss 5 -to 10, you're expecting a result of a 5 second clip. If for some reason, there was an issue reading the file at 8 seconds, ffmpeg will exit with 0 and an output that was only 3 seconds long. If you dumped stderr to /dev/null, you'd have no idea why.
FFMPEG definitely does some weird things with stdout/stderr for people that are new to it. However, there are reasons for its behavior that make sense after long enough use of it. Being able to pipe raw video using stdout instead of forcing a dump to a file is full on Matrix level flex that distorts the surrounding environment. So if the actual video is going out stdout, stderr receives all of the other info that normies would expect to see on stdout. This is why so many people use 2>/path/to/log so that at the end of the process with an exit 0 any issues with an output can be ascertained.
Related
Chr – terminal editor inspired by Turbo Pascal editor from 1997
A terminal-based text editor "chr" on GitHub mimics desktop editors' shortcuts, blending modern GUI with retro text mode. Developed with Tui Widget, it welcomes contributions. Installation involves cloning, building, and compiling.
We increased our rendering speeds by 70x using the WebCodecs API
Revideo, a TypeScript framework, boosted rendering speeds by 70 times with WebCodecs API. Challenges overcome by browser-based video encoding. Limited audio processing and browser compatibility remain.
Ask HN: Share your FFmpeg settings for video hosting
A user is developing a video hosting site allowing MP4 uploads, utilizing H.264 for video and Opus for audio. They seek advice on encoding settings and challenges faced in the process.
Taking command of the Context Menu in macOS
The blog post outlines methods for processing video and audio files on macOS using command line tools and applications like ContextMenu and Automator, including ffmpeg for re-encoding media files.
Show HN: turn videos into ASCII art (open source, js+canvas)
The tool converts videos into ASCII pixel art from uploads or webcam feeds, allowing users to adjust settings. It is free, open-source, and processes videos client-side without storage.