Changeset 21825 for gs2-extensions
- Timestamp:
- 2010-03-26T12:34:09+13:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gs2-extensions/video/trunk/perllib/plugins/VideoPlugin.pm
r21335 r21825 176 176 177 177 ### print STDERR "**** creating thumbnail: $thumbnail_width x $thumbnail_height\n"; 178 178 my $ofilename = $self->get_ovideo_filename($self->{'enable_streaming'}); 179 179 my ($thumb_cmd ,$othumb_filename) 180 = $self->keyframe_thumbnail_cmd($ filename,$thumbnailfile,$thumbnail_width,$thumbnail_height);180 = $self->keyframe_thumbnail_cmd($ofilename,$thumbnailfile,$thumbnail_width,$thumbnail_height); 181 181 182 182 my $thumb_options = { 'verbosity' => $verbosity, … … 337 337 } 338 338 339 my ($video_type, $video_width, $video_height, $video_duration, $ video_size,340 $vcodec,$v fps,$atype,$afreq,$achan,$arate)339 my ($video_type, $video_width, $video_height, $video_duration, $durationDisplay, $video_size, 340 $vcodec,$vrate,$vfps,$atype,$afreq,$achan,$arate) 341 341 = &VideoConverter::identify($filename, $outhandle, $verbosity); 342 342 343 if ($vfps eq "unknown") { 344 print $outhandle "Unknown framerate, defaulting to 25 frames per second.\n"; 345 $vfps = 25; 346 } 347 348 my ($dur_hour,$dur_min,$dur_sec) 349 = ($video_duration =~ m/(\d+):(\d+):(\d+\.\d+)/); 350 my $total_dur_secs = $dur_hour*3600 + $dur_min*60 + $dur_sec; 343 #if ($vfps eq "unknown") { 344 #print $outhandle "Unknown framerate, defaulting to 25 frames per second.\n"; 345 #$vfps = 25; 346 #} 347 348 #my ($dur_hour,$dur_min,$dur_sec) 349 #= ($video_duration =~ m/(\d+):(\d+):(\d+\.\d+)/); 350 #my $total_dur_secs = $dur_hour*3600 + $dur_min*60 + $dur_sec; 351 352 my $total_dur_secs = $video_duration / 1000; 351 353 352 354 $self->{'video-fps'} = $vfps; … … 519 521 $doc_obj->add_metadata ($section, "srcicon", "[VideoType]"); 520 522 523 521 524 # Add the original file as an associated file 522 # $doc_obj->associate_file($filename,$file,"video/$type",$section); 525 if ($self->{'keep_original_video'} eq "true") { 526 $doc_obj->associate_file($filename,$file,"video/$type",$section); 527 } 523 528 524 529 525 530 if ($self->{'extract_keyframes'}) { 526 $self->extract_keyframes($doc_obj,$originalfilename,$filename);531 $self->extract_keyframes($doc_obj,$originalfilename,$filename); 527 532 } 528 533 529 534 my $streamable_regenerated = 0; 530 531 if ($self->{'enable_flv_streaming'} && !$self->{'enable_mp4_streaming'}) { 535 536 # Create a VP6+MP3 streaming ready video file with FFMpeg 537 if ($self->{'enable_streaming'} eq "flv") { 532 538 $streamable_regenerated 533 539 = $self->enable_full_streaming($doc_obj, … … 537 543 } 538 544 539 # Create an H264+ACC video file with Handbrake540 if ($self->{'enable_mp4_streaming'}) {545 # Create an H264+ACC streaming ready video file with Handbrake 546 if ($self->{'enable_streaming'} eq "mp4") { 541 547 $streamable_regenerated 542 548 = $self->enable_h264_streaming($doc_obj,
Note:
See TracChangeset
for help on using the changeset viewer.