Discussion:
[FFmpeg-user] Problem with setting ffprobe writer options for xml output
Tschöpel, Sebastian
2012-07-02 15:33:12 UTC
Permalink
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
Rhodri James
2012-07-02 15:59:08 UTC
Permalink
On Mon, 02 Jul 2012 16:33:12 +0100, Tsch=C3=B6pel, Sebastian =
According to the documentation it is also possible to get qualified an=
d =
'fully_qualified, q'
'xsd_compliant, x'
to the writer.
My problem is: I have no idea how to set those parameters. Having give=
n =
the hint from the documentation "-print_format =
writer_name[=3Dwriter_options]"
-print_format:x=3D1 xml
-print_format xml:x=3D1
-print_format xml x=3D1
-print_foramt xml[x=3D1]
...
The XML-specific documentation then states:

'This writer accepts options as a list of key=3Dvalue pairs, separated b=
y =

":".'

Did you try

-print_format xml=3Dx=3D1

or

-print_format xml=3D"x=3D1"

if you're feeling paranoid?

-- =

Rhodri James
Kynesim Ltd
Tschöpel, Sebastian
2012-07-02 16:06:36 UTC
Permalink
Hello Rhodri James,

thank you very much for your very quick reply! That actually has been the trick.
--
Best regards,
M. Sc. Sebastian Tschöpel

E-Mail | ***@iais.fraunhofer.de
Web | http://www.iais.fraunhofer.de/
Tel. | +49 (0) 2241 14 2266
Postal | Fraunhofer IAIS
| Schloss Birlinghoven
| 53754 Sankt Augustin, Germany
-----Ursprüngliche Nachricht-----
Gesendet: Montag, 2. Juli 2012 17:59
An: FFmpeg user questions and RTFMs
Betreff: Re: [FFmpeg-user] Problem with setting ffprobe writer options
for xml output
On Mon, 02 Jul 2012 16:33:12 +0100, Tschöpel, Sebastian
Post by Tschöpel, Sebastian
According to the documentation it is also possible to get qualified
and
Post by Tschöpel, Sebastian
'fully_qualified, q'
'xsd_compliant, x'
to the writer.
My problem is: I have no idea how to set those parameters. Having
given
Post by Tschöpel, Sebastian
the hint from the documentation "-print_format
writer_name[=writer_options]"
-print_format:x=1 xml
-print_format xml:x=1
-print_format xml x=1
-print_foramt xml[x=1]
...
'This writer accepts options as a list of key=value pairs, separated by
":".'
Did you try
-print_format xml=x=1
or
-print_format xml="x=1"
if you're feeling paranoid?
--
Rhodri James
Kynesim Ltd
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Loading...