comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » mpeg next question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
mpeg next question [message #32272] Mon, 30 September 2002 23:41 Go to next message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Hi

I have 40 frames and I like to have played each at a frame rate one per
second.
I don't find a keyword to do this in mpeg. At the moment I defined
frame_rate=2 this is 24 frames/sec. And then I used a loop to replicate
each frame 24 times.
The mpeg file gets horrible big. I'am using 'IDLgrMPEG'

Any bette ideas?

Reimar


--
Reimar Bauer

Institut fuer Stratosphaerische Chemie (ICG-I)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
------------------------------------------------------------ -------
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
============================================================ =======
Re: mpeg next question [message #32349 is a reply to message #32272] Wed, 02 October 2002 06:25 Go to previous message
Doug Rowland is currently offline  Doug Rowland
Messages: 12
Registered: March 2002
Junior Member
David,

codec = "coder/decoder"

sort of like modem = "modulator / demodulator"

Doug

In <MPG.18049af5ed7a42479899cc@news.frii.com> David Fanning wrote:
> Rick Towler (rtowler@u.washington.edu) writes:
>
>> In my experience, the best codecs for sci anim ("best" being based on
>> file size and quality) are: Sorenson video 3 (PC & Mac - codec ships
>> with quicktime) Ligos Indeo Video 5 (PC, Mac, UNIX Xanim - www.ligos.
>> com) DivX (MPEG-4) (PC, Mac & Linux - free codec www.divx.com)
>
> Can I ask a dumb question? What does the word "codec"
> mean, exactly? :-)
>
> Cheers,
>
> David
>
--
------------------------------------------------------------ -------------------------------
Doug Rowland 472 Tate Laboratory of Physics
Space Physics Laboratory 116 Church Street S.E.
School of Physics and Astronomy Minneapolis, MN
University of Minnesota 55455

work: (612) 624-0378 email: rowland@fields.space.umn.edu
fax: (612) 624-4578
Re: mpeg next question [message #32350 is a reply to message #32272] Wed, 02 October 2002 05:56 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Rick Towler (rtowler@u.washington.edu) writes:

> In my experience, the best codecs for sci anim ("best" being based on file
> size and quality) are:
>
> Sorenson video 3 (PC & Mac - codec ships with quicktime)
> Ligos Indeo Video 5 (PC, Mac, UNIX Xanim - www.ligos.com)
> DivX (MPEG-4) (PC, Mac & Linux - free codec www.divx.com)

Can I ask a dumb question? What does the word "codec"
mean, exactly? :-)

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: mpeg next question [message #32359 is a reply to message #32272] Tue, 01 October 2002 13:55 Go to previous message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
"Reimar Bauer" <R.Bauer@fz-juelich.de> wrote

> The codecs all available for linux too. But I am missing some examples at
> the moment.

I am not entirely sure what you are asking.

If you need playback on linux machines then you are limited to Indeo 4 & 5
and DivX. Playback should be straightforward. Xanim handles the Indeo 4 &
5 formats (with the proper Xanim decompressor files). DivX offers the codec
for linux but the main site doesn't offer a player at this time. You'll
have to search freshmeat.net or sourceforge for a player that can use the
DivX codec on linux.

If you need to encode on linux then you are on your own. You will need a
program that will take all of the still frames and create an .avi file from
them (preferably using the codec of your choice). Try
http://heroinewarrior.com/index.php3 they make cinelerra which might do the
job.


Since you posted the Powerpoint question you must have access to a windows
PC. If this is the case you should at best be able to use Ronn's IDLtoAVI
.dlm (if IDL is available on the PC). It is well documented and easy to
use. If IDL isn't available on the PC the least you should be able to do is
use a windows based tool to create the .avi files from your still frames. I
use the shareware program videoMach (www.gromada.com) but there are
undoubtedly many other programs that will work. The indeo codecs are at
www.ligos.com. You need to download and install the codecs, then reboot,
before you can use them in videoMach.


The indeo codecs will work quite well. I think that in your case (linux
support) they are the best choice. In my test cases visually they performed
almost identically but the version 5 codec was speedier. Note that you will
need the correct codec on *any* machine you wish to play your video on.


There is still a lot to know. Each codec can be tuned for your particular
application, often to great benefit. It will take some time working with
them to arrive at the best settings for your particular animation.


-Rick
Re: mpeg next question [message #32361 is a reply to message #32272] Tue, 01 October 2002 13:00 Go to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Rick Towler wrote:

>
> "Reimar Bauer" <R.Bauer@fz-juelich.de> wrote
>
>> I have 40 frames and I like to have played each at a frame rate one per
>> second.
>> I don't find a keyword to do this in mpeg.
>
> You can't. Since MPEG was designed for video the frame rate is tied to
> industry standards (PAL/NTSC). While some MPEG codecs may allow you
> encode at non-standard rates, the resulting file will probably only be
> decoded by
> the same codec. You lose your portability.
>
>
>> At the moment I defined frame_rate=2 this is 24 frames/sec.
>> And then I used a loop to replicate each frame 24 times.
>> The mpeg file gets horrible big. I'am using 'IDLgrMPEG'
>
>> Any bette ideas?
>
> Don't use MPEG. Or I should say, don't use MPEG-1 or MPEG-2.
>
> While it is probably the most portable video file format (MPEG-1 that is),
> it just can't compete with newer codecs. Plus, MPEG wasn't designed with
> scientific animations in mind and it produces terrible results unless the
> quality settings are very high. Yes, probably *no* codec programmers were
> thinking of the scientists but there are codecs that do sci animations
> better.
>
> To choose a codec, think of your audience. You will end up trading file
> size and quality for codec availability. The best decoders are freely
> available for PC and Mac. There are a few better one's available for
> Xanim.
>
> In my experience, the best codecs for sci anim ("best" being based on file
> size and quality) are:
>
> Sorenson video 3 (PC & Mac - codec ships with quicktime)
> Ligos Indeo Video 5 (PC, Mac, UNIX Xanim - www.ligos.com)
> DivX (MPEG-4) (PC, Mac & Linux - free codec www.divx.com)
>
>
> If you have access to a PC, I *highly* recommend Ronn Kling's AVI2IDL
> windows only .dlm based on Oleg Kornilov's code which provides an
> interface
> to the Win32 AVIFile interface. This is by far the easiest way to create
> high quality animations using IDL. If not, you'll want to write the
> individual frames to disk and find a program that can stitch them
> together. I'm sure there are many for the Mac, but it might be more
> difficult to find good ones that run on Linux or other UNIX systems
> (mainly because the codecs aren't available, at least for free).
>
> -Rick

The codecs all available for linux too. But I am missing some examples at
the moment.

Reimar


--
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg-i/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
Re: mpeg next question [message #32364 is a reply to message #32272] Tue, 01 October 2002 12:15 Go to previous message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
"Reimar Bauer" <R.Bauer@fz-juelich.de> wrote

> I have 40 frames and I like to have played each at a frame rate one per
> second.
> I don't find a keyword to do this in mpeg.

You can't. Since MPEG was designed for video the frame rate is tied to
industry standards (PAL/NTSC). While some MPEG codecs may allow you encode
at non-standard rates, the resulting file will probably only be decoded by
the same codec. You lose your portability.


> At the moment I defined frame_rate=2 this is 24 frames/sec.
> And then I used a loop to replicate each frame 24 times.
> The mpeg file gets horrible big. I'am using 'IDLgrMPEG'

> Any bette ideas?

Don't use MPEG. Or I should say, don't use MPEG-1 or MPEG-2.

While it is probably the most portable video file format (MPEG-1 that is),
it just can't compete with newer codecs. Plus, MPEG wasn't designed with
scientific animations in mind and it produces terrible results unless the
quality settings are very high. Yes, probably *no* codec programmers were
thinking of the scientists but there are codecs that do sci animations
better.

To choose a codec, think of your audience. You will end up trading file
size and quality for codec availability. The best decoders are freely
available for PC and Mac. There are a few better one's available for Xanim.

In my experience, the best codecs for sci anim ("best" being based on file
size and quality) are:

Sorenson video 3 (PC & Mac - codec ships with quicktime)
Ligos Indeo Video 5 (PC, Mac, UNIX Xanim - www.ligos.com)
DivX (MPEG-4) (PC, Mac & Linux - free codec www.divx.com)


If you have access to a PC, I *highly* recommend Ronn Kling's AVI2IDL
windows only .dlm based on Oleg Kornilov's code which provides an interface
to the Win32 AVIFile interface. This is by far the easiest way to create
high quality animations using IDL. If not, you'll want to write the
individual frames to disk and find a program that can stitch them together.
I'm sure there are many for the Mac, but it might be more difficult to find
good ones that run on Linux or other UNIX systems (mainly because the codecs
aren't available, at least for free).

-Rick
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Looking for more ideas on code ...
Next Topic: Reducing an array.

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:43:57 PDT 2025

Total time taken to generate the page: 0.00681 seconds