Changeset 22363
- Timestamp:
- 2010-07-07T13:56:37+12:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugins/MediainfoOGVPlugin.pm
r22362 r22363 144 144 145 145 # execute the mediainfo command and store the output of execution in $videodata 146 my $video_metadata = `$command`; 146 # my $video_metadata = `$command`; # backticks operator way 147 # Another way to execute the command: better experience with this than 148 with backticks operator above: 149 # use open() to read the output of executing the command (which is 150 piped through to a handle using the | operator) 151 my $video_metadata; 152 if (open(VMIN,"$command|")) { 153 my $line; 154 155 # we read a line of output at a time 156 while (defined ($line=<VMIN>)) { 157 #print STDERR "***** line = $line\n"; 158 159 $video_metadata .= $line; 160 } 161 162 close(VMIN); 163 } 164 147 165 print $outhandle "$video_metadata\n" if ($verbosity > 2); 148 166
Note:
See TracChangeset
for help on using the changeset viewer.