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

Some mods to work with Windows version of ffmpeg

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.