FFmpeg: Create Transport Stream from an image and audio

I had the need to generate a breakdown slide with a static image for the video and an audio track. This needed to be a video file, specifically a Transport Stream. The command below generates a TS video clip which has the duration of the supplied audio file.

ffmpeg -loop 1 -i IMAGE.png -i AUDIO.flac -c:v libx264 -c:a aac -ar 48k -b:a 192k -pix_fmt yuv420p -shortest -streamid 0:100 -streamid 1:101 -mpegts_flags latm OUTPUT.ts

You will need to modify the command above to meet your needs - the PIDs to use along with codecs, bitrates etc. Below explains what each flag is for: