[FFmpeg-user] Confusing ffprobe exit codes

Nicolas George nicolas.george at normalesup.org
Wed Jun 26 15:19:09 CEST 2013

L'octidi 8 messidor, an CCXXI, Dalibor Mitrovic a écrit :
> I am having an issue while using ffprobe to gather information regarding
> the audio stream(s) of video files.
> I use the following command line
> "ffprobe -show_streams -select_streams a singleAudioStreamVideoFile.mp4".
> ffprobe returns the requested meta data but exits with exit code "1"
> indicating that "the file cannot be opened or recognized as a multimedia
> file" [1].
> Calling ffprobe for the same video file and requesting meta data regarding
> the video stream, using the following command line
> "ffprobe -show_streams -select_streams v singleAudioStreamVideoFile.mp4"
> results in the metadata being returned and exit code "0".
> The exit codes do not change if the parameter "-show_streams" is omitted.

I had noticed the problem for some time but not yet investigated it. It is
caused by the presence of the -select_streams options, and causes the exit
code to be the boolean value of the stream selection for the last stream.

I have sent a patch fixing it to the devel mailing-list, thanks for the


  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20130626/8f354e3a/attachment.asc>

More information about the ffmpeg-user mailing list