[FFmpeg-devel] How to handled gzip'd files?

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Apr 3 18:33:44 CEST 2016


On Sun, Apr 03, 2016 at 09:02:27AM -0400, Ronald S. Bultje wrote:
> Hi,
> 
> On Sat, Apr 2, 2016 at 12:29 PM, Reimar Döffinger <Reimar.Doeffinger at gmx.de>
> wrote:
> 
> > Hello,
> > I was looking at these:
> > http://samples.mplayerhq.hu/game-formats/la-snm/grimfandango/
> > http://samples.mplayerhq.hu/game-formats/la-snm/force-commander-znm/
> > and realized that they are perfectly supported, if you first
> > run them through gunzip.
> > However there are 2 issues here:
> > 1) They are misdetected as all kinds of nonsense
> > (http://samples.mplayerhq.hu/game-formats/la-snm/grimfandango/byeruba.snm
> > as AAC for example)
> > 2) How should an ordinary user even come up with that idea?
> >
> > Do we have a way to transparently decompress?
> 
> 
> Why would we? It's not like this is commonplace across all formats, it's
> only present in a handful, and we can deal with it on a case-by-case basis,
> just as we handle compressed mov. Right?

mov is slightly different as it isn't just a file compressed
wholesale...

> So probe and read_packet can optionally decompress and we're pretty much
> done. I don't see the issue, and this is at best a few lines of code... If
> you want to share unzip between probes, I'm sure you can extend the input
> packet to have a "gzip-decompressed" buffer also. This stuff isn't hard.

I guess I was looking for a more generic solution, and it won't really
solve the "gzip'd files are misdetected as random stuff" issue.
There are also some other small things like having to disable seeking
in the demuxer etc. but you are right this is probably the simplest
solution to that specific issue.


More information about the ffmpeg-devel mailing list