AI Disclaimer
This project was NOT made using AI as this was part of a University assignment.
BadRust converts video into ASCII text and plays it in the terminal. I developed it as a coursework project to explore parallel computing, porting an existing Python ASCII player to Rust and comparing sequential and parallel conversion paths.
The name refers to the trend of playing Bad Apple on unusual devices and displays. ASCII conversion and video playback work; audio playback is not implemented. Development is no longer in progress.
Status: Development finished · Stack: Rust, clap, ffmpeg-next, image, indicatif, Rayon, perf
Problem and scope
I wanted to understand how parallel computing works and how to apply it in my own programs. Video-to-ASCII conversion provided a concrete workload for experimenting with CPU usage, execution time and output correctness.
Porting my Python player also introduced a second challenge: implementing a familiar program in a language I had never used. Rather than starting with an unfamiliar problem, I could apply existing programming concepts while learning Rust.
Architecture and implementation
The application converts video frames into ASCII representations, which the player displays in the terminal. I compared sequential and parallel versions of the conversion work to examine their output and performance.
I chose Rayon because it made parallelisation straightforward to implement. The project includes performance experiments using different numbers of CPU cores to examine how the conversion workload responds to parallel execution.
The most difficult part was moving the existing Python implementation to Rust without prior Rust experience. Familiar programming concepts and examples from other implementations helped me work through the port.
Profiling and verification
I used perf to investigate where the application spent CPU time and identify work that dominated execution. I also compared execution speed with different core counts to observe the effect of parallelisation.
For correctness checks, I compared frames produced by the sequential conversion path with the parallel output to look for discrepancies. This kept output comparison alongside the performance experiments, rather than assessing the parallel version solely on speed.
The experiments showed that parallelisation could improve conversion speed for this workload.
Limitations
The video-to-ASCII conversion and terminal player are functional, but playback has no audio. Development has finished at this scope.
What I learned
The project gave me practical experience introducing parallelism into an existing program, profiling CPU usage with perf and comparing performance across different core counts. It also reinforced the importance of checking output when changing how a computation executes.
Porting the player showed me how familiar programming concepts can support learning a new language while working through a concrete implementation.
