Command Line Toolkit
Here’s a bunch of command line tools I occasionally use over and over again. I can never remember them, so I started noting them down on my Google Drive/Docs. Then Google Drive started annoying me with its sub-par latency, so I figured I’d be doing a favor to video people out there (including myself) by collecting them on this site.
FFmpeg commands
- Encapsulating yuv video in y4m container
- Peeling y4m container header from yuv video
- Encapsulating H.264 NALU byte-stream in mkv container
- Changing the pixel format of raw videos: if you’re feeling lazy to write separate code for different pixel formats, you can use FFmpeg to do that for you. Here are FourCC and Wikipedia pages to learn about YUV color formats.
VLC commands
- Playing yuv files: as usual, we must provide width, height and the color format, as well as the frame rate necessary for correct playback.
- Playing the camera feed on Linux (with huge latency): add ‘-I dummy’ to use the simple interface.
x264 commands
- Encoding in real-time: Here we use a fixed intra-period length and no scene cuts. If you don’t know the encoding parameters you need to set, selecting the profile and tuning according to your needs should be sufficient. Consult the x264 help for more info.
to be continued…