Tag Archives: command line

A simple way to read and write audio and video files in C using FFmpeg (part 2: video)

In my previous post, I demonstrated how FFmpeg can be used to pipe raw audio samples in and out of a simple C program to or from media files such as WAV files (based on something similar for Python I … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , , , , , , , , , , , , | Leave a comment

A simple way to read and write audio and video files in C using FFmpeg (part 1: audio)

C is my favourite programming language and the one I use most often. However, I have tended to shy away from using it for quick one-off signal processing tasks where I needed to read or write audio or video files … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , , , , , , , , , , , , , | 1 Comment

Writing bytes to a serial port in C

This is a (relatively) simple example of a C program to send five bytes to a serial port in Windows. In this case, I’m sending the five characters “hello” via COM22 at 38400 baud, but of course the program can … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , , , , , , , | 41 Comments

Simple command line trick for sending characters to a serial port in Windows

I often need to send short character strings to a serial port in Windows. The sort of thing I might use this for is sending a command to a robot or other microcontroller-based device that I’m building using a USB-to-serial … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , , , , , , , , , , , | 62 Comments

Automating image creation with ImageMagick

I sometimes evangelise about how important it is for engineers to be familiar with “professional-grade” drawing software. My heart sinks when I see people drawing diagrams in MS Paint (the free drawing tool that comes with Windows). Software of that … Continue reading

Posted in Uncategorized | Tagged , , , , | Leave a comment

Ultra-simple machine vision in C with RobotEyez

I use PGM image files a lot in my Engineering Computing class because the provide a really easy way for novice programmers to get started with image processing in C. This file format stores greyscale images in plain text and … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , , | 71 Comments

CommandCam – a DirectShow command line cam image grabber for Windows

EDIT (24-11-2011) : Since publishing this post, I have found myself making frequent updates to the CommandCam program, so I’ve created a dedicated page for it instead, with up-to-date information and download links. Get CommandCam here (binary download and source … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , , , | 22 Comments