[FFmpeg-devel] [PATCH] 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.
michaelni at gmx.at
Thu Jun 20 02:06:02 CEST 2013
On Tue, Jun 18, 2013 at 12:30:44AM -0700, Ryan Dingman wrote:
> 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
the new option belongs to the outout file, not the input also it
shouldnt be global but specific to the one output its set for
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
No great genius has ever existed without some touch of madness. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-devel