Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#5880 closed defect (worksforme)

ffprobe outputs into STDERR; should be to STDOUT

Reported by: Technologov Owned by:
Priority: minor Component: ffprobe
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
ffprobe must use standard UNIX syntax of STDOUT when creating a file report, so that standard redirection works.
using STDERR is wrong. STDOUT must be used for all informative data.

Bug happens with ffmpeg-git N-81947-gc45ba26-1 as well as v3.1.2 on Linux x64

How to reproduce:

% fffprobe /media/sf_F_DRIVE/Test-video-coding/Harmonic_Rally/Harmonic\ Rally\ HD720p.mp4 > /tmp/abc.txt
ffprobe version N-81947-gc45ba26-1 Copyright (c) 2007-2016 the FFmpeg developers
  built with gcc 6.1.1 (Debian 6.1.1-11) 20160802
  configuration: --extra-version=1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopus --enable-libpulse --enable-librubberband --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-chromaprint --enable-libopencv --enable-libx264
  libavutil      55. 32.100 / 55. 32.100
  libavcodec     57. 61.100 / 57. 61.100
  libavformat    57. 51.103 / 57. 51.103
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 63.100 /  6. 63.100
  libavresample   3.  0.  0 /  3.  0.  0
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  2.100 /  2.  2.100
  libpostproc    54.  0.100 / 54.  0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/media/sf_F_DRIVE/Test-video-coding/Harmonic_Rally/Harmonic Rally HD720p.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2016-08-22T08:06:36.000000Z
  Duration: 00:00:59.40, start: 0.000000, bitrate: 2333 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], 2204 kb/s, 29.91 fps, 29.92 tbr, 90k tbn, 59.82 tbc (default)
    Metadata:
      creation_time   : 2016-08-22T08:06:36.000000Z
      handler_name    : ISO Media file produced by Google Inc.
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
    Metadata:
      creation_time   : 2016-08-22T08:06:36.000000Z
      handler_name    : ISO Media file produced by Google Inc.

Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.

-Technologov, 08.10.2016.

Change History (4)

comment:1 Changed 3 years ago by cehoyos

  • Resolution set to worksforme
  • Status changed from new to closed

The actual output of ffprobe goes to stdout, the output you post is meant to go to stderr.

comment:2 Changed 3 years ago by Technologov

This output is informative, is NOT an error, therefore it must go to STDOUT.

comment:3 Changed 3 years ago by Cigaes

ffprobe's output is meant for parsing. We offer guarantee of stability about its format and contents.

The stderr dump is cosmetic and meant for humans, we do not offer guarantee of stability.

If some useful information is missing in the actual output, please report it. Otherwise, use it.

comment:4 Changed 3 years ago by Technologov

Maybe it would be better to just accept different input parameters ?

-h (for humans)
-p (parser for computers)

and output both to STDOUT ?

Note: See TracTickets for help on using tickets.