[FFmpeg-devel] [PATCH] ffprobe: add compact and compactnk writers

Stefano Sabatini stefasab at gmail.com
Mon Sep 26 00:15:08 CEST 2011


On date Sunday 2011-09-25 16:47:00 +0200, Alexander Strasser encoded:
> Hi
> 
> Stefano Sabatini wrote:
> > On date Sunday 2011-09-25 15:39:29 +0200, Nicolas George encoded:
> > > Le quartidi 4 vendémiaire, an CCXX, Stefano Sabatini a écrit :
> > > > Output looks like this:
> > > > [...]
> > > > PACKET: audio|1|238080|238.080000|238080|238.080000|26|0.026000|26.000000|9866826|K
> > > 
> > > This does not work very well with awk: to separate the fields, it needs
> > > FS="|", but then, the first field is not separated from the label.
> > > 
> > > Maybe "PACKET:|audio|..."?
> > 

> > I can remove the leading " ", but then "|" is really meant as a
> > separator, and the section "PACKET:" should be used for filtering the
> > relevant sections (which should be easy enough with awk).
> 
>   The problem is that the first field would contains the header
> ("<bla>: ") or am I missing something?
> 
>   In that case, do we have hierarchies like nested sections and
> therefore nested headers? If not a fix like proposed by Clement
> which simply drops the ": " and uses the separator would be
> enough. In awk you could then easily know that the first of the
> fields is the one containing the section name.

Oh guys, you managed to convince me, afterall ":" or "|" as header
separator fits the same and after some tries with awk I convene this
is a bit simpler.

>   On the other hand if we have/want hierarchies then some other
> mechanism needs to be chosen/designed/worked out to store them
> in flat data formats like CSV, passwd-style etc.

We don't want them ;-), at least we pretend that we don't need them
for the compact writers.

I'll push the patch in a day or so if I read no more comments.
-- 
FFmpeg = Formidable and Fierce Minimal Pitiful Extended God
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-ffprobe-add-compact-and-compactnk-writers.patch
Type: text/x-diff
Size: 4652 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110926/adab6e27/attachment.bin>


More information about the ffmpeg-devel mailing list