[FFmpeg-user] Problem with setting ffprobe writer options for xml output

Tschöpel, Sebastian sebastian.tschoepel at iais.fraunhofer.de
Mon Jul 2 17:33:12 CEST 2012


Hello List,

I am currently trying to use FFProbe to ouput stream information as XML. 

When I use this command:

ffprobe -v quiet -print_format xml -show_streams sample.mp3

I get something like this:

<?xml version="1.0" encoding="UTF-8"?>
<ffprobe>
    <streams>
        <stream index="0" codec_name="mp3" codec_long_name="MP3 (MPEG audio layer 3)" codec_type="audio" codec_time_base="1/44100" codec_tag_string="[0][0][0][0]" codec_tag="0x0000" sample_fmt="s16" sample_rate="44100" channels="2" bits_per_sample="0" r_frame_rate="0/0" avg_frame_rate="0/0" time_base="1/14112000" start_time="0.000000" duration="36.207687" bit_rate="128000"/>
    </streams>
</ffprobe>

According to the documentation it is also possible to get qualified and xsd compliant XML by passing the arguments:

'fully_qualified, q'
'xsd_compliant, x'

to the writer.
My problem is: I have no idea how to set those parameters. Having given the hint from the documentation "-print_format writer_name[=writer_options]" I tried various things such as:

-print_format:x=1 xml
-print_format xml:x=1
-print_format xml x=1
-print_foramt xml[x=1]
...

How to set those arguments correctly? Hope someone can give me some hints on this.

--
Best regards,
Basti



More information about the ffmpeg-user mailing list