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 , , , , , , , , , , , , , , , , , , , , | 74 Comments

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 , , , , , , , , , , , , , , , , , , , , , | 5 Comments

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 , , , , , , , , , , , , , , , | 46 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 , , , , , , , , , , , , , , , , , , , | 72 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 , , , , , , , , , , | 85 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 , , , , , , , , , , , | 26 Comments

One-shot file transfer from the command line using netcat

Netcat is an extremely useful and versatile command line utility for computer networking. I’ve used it occasionally over the last few years for simple network operations like file transfer or getting two applications to talk to each other over the … Continue reading

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

Changing the filename of a snapz output file

Reader Nathan Casselton asked about using my program, snapz.exe (described in a previous post), to capture multiple images using a sequence of numbered filenames (e.g. ‘1.dib’, ‘2.dib’, ‘3.dib’, etc.) It is possible to do something like this without modifying the … Continue reading

Posted in Uncategorized | Tagged , , , , , , | 2 Comments

multisnapz – command line image capture from multiple VFW cameras

EDIT (20-11-2011) : Since posting this, I have created a new DirectShow command line image grabber called CommandCam, which I recommend you use instead of multisnapz. Get CommandCam here (binary download and source code available). I’ve just tried modifying the … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , | 5 Comments