Opened 12 years ago
Closed 10 years ago
#3838 closed defect (needs_more_info)
ffprobe's "fully_qualified" XML output does not namespace all elements
| Reported by: | Misty De Meo | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | ffprobe |
| Version: | unspecified | Keywords: | |
| Cc: | Blocked By: | ||
| Blocking: | Reproduced by developer: | no | |
| Analyzed by developer: | no |
Description
ffprobe's XML output features a "fully_qualified" option, which is documented as follows:
fully_qualified, q
If set to 1 specify if the output should be fully qualified. Default value is 0. This is required for generating an XML file which can be validated through an XSD file.
However, when this option is set, only the root <ffprobe> element is namespaced. All other elements are left unaltered, so they will not be interpreted as being in the same namespace as the parent element. Here's an example:
Regular output:
<?xml version="1.0" encoding="UTF-8"?>
<ffprobe>
<format filename="/Users/mistydemeo/image.png" nb_streams="1" nb_programs="0" format_name="image2" format_long_name="image2 sequence" start_time="0.000000" duration="0.040000" probe_score="50"/>
</ffprobe>
Fully-qualified output:
<?xml version="1.0" encoding="UTF-8"?>
<ffprobe:ffprobe xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:ffprobe='http://www.ffmpeg.org/schema/ffprobe' xsi:schemaLocation='http://www.ffmpeg.org/schema/ffprobe ffprobe.xsd'>
<format filename="/Users/mistydemeo/image.png" nb_streams="1" nb_programs="0" format_name="image2" format_long_name="image2 sequence" start_time="0.000000" duration="0.040000" probe_score="50"/>
</ffprobe:ffprobe>
The fully-qualified example was generated with the "-print_format xml=fully_qualified=1 -show_format" options.
Change History (4)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
Command:
ffprobe -i image.png -print_format xml=fully_qualified=1 -show_format
stdout:
<?xml version="1.0" encoding="UTF-8"?>
<ffprobe:ffprobe xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:ffprobe='http://www.ffmpeg.org/schema/ffprobe' xsi:schemaLocation='http://www.ffmpeg.org/schema/ffprobe ffprobe.xsd'>
<format filename="image.png" nb_streams="1" nb_programs="0" format_name="image2" format_long_name="image2 sequence" start_time="0.000000" duration="0.040000" probe_score="50"/>
</ffprobe:ffprobe>
stderr:
ffprobe version N-41239-g6a44699 Copyright (c) 2007-2014 the FFmpeg developers
built on Aug 6 2014 15:09:21 with Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
configuration: --prefix=/usr/local/Cellar/ffmpeg/HEAD --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample --enable-vda --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libxvid --enable-ffplay --enable-openssl --enable-libcaca
libavutil 52. 98.100 / 52. 98.100
libavcodec 55. 73.100 / 55. 73.100
libavformat 55. 51.101 / 55. 51.101
libavdevice 55. 13.102 / 55. 13.102
libavfilter 4. 11.102 / 4. 11.102
libavresample 1. 3. 0 / 1. 3. 0
libswscale 2. 6.100 / 2. 6.100
libswresample 0. 19.100 / 0. 19.100
libpostproc 52. 3.100 / 52. 3.100
Input #0, image2, from 'image.png':
Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
Stream #0:0: Video: png, rgb24, 239x90, 25 tbr, 25 tbn, 25 tbc
comment:3 by , 12 years ago
Can you provide an example of how you would like to see the tag names? Also, q=1 is meant to allow validation with XSD tools (e.g. xmllint), what tools are failing to parse the generated XML? Why do you need to fully qualify all the contained elements?
comment:4 by , 10 years ago
| Resolution: | → needs_more_info |
|---|---|
| Status: | new → closed |
Please reopen this ticket if you can answer Stefano's questions.



To make this a valid ticket, please provide your
ffprobecommand line that allows to reproduce the issue together with the complete, uncut console output.