To add to the previous email I've tried this with a few different  
backends with no luck. Have similar issues been found when creating  
videos with mencoder? If the final result is the same switching away  
from ffmpeg is fine.

Quoting Colin McAuliffe <cjm2...@columbia.edu>:

> The default backend is macosx but using it leads to the error I mentioned:
>
> Traceback (most recent call last):
>   File "./fftest.py", line 24, in <module>
>     ani.save('animation.avi')
>   File "/Library/Python/2.6/site-packages/matplotlib/animation.py",
> line 615, in save
>     writer.grab_frame()
>   File "/Library/Python/2.6/site-packages/matplotlib/animation.py",
> line 199, in grab_frame
>     dpi=self.dpi)
>   File "/Library/Python/2.6/site-packages/matplotlib/figure.py", line
> 1370, in savefig
>     self.canvas.print_figure(*args, **kwargs)
>   File "/Library/Python/2.6/site-packages/matplotlib/backend_bases.py",
> line 2015, in print_figure
>     print_method = self._get_print_method(format)
>   File "/Library/Python/2.6/site-packages/matplotlib/backend_bases.py",
> line 1956, in _get_print_method
>     '%s.' % (format, ', '.join(formats)))
> ValueError: Format "rgba" is not supported.
> Supported formats: bmp, emf, eps, gif, jpeg, jpg, pdf, pgf, png, ps,
> raw, rgba, svg, svgz, tif, tiff.
>
> The above error does not occur if I switch to agg.
>
> Also using the ffmpeg command
>
> ffmpeg -f image2 -i t%d.jpg video.avi
>
> on a few images gives the following output, where I put !! next to the
> lines which are suppressed by including -loglevel quiet
>
> FFmpeg version SVN-r26402, Copyright (c) 2000-2011 the FFmpeg developers
>   built on May  2 2013 23:13:41 with llvm_gcc 4.2.1 (Based on Apple
> Inc. build 5658) (LLVM build 2336.9.00)
>   configuration: --enable-libmp3lame --enable-shared --disable-mmx
> --arch=x86_64
>   libavutil     50.36. 0 / 50.36. 0
>   libavcore      0.16. 1 /  0.16. 1
>   libavcodec    52.108. 0 / 52.108. 0
>   libavformat   52.93. 0 / 52.93. 0
>   libavdevice   52. 2. 3 / 52. 2. 3
>   libavfilter    1.74. 0 /  1.74. 0
>   libswscale     0.12. 0 /  0.12. 0
> Input #0, image2, from 't%d.jpg':
>   Duration: 00:00:00.12, start: 0.000000, bitrate: N/A
>     Stream #0.0: Video: mjpeg, yuvj422p, 4272x2848, 25 tbr, 25 tbn, 25 tbc
> File 'video.avi' already exists. Overwrite ? [y/N] y
> !![buffer @ 0x7fff094014b0] w:4272 h:2848 pixfmt:yuvj422p
> !![ffsink @ 0x7fff094016d0] auto-inserting filter 'auto-inserted scaler
> 0' between the filter 'src' and the filter 'out'
> !![scale @ 0x7fff094018f0] w:4272 h:2848 fmt:yuvj422p -> w:4272 h:2848
> fmt:yuv420p flags:0x4
> !!Output #0, avi, to 'video.avi':
> !!  Metadata:
> !!    ISFT            : Lavf52.93.0
> !!    Stream #0.0: Video: mpeg4, yuv420p, 4272x2848, q=2-31, 200 kb/s,
> 25 tbn, 25 tbc
> Stream mapping:
>   Stream #0.0 -> #0.0
> Press [q] to stop encoding
> frame=    3 fps=  2 q=4.0 Lsize=     524kB time=0.12 bitrate=35781.7kbits/s
> video:519kB audio:0kB global headers:0kB muxing overhead 1.083673%
>
> Quoting Tony Yu <tsy...@gmail.com>:
>
>> On Mon, May 6, 2013 at 7:09 AM, Colin McAuliffe <cjm2...@columbia.edu>wrote:
>>
>>> Hi Tony, thanks for the reply.
>>>
>>> I was using 1.2.0 and just upgraded to 1.2.1 but the problem persists. I
>>> ran the example code from the link and it hangs after 350-400 frames. Also,
>>> I got an error when running the code as it is posted and had to add:
>>>
>>> import matplotlib
>>> matplotlib.use("Agg")
>>>
>>> to get it to work. Is this an incorrect setting I'm using?
>>>
>>> Colin
>>
>>
>> Hmm, that's strange: Your problem sounds too similar to be a different bug.
>> Could you copy the error message you got? It might be a clue. Also, what
>> backend are you running?
>>
>>>>> import matplotlib.pyplot as plt
>>>>> print plt.rcParams['backend']
>>
>> Another possibility (longshot) is that your version of `ffmpeg` may not
>> respect the `-loglevel quiet` flag being passed to suppress output. Maybe
>> you could try running an `ffmpeg` command with and without that flag to see
>> if it works.
>>
>> -Tony
>>
>
>
>
> -- 
> Colin McAuliffe
> PhD Candidate
> Columbia University
> Department of Civil Engineering and Engineering Mechanics



-- 
Colin McAuliffe
PhD Candidate
Columbia University
Department of Civil Engineering and Engineering Mechanics

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to