No 'resolution_x' with .wmv

The place for "I can't figure out how to..." questions.
Post Reply
ricks
User
Posts: 3
Joined: Fri Aug 25, 2006 6:34 am

No 'resolution_x' with .wmv

Post by ricks » Mon Aug 28, 2006 1:54 pm

Hi!

Why does this not work with format ".wmv" (no value shown):

Code: Select all

echo @$ThisFileInfo['video']['resolution_x']; 
No problems with .mpg, .3gp and .mov.

Thanks!

Ricks

James Heinrich
getID3() v1 developer
Posts: 1476
Joined: Fri May 04, 2001 4:00 pm
Are you a spambot?: no
Location: Northern Ontario, Canada
Contact:

Post by James Heinrich » Tue Aug 29, 2006 12:09 am

It's a bug that has already been reported and the fix will be included in v1.7.8.

Code: Select all

//insert at line 1366 of module.audio-video.asf.php (assuming v1.7.7)

// start patch
if (!empty($thisfile_video['streams'])) {
	$thisfile_video['streams']['resolution_x'] = 0;
	$thisfile_video['streams']['resolution_y'] = 0;
	foreach ($thisfile_video['streams'] as $key => $valuearray) {
		if (($valuearray['resolution_x'] > $thisfile_video['streams']['resolution_x']) || ($valuearray['resolution_y'] > $thisfile_video['streams']['resolution_y'])) {
			$thisfile_video['resolution_x'] = $valuearray['resolution_x'];
			$thisfile_video['resolution_y'] = $valuearray['resolution_y'];
		}
	}
}
// end patch

// this is the line that used to be 1366, keep it, just insert patch before it
$ThisFileInfo['bitrate'] = @$thisfile_audio['bitrate'] + @$thisfile_video['bitrate'];

ricks
User
Posts: 3
Joined: Fri Aug 25, 2006 6:34 am

Post by ricks » Tue Aug 29, 2006 7:19 am

Thanks! Now it works!

Ricks

Post Reply