@@ -2064,22 +2064,22 @@ def save_montage(self, filename, order=['lat', 'ven', 'med'],
2064
2064
cb .visible = colorbars_visibility [cb ]
2065
2065
return out
2066
2066
2067
- def save_movie (self , dst , tstart = None , tstop = None , step = None ,
2067
+ def save_movie (self , fname , tstart = None , tstop = None , step = 1 ,
2068
2068
time_idx = None , montage = 'current' , orientation = 'h' ,
2069
2069
border_size = 15 , colorbar = 'auto' , framerate = 10 ,
2070
- codec = 'mpeg4' , row = - 1 , col = - 1 , movie_tool = 'ffmpeg' ):
2070
+ codec = 'mpeg4' , row = - 1 , col = - 1 ):
2071
2071
"""Save a movie (for data with a time axis)
2072
2072
2073
2073
Parameters
2074
2074
----------
2075
- dst : str
2076
- Path at which to sae the movie.
2075
+ fname : str
2076
+ Path at which to save the movie.
2077
2077
tstart : None | float
2078
2078
First time point to include (default: all data).
2079
2079
tstop : None | float
2080
2080
Time point at which to stop the movie (exclusive; default: all
2081
2081
data).
2082
- step : None | int
2082
+ step : int
2083
2083
Number of data frames to step forward between movie frames
2084
2084
(default 1).
2085
2085
time_idx : None | array
@@ -2100,27 +2100,20 @@ def save_movie(self, dst, tstart=None, tstop=None, step=None,
2100
2100
if None no colorbar is visible. If 'auto' is given the colorbar
2101
2101
is only shown in the middle view. Otherwise on the listed
2102
2102
views when a list of int is passed.
2103
- framerate : int
2103
+ framerate : float
2104
2104
Framerate of the movie (frames per second).
2105
2105
codec : str
2106
2106
Codec to use (default 'mpeg4').
2107
2107
row : int
2108
2108
row index of the brain to use
2109
2109
col : int
2110
2110
column index of the brain to use
2111
- movie_tool : 'ffmpeg'
2112
- Tool to use to convert image sequence into a movie (default:
2113
- 'ffmpeg').
2114
2111
"""
2115
- if movie_tool .lower () == 'ffmpeg' :
2116
- if not has_ffmpeg ():
2117
- err = ("FFmpeg is not in the path and is needed for saving "
2118
- "movies. Install FFmpeg and try again. It can be "
2119
- "downlaoded from http://ffmpeg.org/download.html." )
2120
- raise RuntimeError (err )
2121
- else :
2122
- err = "Currently the only possible movie tool is FFmpeg"
2123
- raise ValueError (err )
2112
+ if not has_ffmpeg ():
2113
+ err = ("FFmpeg is needed for saving movies and was not found in "
2114
+ "the path. Install FFmpeg and try again. It can be "
2115
+ "downlaoded from http://ffmpeg.org/download.html." )
2116
+ raise RuntimeError (err )
2124
2117
2125
2118
if tstart is not None :
2126
2119
start = self .index_for_time (tstart , rounding = 'up' )
@@ -2152,7 +2145,7 @@ def save_movie(self, dst, tstart=None, tstop=None, step=None,
2152
2145
self .save_image_sequence (time_idx , fname_pattern , False , row ,
2153
2146
col , montage , orientation , border_size ,
2154
2147
colorbar )
2155
- ffmpeg (dst , fname_pattern , framerate , codec )
2148
+ ffmpeg (fname , fname_pattern , framerate , codec )
2156
2149
2157
2150
def animate (self , views , n_steps = 180. , fname = None , use_cache = False ,
2158
2151
row = - 1 , col = - 1 ):
0 commit comments