Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Movie (mov) to frames (tiff ) converter

356 views
Skip to first unread message
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

unruh

unread,
Dec 2, 2009, 9:51:05 PM12/2/09
to
["Followup-To:" header set to alt.os.linux.]
On 2009-12-03, Robert Heller <hel...@deepsoft.com> wrote:
> At Wed, 02 Dec 2009 23:21:29 GMT unruh <unruh...@physics.ubc.ca> wrote:
>
>>
>> I need to convert a movie file (.mov) to a set of individual frame in
>> tiff format for making measurements from the frames for an experiment we
>> are running. How can I do this? (I run Mandriva if that makes any
>> difference).
>
> mplayer can do that (not to tiff directly, but as indivual frams of
> jpeg, pnm, png, or tga files, which in turn can be converted with
> ImageMagicK's convert program to tiff).

OK, will look into that. If you have a hint as to which options I need
to tickle I would appreciate it.


>
> I don't know if kino can do that or not.
>
>>
>>
>

Message has been deleted

Florian Diesch

unread,
Dec 3, 2009, 1:24:20 AM12/3/09
to
unruh <un...@wormhole.physics.ubc.ca> writes:

mplayer -vo png/tga/jpeg

Florian
--
<http://www.florian-diesch.de/software/pdfrecycle/>

Rikishi42

unread,
Dec 2, 2009, 8:17:44 PM12/2/09
to
On 2009-12-02, unruh <unruh...@physics.ubc.ca> wrote:
> I need to convert a movie file (.mov) to a set of individual frame in
> tiff format for making measurements from the frames for an experiment we
> are running. How can I do this? (I run Mandriva if that makes any
> difference).

Use the following to extract the video.mov to jpg frames:
mplayer video.mov -vo jpeg

Use the following to extract 1000 frames from the 1178'th second.
mplayer video.mov -ss 1178 -frames 1000 -vo jpeg


If jpg's are not usefull, you can convert them to tiff with convert.

See 'man mplayer' and 'man convert'.

Convert is part of ImageMagic. You might need to install that, first.

--
Any time things appear to be going better, you have overlooked
something.

Message has been deleted

unruh

unread,
Dec 3, 2009, 12:14:09 PM12/3/09
to

Thanks. I did finally find the png/jpeg/.., options in that huge list of
mplayer options but thanks.

>
>
>
> Florian

unruh

unread,
Dec 3, 2009, 12:16:52 PM12/3/09
to
On 2009-12-03, Rikishi42 <skunk...@rikishi42.net> wrote:
> On 2009-12-02, unruh <unruh...@physics.ubc.ca> wrote:
>> I need to convert a movie file (.mov) to a set of individual frame in
>> tiff format for making measurements from the frames for an experiment we
>> are running. How can I do this? (I run Mandriva if that makes any
>> difference).
>
> Use the following to extract the video.mov to jpg frames:
> mplayer video.mov -vo jpeg
>
> Use the following to extract 1000 frames from the 1178'th second.
> mplayer video.mov -ss 1178 -frames 1000 -vo jpeg
>
>
> If jpg's are not usefull, you can convert them to tiff with convert.
>
> See 'man mplayer' and 'man convert'.
>
> Convert is part of ImageMagic. You might need to install that, first.

Since one of the purposes is to do measurements on the frame for a
scientific experiment I do not want layers of lossy compression so I
would probably use png. . How are the frames stored in a .mov file? I
assume that they are probably stored with some sort of lossy
compression.

.mov movie frames stored

Message has been deleted

unruh

unread,
Dec 3, 2009, 2:55:57 PM12/3/09
to
On 2009-12-03, Anita <m...@invalid.com> wrote:
> "unruh" <unruh...@physics.ubc.ca> wrote in message
> news:slrnhhdtjp...@wormhole.physics.ubc.ca...

>
>> I need to convert a movie file (.mov) to a set of individual frame in
>> tiff format for making measurements from the frames for an experiment we
>> are running. How can I do this? (I run Mandriva if that makes any
>> difference).
>
> Easily done if you have mplayer and ImageMagick installed. You can make the
> following far more elegant by reading the man pages, but just to get you
> started:
>
> mkdir jpeg; mkdir tiff
> cd jpeg
> mplayer -vo jpeg /path/to/filename.mov
> for i in *.jpg
> do
> convert $i ../tiff/${i%%.jpg}.tif 2 >/dev/null
> done
> # file ../tiff/*.tif
>

Thanks. Since we are making measurments on the frames, I suspect it
would be better to convert to png (lossless compression) rather than
jpeg, unless the files are stored as jpg, and mplayer simply copies the
frames. Also only need a narrow slice of the picture, but I assume
mplayer cannot do that ( ie crop down to some small slice) while it is
copying out the frames. I can certainly do that with convert, but the
intermediate files are going to far larger than they need to be (slowing
down the conversion time).
(Ie, on the 1080p (1960x1080) frame we really only need a 1960x50 slice of the
frame to do the measurements on.


>

Message has been deleted
Message has been deleted
Message has been deleted

unruh

unread,
Dec 3, 2009, 11:13:03 PM12/3/09
to
On 2009-12-04, spi...@freenet.co.uk <spi...@freenet.co.uk> wrote:
> And verily, didst unruh <un...@wormhole.physics.ubc.ca> hastily babble thusly:

>> Thanks. Since we are making measurments on the frames, I suspect it
>> would be better to convert to png (lossless compression) rather than
>> jpeg, unless the files are stored as jpg, and mplayer simply copies the
>> frames. Also only need a narrow slice of the picture, but I assume
>> mplayer cannot do that ( ie crop down to some small slice) while it is
>> copying out the frames. I can certainly do that with convert, but the
>> intermediate files are going to far larger than they need to be (slowing
>> down the conversion time).
>> (Ie, on the 1080p (1960x1080) frame we really only need a 1960x50 slice of the
>> frame to do the measurements on.
>
> Don't think mplayer can crop, you'd need to use mencoder for that (mplayer's
> sister app), or transcode.

There are the -vf crop options crop=w:h:x:y although I do not know what x
and y represent (middle of the picture of one of the corners. the
"Position of the cropped picture, defaults to center."
but they are a bit obscure.

Message has been deleted

Anita

unread,
Dec 3, 2009, 11:40:59 PM12/3/09
to
"unruh" <un...@wormhole.physics.ubc.ca> wrote in message
news:slrnhhh36m...@wormhole.physics.ubc.ca...

>> It begs the question: precisely what "measuremenst" are required?
>
> Since you asked.
> There is a bright line in the frame which is a laser sheet reflected from
the tops of
> the waves. We need to measure their height very accurately.

And how will you accomplish that sort of "very accurate" measurement using
the method you (very loosely) suggest? Cropping the image, converting image
format et. al. will most assuredly result in various losses of information,
and pixels are not any sort of accurate measurement of anything other than
pixels.


Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
0 new messages