[libav-bugs] [Bug 547] New: avprobe/ffprobe does NOT show sampling rate

bugzilla at libav.org bugzilla at libav.org
Thu Aug 8 16:17:48 CEST 2013


https://bugzilla.libav.org/show_bug.cgi?id=547

           Summary: avprobe/ffprobe does NOT show sampling rate
           Product: Libav
           Version: 9
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: Normal
         Component: utilities
        AssignedTo: bugzilla at libav.org
        ReportedBy: devyew at gmail.com


Right now the avprobe show_format option doesn't show the sampling rate info in
the formatted output. even though the headline text shows sampling rate. And
there is no option to show sampling rate in other options.

In python code:

    >>> filename = 'sample.gsm'
    >>> result = subprocess.check_output(['avprobe', '-show_format', '-of',
'json', filename])
    avprobe version 9.6, Copyright (c) 2007-2013 the Libav developers
      built on Jun  8 2013 02:44:19 with Apple LLVM version 4.2
(clang-425.0.24) (based on LLVM 3.2svn)
    [gsm @ 0x7fe0b1806600] Estimating duration from bitrate, this may be
inaccurate
    Input #0, gsm, from 'sample.gsm':
      Duration: 00:03:52.32, start: 0.000000, bitrate: 13 kb/s
        Stream #0.0: Audio: gsm, 8000 Hz, mono, s16, 13 kb/s
    >>> print result
    {  "format" : {
        "filename" : "sample.gsm",
        "nb_streams" : 1,
        "format_name" : "gsm",
        "format_long_name" : "raw GSM",
        "start_time" : "0.000000",
        "duration" : "232.320000",
        "size" : "383328.000000",
        "bit_rate" : "13200.000000"
    }}

BASH output:

$ avprobe  -v verbose -show_format -of json  sample.gsm
avprobe version 9.6, Copyright (c) 2007-2013 the Libav developers
  built on Jun  8 2013 02:44:19 with Apple LLVM version 4.2 (clang-425.0.24)
(based on LLVM 3.2svn)
  configuration: --prefix=/usr/local/Cellar/libav/9.6 --enable-shared
--enable-pthreads --enable-gpl --enable-version3 --enable-nonfree
--enable-hardcoded-tables --enable-avresample --enable-vda --enable-gnutls
--enable-runtime-cpudetect --disable-indev=jack --cc=cc --host-cflags=
--host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame
--enable-libxvid --enable-avplay
  libavutil     52.  3. 0 / 52.  3. 0
  libavcodec    54. 35. 0 / 54. 35. 0
  libavformat   54. 20. 3 / 54. 20. 3
  libavdevice   53.  2. 0 / 53.  2. 0
  libavfilter    3.  3. 0 /  3.  3. 0
  libavresample  1.  0. 1 /  1.  0. 1
  libswscale     2.  1. 1 /  2.  1. 1
[gsm @ 0x7f8012806600] Estimating duration from bitrate, this may be inaccurate
Input #0, gsm, from 'sample.gsm':
  Duration: 00:03:52.32, start: 0.000000, bitrate: 13 kb/s
    Stream #0.0: Audio: gsm, 8000 Hz, mono, s16, 13 kb/s
{  "format" : {
    "filename" : "sample.gsm",
    "nb_streams" : 1,
    "format_name" : "gsm",
    "format_long_name" : "raw GSM",
    "start_time" : "0.000000",
    "duration" : "232.320000",
    "size" : "383328.000000",
    "bit_rate" : "13200.000000"
  }}

Noted that " Stream #0.0: Audio: gsm, 8000 Hz, mono, s16, 13 kb/s" shows the
sampling rate for the audio stream#0 but there is no way to detect/prove the
sampling rate of stream#0 although you can set it when re-encoding it.

-- 
Configure bugmail: https://bugzilla.libav.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the libav-bugs mailing list