ffprobe problem: Empty JSON

Any other question that don't fit into the other support categorizes.
Post Reply
Đonny
Posts: 2
Joined: Tue Nov 15, 2011 9:32 am

ffprobe problem: Empty JSON

Post by Đonny »

Hi, How can I get machine-readable output form ffprobe? Ideally JSON or xml. On Windows.
Using ffprobe -print_format json "k:\Videos\ST 07 Generations CZ+EN.avi"
Output is:
======================
ffprobe version N-34704-g985e768, Copyright (c) 2007-2011 the FFmpeg developers
built on Nov 11 2011 01:52:00 with gcc 4.6.2
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-ru
ntime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libope
ncore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --en
able-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger -
-enable-libspeex --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwben
c --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-
libxvid --enable-zlib
libavutil 51. 24. 1 / 51. 24. 1
libavcodec 53. 31. 0 / 53. 31. 0
libavformat 53. 20. 0 / 53. 20. 0
libavdevice 53. 4. 0 / 53. 4. 0
libavfilter 2. 47. 2 / 2. 47. 2
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
Input #0, avi, from 'k:\Videos\ST 07 Generations CZ+EN.avi':
Metadata:
encoder : VirtualDubMod 1.5.4.1 (build 2178/release)
Duration: 01:53:04.96, start: 0.000000, bitrate: 2356 kb/s
Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv
420p, 720x320 [SAR 1:1 DAR 9:4], 25 tbr, 25 tbn, 25 tbc
Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), s16, 448
kb/s
Stream #0:2: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, s16, 192 kb
/s
{
}
======================================

You see, the JSON object is empty.
If I redirect stdout to a file (e.g. > d:\temp\log.txt) it contains only
{
}
How can I instruct ffmpeg to write some data to JSON?

Đonny
Posts: 2
Joined: Tue Nov 15, 2011 9:32 am

Re: ffprobe problem: Empty JSON

Post by Đonny »

to reply myself: it's necessary to use one of -show_XXX options (see http://ffmpeg.org/ffprobe.html#Main-options)

Post Reply