[FFmpeg-trac] #2621(FFprobe:new): ffprobe should output formatted information about detection reliability
FFmpeg
trac at avcodec.org
Sat Jun 1 23:07:28 CEST 2013
#2621: ffprobe should output formatted information about detection reliability
-------------------------------------+-------------------------------------
Reporter: | Type:
ahthovaikied | enhancement
Status: new | Priority: normal
Component: FFprobe | Version: git-
Keywords: ffprobe | master
Blocking: | Blocked By:
Analyzed by developer: 0 | Reproduced by developer: 0
-------------------------------------+-------------------------------------
Sometimes ffprobe misdetects text files as mp3, but it outputs a log
message about a possible misdetection:
{{{
$ ffprobe text_file.log
ffprobe version N-53746-gec34963 Copyright (c) 2007-2013 the FFmpeg
developers
built on Jun 1 2013 22:57:16 with gcc 4.6 (Ubuntu/Linaro
4.6.3-1ubuntu5)
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-
x11grab --disable-encoder=vorbis --disable-encoder=aac --enable-
libopencore-amrnb --enable-libopencore-amrwb --enable-libfdk-aac --enable-
librtmp --enable-libmp3lame --enable-libtheora --enable-libvorbis
--enable-libvpx --enable-libx264 --enable-libxvid --enable-libopus
--disable-runtime-cpudetect --disable-ffserver --disable-debug
--cpu=corei7
libavutil 52. 34.100 / 52. 34.100
libavcodec 55. 13.100 / 55. 13.100
libavformat 55. 8.102 / 55. 8.102
libavdevice 55. 2.100 / 55. 2.100
libavfilter 3. 74.101 / 3. 74.101
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 3.100 / 52. 3.100
[mp3 @ 0x19df260] Format mp3 detected only with low score of 1,
misdetection possible!
[mp3 @ 0x19df260] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from 'text_file.log':
Duration: 00:00:00.29, start: 0.000000, bitrate: 128 kb/s
Stream #0:0: Audio: mp1, 48000 Hz, stereo, s16p, 128 kb/s
}}}
However when making ffprobe output formatted data (ie. JSON), the
information about the low detection reliability is not present:
{{{
$ ffprobe -loglevel quiet -print_format json -show_format text_file.log
{
"format": {
"filename": "text_file.log",
"nb_streams": 1,
"format_name": "mp3",
"format_long_name": "MP2/3 (MPEG audio layer 2/3)",
"start_time": "0.000000",
"duration": "0.293375",
"size": "4694",
"bit_rate": "128000"
}
}
}}}
The addition of a field in the formatted output with a value about the
detection reliability would be great and solve that problem.
It would be especially useful for scripts and programs that rely on
ffprobe to analyze files, and therefore do not read or parse the ffprobe
logging output.
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2621>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list