Page 1 of 2

OSX Mavericks Convert MOV to JPG?

Posted: 2013-10-28T17:17:41-07:00
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

Re: OSX Mavericks Convert MOV to JPG?

Posted: 2013-10-28T18:40:56-07:00
by fmw42
What version of IM. What is your exact command?

Re: OSX Mavericks Convert MOV to JPG?

Posted: 2013-10-29T03:43:48-07:00
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

Re: OSX Mavericks Convert MOV to JPG?

Posted: 2013-10-29T10:09:42-07:00
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?

Re: OSX Mavericks Convert MOV to JPG?

Posted: 2013-10-29T13:33:21-07:00
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

Re: OSX Mavericks Convert MOV to JPG?

Posted: 2013-10-29T13:46:16-07:00
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.

Re: OSX Mavericks Convert MOV to JPG?

Posted: 2013-10-29T13:47:58-07:00
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

Re: OSX Mavericks Convert MOV to JPG?

Posted: 2013-10-29T13:49:42-07:00
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.

Re: OSX Mavericks Convert MOV to JPG?

Posted: 2013-10-29T13:51:05-07:00
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.

Re: OSX Mavericks Convert MOV to JPG?

Posted: 2013-10-29T13:52:02-07:00
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...

Re: OSX Mavericks Convert MOV to JPG?

Posted: 2013-10-29T13:52:08-07:00
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.

Re: OSX Mavericks Convert MOV to JPG?

Posted: 2013-10-29T13:53:45-07:00
by fmw42
My delegates.xml file lists ffmpeg only for mpeg, and there is no entry for MOV, but .mov files still get converted.

Re: OSX Mavericks Convert MOV to JPG?

Posted: 2013-10-29T13:57:19-07:00
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""/>

Re: OSX Mavericks Convert MOV to JPG?

Posted: 2013-10-29T14:00:58-07:00
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

Re: OSX Mavericks Convert MOV to JPG?

Posted: 2013-10-29T14:03:35-07:00
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""/>