- Timestamp:
- 2009-12-11T00:16:34+13:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gs2-extensions/gsdl-video/trunk/perllib/plugins/VideoConverter.pm
r20492 r21335 106 106 'deft' => "200k", 107 107 'reqd' => "no" }, 108 { 'name' => "extract keyframes",108 { 'name' => "extract_keyframes", 109 109 'desc' => "{VideoPlugin.extractkeyframes}", 110 110 'type' => "flag", 111 111 'deft' => "0", 112 'reqd' => "no" }, 113 { 'name' => "keep_keyframes", 114 'desc' => "{VideoPlugin.keep_keyframes}", 115 'type' => "string", 116 'deft' => "all", 112 117 'reqd' => "no" }, 113 118 { 'name' => "streamingsize", … … 590 595 my $ivideo_root = $self->{'cached_file_root'}; 591 596 597 ## my $cue_filename = &util::filename_cat($output_dir,"on_cue.xml"); 598 599 my $flvtool_cmd = "flvtool2 -vUP \"$oflash_filename\""; 600 601 return ($flvtool_cmd,$oflash_filename); 602 } 603 604 605 sub streamkeyframes_cmd 606 { 607 my $self = shift (@_); 608 my ($oflash_filename,$doc_obj,$section) = @_; 609 610 my $assocfilepath 611 = $doc_obj->get_metadata_element($section,"assocfilepath"); 612 613 my $output_dir = $self->{'cached_dir'}; 614 592 615 my $cue_filename = &util::filename_cat($output_dir,"on_cue.xml"); 593 594 my $flvtool_cmd = "flvtool2 -v UP\"$oflash_filename\"";616 617 my $flvtool_cmd = "flvtool2 -vAUtP \"$cue_filename\" \"$oflash_filename\""; 595 618 596 619 return ($flvtool_cmd,$oflash_filename); … … 598 621 599 622 600 sub streamkeyframes_cmd 623 sub streamkeyframes_cmd_old 601 624 { 602 625 my $self = shift (@_); … … 633 656 my $cue_filename = &util::filename_cat($output_dir,"on_cue.xml"); 634 657 635 my $video_server = $ENV{'GEXT_VIDEO_SERVER'};636 my $video_prefix = $ENV{'GEXT_VIDEO_PREFIX'};637 638 my $collect = $ENV{'GSDLCOLLECTION'};658 ##my $video_server = $ENV{'GEXT_VIDEO_SERVER'}; 659 ##my $video_prefix = $ENV{'GEXT_VIDEO_PREFIX'}; 660 661 ## my $collect = $ENV{'GSDLCOLLECTION'}; 639 662 640 663 ## my $thumbloc = "$video_server$video_prefix/collect/$collect"; … … 685 708 } 686 709 else { 687 # extract keyframe has either not been switched on, or else had710 # extract_keyframe has either not been switched on, or else had 688 711 # a problem when running 689 712 # => extract a from … … 770 793 my ($self) = shift(@_); 771 794 772 my ($doc_obj,$section) = @_; 773 774 my $output_dir = $self->{'cached_dir'}; 775 my $timeline = $self->{'keyframe_timeline'}; 795 my ($doc_obj,$section,$timeline) = @_; 796 797 my $output_dir = $self->{'cached_dir'}; 776 798 777 799 my $count = 1; … … 786 808 $section); 787 809 $doc_obj->add_utf8_metadata($section,"KeyframeTimestamp",$timestamp); 810 $doc_obj->add_utf8_metadata($section,"KeyframeFrameNum",$t); 788 811 789 812 $count++; 790 813 } 791 814 792 $doc_obj->add_utf8_metadata($section,"NumKeyframes",scalar(@{$self->{'keyframe_fnames'}})); 815 #### $doc_obj->add_utf8_metadata($section,"NumKeyframes",scalar(@{$self->{'keyframe_fnames'}})); 816 817 $doc_obj->add_utf8_metadata($section,"NumKeyframes",scalar(keys %$timeline)); 793 818 794 819 … … 933 958 my $flashheight = $video_height + 22; 934 959 935 if ($self->{'extract keyframes'}) {960 if ($self->{'extract_keyframes'}) { 936 961 $flashheight += 100; 937 962 } … … 1020 1045 my $flashheight = $video_height + 22; 1021 1046 1022 if ($self->{'extract keyframes'}) {1047 if ($self->{'extract_keyframes'}) { 1023 1048 $flashheight += 100; 1024 1049 }
Note:
See TracChangeset
for help on using the changeset viewer.