Changeset 18982


Ignore:
Timestamp:
2009-04-15T17:24:24+12:00 (15 years ago)
Author:
davidb
Message:

Some mods to work with Windows version of ffmpeg

Location:
extensions/gsdl-video/trunk/perllib/plugins
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/gsdl-video/trunk/perllib/plugins/MultimediaConverter.pm

    r18973 r18982  
    9595    my $result = `ffmpeg -h 2>&1`;
    9696
    97     if (!defined $result || $result !~ m/^FFmpeg version/) {
     97    if (!defined $result || $result !~ m/^FFmpeg version/m) {
    9898        $self->{'ffmpeg_installed'} = 0;
    9999        print $outhandle $result;
     
    223223
    224224    my $gsdlhome = $ENV{'GSDLHOME'};
     225    $gsdlhome = &util::filename_to_regex($gsdlhome);
     226
    225227    my $filename_gsdlenv = $filename;
    226228    $filename_gsdlenv =~ s@^$gsdlhome@\$GSDLHOME@;
  • extensions/gsdl-video/trunk/perllib/plugins/TimedHTMLPlugin.pm

    r18897 r18982  
    2828package TimedHTMLPlugin;
    2929
    30 ##use videoconvert;
    31 
    3230use HTMLPlugin;
    3331use VideoConverter;
     
    6866   
    6967    new VideoConverter($pluginlist, $inputargs, $hashArgOptLists);
    70 
     68   
    7169    my $self = (defined $hashArgOptLists)
    7270    ? new HTMLPlugin($pluginlist,$inputargs,$hashArgOptLists)
    7371    : new HTMLPlugin($pluginlist,$inputargs);
    74     
     72 
    7573    my $collect_dir = $ENV{'GSDLCOLLECTDIR'};
    7674
     
    725723### = new videoconvert($base_dir,$src_filename,$verbosity,$outhandle,$exp_duration);
    726724###    $self->{'videoconvert'} = $videoconvert;
     725# ******
     726
     727    $self->init_cache_for_file($src_filename);
    727728
    728729    #---
  • extensions/gsdl-video/trunk/perllib/plugins/VideoConverter.pm

    r18556 r18982  
    192192    $result =~ s/^.*\'$video_safe\'://s;
    193193
    194     if ($result =~ m/Video: (.*?) fps/m) {
     194##    if ($result =~ m/Video: (.*?) fps/m) {
     195    if ($result =~ m/^\s+Stream.*?Video: (.*?)$/m) {
    195196    my $video_info = $1;
    196     if ($video_info =~ m/([^,]+),(?: ([^,]+),)? (\d+)x(\d+),.*?(\d+\.\d+)/)
    197     {
    198         $vtype = $1;
    199         $vcodec = $2 if defined $2;
    200         $width = $3;
    201         $height = $4;
    202         $fps = $5;
     197    $video_info =~ s/\s*\[.*?\]//g;
     198
     199    my @video_fields = split(/,\s*/,$video_info);
     200   
     201    $vtype = shift @video_fields;
     202
     203    if ($video_fields[0] !~ m/(\d+)x(\d+)/) {
     204        $vcodec = shift @video_fields;
    203205    }
     206    my $video_dim = shift @video_fields;
     207
     208    ($width,$height) = ($video_dim =~ m/(\d+)x(\d+)/);
     209
     210#   if ($video_info =~ m/([^,]+),(?: ([^,]+),)? (\d+)x(\d+),.*?(\d+\.\d+)/)
     211#   {
     212#       $vtype = $1;
     213#       $vcodec = $2 if defined $2;
     214#       $width = $3;
     215#       $height = $4;
     216#       $fps = $5;
     217#   }
    204218    }
    205219
     
    493507    my $collect = $ENV{'GSDLCOLLECTION'};
    494508 
     509    print STDERR "**** Warning: need to remove dependency of GEXT_VIDEO_SERVER and _PREFIX\n";
     510
    495511    my $flvtool_cmd = "flvtool2 -vAUtP \"$cue_filename\" -thumbLocation:$video_server$video_prefix/collect/$collect/index/assoc/$assocfilepath \"$oflash_filename\"";
    496512
Note: See TracChangeset for help on using the changeset viewer.