- Timestamp:
- 2010-07-19T14:00:53+12:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gs2-extensions/video/trunk/perllib/plugins/VideoPlugin.pm
r21825 r22432 133 133 134 134 # Generate the keyframes with ffmpeg and hive 135 my ($keyframe_cmd,$okeyframe_filename) = $self->keyframe_cmd($originalfilename || $filename); 135 my $ifilename = $originalfilename || $filename; 136 my ($keyframe_cmd,$okeyframe_filename) = $self->keyframe_cmd($ifilename); 136 137 137 138 my $keyframe_options = { @{$self->{'ffmpeg_monitor'}}, … … 139 140 'message' => "Extracting keyframes" }; 140 141 141 $self->run_cached_general_cmd($keyframe_cmd,$okeyframe_filename,$keyframe_options); 142 $self->run_cached_general_cmd($keyframe_cmd, 143 $ifilename,$okeyframe_filename, 144 $keyframe_options); 142 145 $self->parse_shot_xml(); 143 146 … … 164 167 165 168 166 # Generate the thumbnail with convert, a la ImagePlug 169 # Generate the thumbnail with convert, a la ImagePlugin 167 170 168 171 my $thumbnailfile = &util::filename_cat($output_dir,"$ivideo_root-thumbnail.$thumbnailtype"); 169 170 172 171 173 my $optionally_run_general_cmd = "run_uncached_general_cmd"; … … 176 178 177 179 ### print STDERR "**** creating thumbnail: $thumbnail_width x $thumbnail_height\n"; 178 180 my $ofilename = $self->get_ovideo_filename($self->{'enable_streaming'}); 179 181 my ($thumb_cmd ,$othumb_filename) 180 182 = $self->keyframe_thumbnail_cmd($ofilename,$thumbnailfile,$thumbnail_width,$thumbnail_height); … … 186 188 187 189 my ($thumb_regenerated,$thumb_result,$thumb_had_error) 188 = $self->$optionally_run_general_cmd($thumb_cmd,$ thumbnailfile,$thumb_options);190 = $self->$optionally_run_general_cmd($thumb_cmd,$ofilename,$thumbnailfile,$thumb_options); 189 191 190 192 # Add the thumbnail as an associated file ... … … 209 211 # 2.thumbnail was cached, so imagemagick convert was not run 210 212 # Either way, the solution is the same: 211 # => run "identify $thumbnailfile" and parse result 212 213 $thumb_result = `identify \"$thumbnailfile\"`; 213 # => run "identify $thumbnailfile" and parse result 214 $thumb_result = `identify \"$thumbnailfile\" 2>&1`; 214 215 215 216 if ($thumb_result =~ m/([0-9]+)x([0-9]+)/) { … … 285 286 286 287 my ($screenview_regenerated,$screenview_result,$screenview_had_error) 287 = $self->$optionally_run_general_cmd($screenview_cmd,$screenviewfilename,$screenview_options); 288 = $self->$optionally_run_general_cmd($screenview_cmd, 289 $filename,$screenviewfilename, 290 $screenview_options); 288 291 289 292 … … 341 344 = &VideoConverter::identify($filename, $outhandle, $verbosity); 342 345 346 if ($video_duration =~ m/^(\d\d):(\d\d):(\d\d)\.(\d)$/) { 347 $video_duration = $1*3600 + $2*60 + $3 + ($4/10.0); 348 } 349 343 350 #if ($vfps eq "unknown") { 344 351 #print $outhandle "Unknown framerate, defaulting to 25 frames per second.\n"; … … 350 357 #my $total_dur_secs = $dur_hour*3600 + $dur_min*60 + $dur_sec; 351 358 352 359 my $total_dur_secs = $video_duration / 1000; 353 360 354 361 $self->{'video-fps'} = $vfps; … … 448 455 449 456 ($convertto_regenerated,$convertto_result,$convertto_error) 450 = $self->run_cached_general_cmd($convertto_command,$filename,$convertto_options); 457 = $self->run_cached_general_cmd($convertto_command, 458 $originalfilename,$filename, 459 $convertto_options); 451 460 452 461 $type = $converttotype; … … 580 589 $thumbnail_width,$thumbnail_height); 581 590 } 582 583 591 584 592 if ($self->{'extract_keyframes'}) {
Note:
See TracChangeset
for help on using the changeset viewer.