[FFmpeg-user] XSLT for ffprobe-XML to METS conversion

David Rice daverice at mac.com
Wed Aug 8 01:01:06 CEST 2012


On Aug 7, 2012, at 9:41 AM, Peter B. wrote:

> Hi,
> 
> I've took the time to write a quick "ffmpeg2mets.xsl" stylesheet, which transforms the technical metadata from ffprobe's XML output into a standardized structure for audio/video as defined by the U.S. Libary of Congress [1][2], and stored in a METS container XML [3].
> 
> Duration is stored in ISO8601 format [4], bitrate in kbps and samplerate in kHz.
> 
> It's no big thing, and also not very robust or pimped, but I thought I'd post it in case someone could need it, too:
> 
> http://dva-profession.svn.sourceforge.net/viewvc/dva-profession/trunk/misc/metadata/ffprobe2mets.xsl?revision=109&view=markup

Thanks for sharing this. I was just considering doing this myself. By the way, I drafted up a ffprobe-XML to PREMIS metadata transformation (here: https://gist.github.com/3290340), but see that METS may be more useful. With the ffprobe2premis.xsl file you can apply it with:
ffprobe -show_format -show_streams -show_versions -show_error -noprivate -print_format xml=q=1:x=1 MOVIE.mov 2>/dev/null | xsltproc ffprobe2premis.xsl
Dave Rice


More information about the ffmpeg-user mailing list