OSX Mavericks Convert MOV to JPG?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
efaden
Posts: 8
Joined: 2013-10-28T17:14:53-07:00
Authentication code: 6789

OSX Mavericks Convert MOV to JPG?

Post by efaden »

Hey,

Can anyone provide me with some guidance. I installed ImageMagick via Macports on OSX 10.9 (Mavericks). I was able to convert JPGs, AVIs, etc... but each time I try to convert a MOV file from my Canon T4i to a single JPG it fails with a delegate error. The delegate it is using is "avconv". I am trying to just get a single frame out of the movies so I can make an HTML file with a table of images to quickly look through. Any help? Thanks

-Eric
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: OSX Mavericks Convert MOV to JPG?

Post by fmw42 »

What version of IM. What is your exact command?
efaden
Posts: 8
Joined: 2013-10-28T17:14:53-07:00
Authentication code: 6789

Re: OSX Mavericks Convert MOV to JPG?

Post by efaden »

fmw42 wrote:What version of IM. What is your exact command?
Version: 6.8.7-3

The command I am running is -
convert -geometry 300x300 -quality 35 001.mov[1] tn/001.jpg

Thanks.

-Eric
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: OSX Mavericks Convert MOV to JPG?

Post by fmw42 »

-geometry is just a setting and will not generally resize the image by itself.

try

convert 001.mov[1] -resize 300x300 -quality 35 tn/001.jpg

what happens with

convert 001.mov[1] test1.jpg

How large is your .mov file? Can you post it to somewhere like dropbox and put a link to it here so others can test with it?
efaden
Posts: 8
Joined: 2013-10-28T17:14:53-07:00
Authentication code: 6789

Re: OSX Mavericks Convert MOV to JPG?

Post by efaden »

This is what I got when I try just a plain convert...

# convert 001.MOV[1] 001.jpg
convert: delegate failed `"avconv" -v -1 -i "%i" -vframes %S -vcodec pam -an -f rawvideo -y "%u.pam" 2> "%Z"' @ error/delegate.c/InvokeDelegate/1065.
convert: unable to open image `/var/tmp/magick-328707U_TfBf5V6EC.pam': No such file or directory @ error/blob.c/OpenBlob/2643.
convert: no images defined `001.jpg' @ error/convert.c/ConvertImageCommand/3145.


I took a little test video with the camera and uploaded it to dropbox. See: https://www.dropbox.com/s/kihhj5tvpqpgky7/001.MOV

Thanks.
-Eric
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: OSX Mavericks Convert MOV to JPG?

Post by fmw42 »

This worked just fine for me on IM 6.8.7.3 Q16 Mac OSX Snow Leopard

convert 001.MOV[1] 001.jpg

Here are my delegates:


convert -version
Version: ImageMagick 6.8.7-3 2013-10-25 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2013 ImageMagick Studio LLC
Features: DPC
Delegates: bzlib fftw fontconfig freetype gslib jbig jng jp2 jpeg lcms lqr ltdl lzma openexr png ps png tiff x xml zlib


I believe I also have ffmpeg installed, though I am not sure that is being used for the .mov.

I do not have nor know about avconv. Perhaps your delegates.xml file needs editing for that delegate.
efaden
Posts: 8
Joined: 2013-10-28T17:14:53-07:00
Authentication code: 6789

Re: OSX Mavericks Convert MOV to JPG?

Post by efaden »

Interesting... mine is...

convert -version
Version: ImageMagick 6.8.7-3 2013-10-29 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2013 ImageMagick Studio LLC
Features: DPC
Delegates: bzlib djvu fftw fontconfig freetype gslib jng jpeg lcms ltdl lzma png ps png tiff webp x xml zlib
efaden
Posts: 8
Joined: 2013-10-28T17:14:53-07:00
Authentication code: 6789

Re: OSX Mavericks Convert MOV to JPG?

Post by efaden »

Is "avconv" supposed to be a program? It is listed as the delegate in delegates.xml, but there is no binary avconv... I do have avconvert though.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: OSX Mavericks Convert MOV to JPG?

Post by fmw42 »

Did you try your avconv command stand alone

Does that even work.

Perhaps you need to edit your delegates.xml file, if it works standalone. If not try installing ffmpeg and see if that works.
efaden
Posts: 8
Joined: 2013-10-28T17:14:53-07:00
Authentication code: 6789

Re: OSX Mavericks Convert MOV to JPG?

Post by efaden »

avconv
-bash: avconv: command not found

avconvert
avconvert -p <preset> -s <source> -o <output> [<optional track specifications>]

For a more complete help reference use: avconvert --help (or -h)


ffmpeg is installed...
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: OSX Mavericks Convert MOV to JPG?

Post by fmw42 »

efaden wrote:Is "avconv" supposed to be a program? It is listed as the delegate in delegates.xml, but there is no binary avconv... I do have avconvert though.

How is it listed in delegates.xml?

I really do not know much about avconv or avconvert! Sorry.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: OSX Mavericks Convert MOV to JPG?

Post by fmw42 »

My delegates.xml file lists ffmpeg only for mpeg, and there is no entry for MOV, but .mov files still get converted.
efaden
Posts: 8
Joined: 2013-10-28T17:14:53-07:00
Authentication code: 6789

Re: OSX Mavericks Convert MOV to JPG?

Post by efaden »

Interesting... how does yours list ffmpeg?... Mine doesn't have ffmpeg, only avconv. Whats weird is that avconv doesn't seem to exist on my system?...

It is listed like this in delegates.xml

Code: Select all

<delegate decode="mpeg:decode" command=""avconv" -v -1 -i "%i" -vframes %S -vcodec pam -an -f rawvideo -y "%u.pam" 2> "%Z""/>
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: OSX Mavericks Convert MOV to JPG?

Post by fmw42 »

Code: Select all

  <delegate decode="mpeg:decode" command=""ffmpeg" -v -1 -i "%i" -vframes %S -vcodec pam -an -f rawvideo -y "%u.pam" 2> "%Z""/>
I do have ffmpeg installed, though it is odd that it does not show up in the list of delegates via convert -version or convert -list configure.

I install all my delegates using MacPorts, but install IM from source. See viewtopic.php?f=1&t=21502&p=88202&hilit ... rts#p88202

find /opt | grep "ffmpeg"

/opt/local/bin/ffmpeg
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: OSX Mavericks Convert MOV to JPG?

Post by fmw42 »

try editing your delegates.xml to use avconvert. Just a stab and see if that works.

<delegate decode="mpeg:decode" command=""avconvert" -v -1 -i "%i" -vframes %S -vcodec pam -an -f rawvideo -y "%u.pam" 2> "%Z""/>
Post Reply