Added an option (-ignore_empty_streams) to ignore output files that do not contain a stream and continue processing and write all the other output files that do have a stream.

For example, we may have an input mp3 file for which we want to produce 3 outputs. The first output is to extract the metadata from the mp3, the second output to reencode the mp3 and the third output to extract the artwork from the video stream for the mp3.

The video stream containing the track artwork may or maynot exist. So, the following invocation of ffmpeg will not write anything to the file artwork.jpg. Additionally, it will not write anything to metadata.txt or output.mp3 even though it would otherwise be able to successfully write the output for these files.

ffmpeg -y -i input.mp3 -an -f ffmetadata metadata.txt -acodec libmp3lame -ab 160k output.mp3 -an -f image2pipe -vcodec copy artwork.jpg

So, the -ignore_empty_streams option allows ffmpeg to skip any output that does not contain a stream and still write all the rest of the output files for which there is a stream. The following invocation of ffmpeg is similar to the previous invocation of ffmpeg in that they both will not write anything to artwork.jpg because there is not video stream containing the mp3 artwork. However, it differs from the pervious invocation in that it will continue processing and write both metadata.txt and output.mp3 because it can succesfully process those.

ffmpeg -ignore_empty_streams -y -i input.mp3 -an -f ffmetadata metadata.txt -acodec libmp3lame -ab 160k output.mp3 -an -f image2pipe -vcodec copy artwork.jpg

Signed-off-by: Ryan Dingman <rdingman@gmail.com>