MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Video compression

  • To: mathgroup at smc.vnet.net
  • Subject: [mg108427] Re: Video compression
  • From: "Sjoerd C. de Vries" <sjoerd.c.devries at gmail.com>
  • Date: Wed, 17 Mar 2010 04:40:38 -0500 (EST)
  • References: <hnnk7d$ckp$1@smc.vnet.net>

WMV is not listed in the documentation as an available format.

In the documentation you can find various examples of how to extract
frames from movies that can be imported (see, e.g., ref/format/
QuickTime).

It seems that many popular codecs are not supported and since AVI is
only a container format, having a .AVI extension is no guarantee that
the file can be actually imported.

Your example movie is encoded as CRAM, which is not listed as an
available format. This explains the error message you get.

Cheers -- Sjoerd

On Mar 16, 11:49 am, Robert Pigeon <robert.pig... at videotron.ca> wrote:
> Thanks for your answer Sjoerd,
>   I agree with you: Import/AVI format lists what is available as formats.
> But... Do the following, it is an AVI format:
>
> Import["http://homepages.inf.ed.ac.uk/amos/demos/flythroughb.avi","VideoEnco
> ding"]
> Will give: CRAM
>
> Now do:
> Import["C:\\Users\\rpigeon\\Videos\\flythroughb.avi", "Animation"]
> Will give: Import::fmterr: Cannot import data as video format. >>
>
> So what I was asking is: the codecs used by Mathematica is a long way from
> all that is used for AVI encoding formats. The same is also true for other
> type of video extensions. Just try Importing a WMV video in Windows from the
> Video Samples directory and you will see that it cannot be used in
> Mathematica directly. Do I have to uncompress (UNCOMPRESS format is in the
> AVI list of format for avi and other type of videos) a video before using it
> in Mathematica? Or is there a way to do the uncompress inside Mathematica?
>
> Robert
>
> -----Message d'origine-----
> De : Sjoerd C. de Vries [mailto:sjoerd.c.devr... at gmail.com]
> Envoy=E9 : 15 mars 2010 01:05
> =C0 : mathgr... at smc.vnet.net
> Objet :  Re: Video compression
>
> The vast majority of movie formats uses compression. So, if
> Mathematica can import a given video format is most likely that it is
> compressed.
>
> The help for the Import/AVI format says: "Import supports the
> following codecs: "YUV", "H261", "H263", "JPEG", "Uncompressed",
> "Cinepak", "MotionJPEG". "
>
> Looks like there are compressed video formats in there.
>
> Cheers -- Sjoerd
>
> On Mar 14, 12:13 pm, Robert Pigeon <robert.pig... at videotron.ca> wrote:
>
> > Hello all,
>
> >                 As you all know we can Import a video in Mathematica 7 and
> > then explore frames for example. But, usually a video that is obtain from
> > the Net is in a compress form of some sort. Then frames cannot be
> extracted
> > to do some image processing. We cannot even play it in Mathematica.
>
> >                 My question: is it possible to uncompress a video in
> > Mathematica or do I have to open the video outside Mathematica in a video
> > player and, if possible, save it in an uncompress form?
>
> > Thanks for any help,
>
> > Robert



  • Prev by Date: Re: How to extract the x-axis and y-axis current ticks of a plot from
  • Next by Date: Re: Pi day
  • Previous by thread: Re: Video compression
  • Next by thread: Building a list of all words of length less than k in a given