Changeset 18897 for extensions/gsdl-video
- Timestamp:
- 2009-04-06T13:32:10+12:00 (15 years ago)
- Location:
- extensions/gsdl-video/trunk/perllib/plugins
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/gsdl-video/trunk/perllib/plugins/MultimediaPlugin.pm
r18556 r18897 97 97 my $result = `ffmpeg -h 2>&1`; 98 98 99 100 99 if (!defined $result || $result !~ m/^FFmpeg version/) { 101 100 $self->{'ffmpeg_installed'} = 0; 102 print STDERR $result; 101 if (defined $result) { 102 print STDERR $result; 103 } 104 else { 105 print STDERR "Unable to find ffmpeg\n"; 106 } 103 107 } 104 108 else { -
extensions/gsdl-video/trunk/perllib/plugins/TimedHTMLPlugin.pm
r18425 r18897 28 28 package TimedHTMLPlugin; 29 29 30 use videoconvert;30 ##use videoconvert; 31 31 32 32 use HTMLPlugin; 33 use VideoConverter; 33 34 34 35 sub BEGIN { 35 @TimedHTMLPlugin::ISA = ('HTMLPlugin'); 36 } 36 @TimedHTMLPlugin::ISA = ('HTMLPlugin', 'VideoConverter'); 37 } 38 37 39 38 40 use strict; # every perl program should have this! … … 65 67 if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)}; 66 68 69 new VideoConverter($pluginlist, $inputargs, $hashArgOptLists); 67 70 68 71 my $self = (defined $hashArgOptLists) … … 80 83 return bless $self, $class; 81 84 } 85 86 sub begin { 87 my $self = shift (@_); 88 my ($pluginfo, $base_dir, $processor, $maxdocs) = @_; 89 90 $self->SUPER::begin(@_); 91 $self->VideoConverter::begin(@_); 92 } 93 94 95 sub init { 96 my $self = shift (@_); 97 my ($verbosity, $outhandle, $failhandle) = @_; 98 99 $self->SUPER::init(@_); 100 $self->VideoConverter::init(@_); 101 } 102 82 103 83 104 sub html_to_text … … 200 221 my $time_num = scalar(@{$self->{'time_seq'}}); 201 222 202 my $videoconvert = $self->{'videoconvert'};223 #### my $videoconvert = $self->{'videoconvert'}; 203 224 204 225 # excerpt from tim_pos -> time_pos + 2; … … 343 364 344 365 my ($ae_cmd,$omp3_filename,$omp3_file) 345 = $ videoconvert->audio_excerpt_cmd($src_filename,346 347 348 my $ae_options = { @{$ videoconvert->{'ffmpeg_monitor'}},366 = $self->audio_excerpt_cmd($src_filename, 367 $hh,$mm,$ss,$excerpt_len); 368 369 my $ae_options = { @{$self->{'ffmpeg_monitor'}}, 349 370 'message_prefix' => "Audio Excerpt", 350 371 'message' => "Generating audio excerpt: $omp3_file" }; 351 372 352 373 my ($ae_regenerated,$ae_result,$ae_had_error) 353 = $ videoconvert->run_cached_general_cmd($ae_cmd,$omp3_filename,$ae_options);374 = $self->run_cached_general_cmd($ae_cmd,$omp3_filename,$ae_options); 354 375 355 376 push(@{$self->{'mp3_excerpts'}}, { 'omp3_file' => $omp3_file, 'omp3_filename' => $omp3_filename} ); … … 591 612 $self->{'media_base_dir'} = $media_base_dir; 592 613 593 $self->{'vob_duration_info'} = & videoconvert::vob_durations($media_base_dir,"1",$self->{'outhandle'});614 $self->{'vob_duration_info'} = &VideoConverter::vob_durations($media_base_dir,"1",$self->{'outhandle'}); 594 615 595 616 ## $self->hyperlink_timing_info($textref); … … 653 674 my ($video_type, $video_width, $video_height, $video_duration, $video_size, 654 675 $vcodec,$vfps,$atype,$afreq,$achan,$arate) 655 = & videoconvert::identify($src_filename, $outhandle, $verbosity);676 = &VideoConverter::identify($src_filename, $outhandle, $verbosity); 656 677 657 678 if ($vfps eq "unknown") { … … 701 722 702 723 703 my $videoconvert704 = new videoconvert($base_dir,$src_filename,$verbosity,$outhandle,$exp_duration);705 $self->{'videoconvert'} = $videoconvert;724 ### my $videoconvert 725 ### = new videoconvert($base_dir,$src_filename,$verbosity,$outhandle,$exp_duration); 726 ### $self->{'videoconvert'} = $videoconvert; 706 727 707 728 #--- … … 718 739 #--- 719 740 my ($stream_cmd,$oflash_filename,$oflash_file) 720 = $ videoconvert->stream_cmd($src_filename,721 722 723 724 725 my $streamable_options = { @{$ videoconvert->{'ffmpeg_monitor'}},741 = $self->stream_cmd($src_filename, 742 $video_width,$video_height, 743 $streaming_quality, $streaming_bitrate, $streaming_size, 744 $streaming_achan, $streaming_arate); 745 746 my $streamable_options = { @{$self->{'ffmpeg_monitor'}}, 726 747 'message_prefix' => "Stream", 727 748 'message' => "Generating streamable video: $oflash_file" }; 728 749 729 750 my ($streamable_regenerated,$streamable_result,$streamable_had_error) 730 = $ videoconvert->run_cached_general_cmd($stream_cmd,$oflash_filename,$streamable_options);751 = $self->run_cached_general_cmd($stream_cmd,$oflash_filename,$streamable_options); 731 752 732 753 $self->{'streamable_regenerated'} = $streamable_regenerated; … … 736 757 # Make video seekable 737 758 #--- 738 my ($streamseekable_cmd,$ostreamseekable_filename) = $ videoconvert->streamseekable_cmd($oflash_filename);759 my ($streamseekable_cmd,$ostreamseekable_filename) = $self->streamseekable_cmd($oflash_filename); 739 760 740 my $streamseekable_options = { @{$ videoconvert->{'flvtool2_monitor'}},761 my $streamseekable_options = { @{$self->{'flvtool2_monitor'}}, 741 762 'message_prefix' => "Stream Seekable", 742 763 'message' => "Reprocessing video stream to be seekable by timeline: $oflash_file" }; 743 764 744 765 if ($streamable_regenerated) { 745 $ videoconvert->run_general_cmd($streamseekable_cmd,$streamseekable_options);766 $self->run_general_cmd($streamseekable_cmd,$streamseekable_options); 746 767 } 747 768 … … 783 804 784 805 # open file 785 my $output_dir = $self->{' videoconvert'}->{'cached_dir'};806 my $output_dir = $self->{'cached_dir'}; 786 807 my $cue_filename = &util::filename_cat($output_dir,"on_cue.xml"); 787 808 … … 867 888 close(CUEOUT); 868 889 869 my $videoconvert = $self->{'videoconvert'};890 #### my $videoconvert = $self->{'videoconvert'}; 870 891 my $oflash_filename = $self->{'oflash_filename'}; 871 892 my $oflash_file = $self->{'oflash_file'}; 872 893 873 my ($streamcuepts_cmd,$ostreamcuepts_filename) = $ videoconvert->streamcuepts_cmd($oflash_filename);894 my ($streamcuepts_cmd,$ostreamcuepts_filename) = $self->streamcuepts_cmd($oflash_filename); 874 895 875 896 my $verbosity = $self->{'verbosity'}; 876 897 my $outhandle = $self->{'outhandle'}; 877 898 878 my $streamcuepts_options = { @{$ videoconvert->{'flvtool2_monitor'}},899 my $streamcuepts_options = { @{$self->{'flvtool2_monitor'}}, 879 900 'message_prefix' => "Stream Cue Points", 880 901 'message' => "Reprocessing video stream to add cuepoints on timeline: $oflash_file" }; … … 883 904 884 905 if ($streamable_regenerated) { 885 $ videoconvert->run_general_cmd($streamcuepts_cmd,$streamcuepts_options);906 $self->run_general_cmd($streamcuepts_cmd,$streamcuepts_options); 886 907 } 887 908
Note:
See TracChangeset
for help on using the changeset viewer.