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:
-loop 1tells ffmpeg to loop the image for the duration of the clip-c:v libx264specifies the video codec as x264-c:a aacspecifies the audio codec as AAC-ar 48ksets the audio samle rate-b:a 192ksets the audio bitrate-pix_fmt yuv420psets the pixel format-sortesttells ffmpeg to make the clip the length of the audio file (without this the clip would have infinte length, because of the looping of the image file)-streamid 0:100tells ffmpeg to set the PID of the first stream (video/image in this case, because it was specified first) to 100-streamid 1:101tells ffmpeg to set the PID fo the second stream (audio) to 101-mpegtf_flags latmtells ffmpeg to use LATM packetisation for AAC streams