[FFmpeg-devel] higher-level libs?

Rich Felker dalias
Wed Nov 21 03:33:42 CET 2007

On Wed, Nov 21, 2007 at 11:57:41AM +1300, David McNab wrote:
> > YUV 4:2:0 with no A is a lot more standard. Why would you want a
> > format that's likely not to be usable as-is? And (extremely slow!!)
> > resampling for no good?
> To save me the hassle of upsampling to 4:4:4 when I want to apply
> filters needing the higher chroma res, such as chromakey.

A simple function which takes an arbitrary-format frame returned by
the nice API and converts it to your preferred format would suffice.

> I'd be happy to read/write audio on a per-video-frame granularity.

Including dealing with fractional samples at boundaries? :)
I think you have a very DV-centric view of media. In general this is
not the way audio and video work together...

> > >  - for file formats that support it (eg DV), seek to arbitrary positions
> > >    in the file
> > 
> > All formats support it, it's just a question of how fast they can do
> > it and whether parsing the codec data is needed.. But what's meant by
> > "seek to position X" requires some thought.
> What I should have said is 'for formats such as DV that have uniform
> sized blocks of video/audio data, such that it's possible to seek to
> arbitrary positions and overwrite n frames without clobbering the
> following frame.

libavformat has no support whatsoever for editing files in-place. This
is a very special purpose need that will only work with an extremely
small number of codecs and containers, for which special-purpose
software is more appropriate.

> As it is, my framework uses a popen'ed ffmpeg to convert to DV format,
> then libdv (bless its simplicity) to read the frames. On render, I'm

For your "bless its simplicity" approach, I think you're best off
using specialized libraries like this. FFmpeg handles hundreds of
different formats and needs a more abstract view on things.

BTW DV is an extremely bad format for mastering video unless you'll be
using PAL only. NTSC DV is 4:1:1 which becomes 4:1:0 as soon as you
transcode to any real-world format (as if 4:1:1 didn't already look
bad enough..)


More information about the ffmpeg-devel mailing list