<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 46: getFrameHeight mismatch after call to getVideoCodec</title><link href="https://sourceforge.net/p/ffmpeg-php/bugs/46/" rel="alternate"/><link href="https://sourceforge.net/p/ffmpeg-php/bugs/46/feed.atom" rel="self"/><id>https://sourceforge.net/p/ffmpeg-php/bugs/46/</id><updated>2011-01-05T17:13:39Z</updated><subtitle>Recent changes to 46: getFrameHeight mismatch after call to getVideoCodec</subtitle><entry><title>getFrameHeight mismatch after call to getVideoCodec</title><link href="https://sourceforge.net/p/ffmpeg-php/bugs/46/" rel="alternate"/><published>2011-01-05T17:13:39Z</published><updated>2011-01-05T17:13:39Z</updated><author><name>Elan Ruusamäe</name><uri>https://sourceforge.net/u/ahmake/</uri></author><id>https://sourceforge.net704b0ab78f45f346f91ab03315b4e89f1fd9f5a0</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;i've encountered weird behavour with vp6f encoded video.&lt;/p&gt;
&lt;p&gt;consider such test file:&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
$file = $argv[1];&lt;br /&gt;
$movie = new ffmpeg_movie($file);&lt;br /&gt;
printf("%s: %dx%d\n", $file, $movie-&amp;gt;getFrameWidth(), $movie-&amp;gt;getFrameHeight());&lt;br /&gt;
$movie-&amp;gt;getVideoCodec(); &lt;br /&gt;
printf("%s: %dx%d\n", $file, $movie-&amp;gt;getFrameWidth(), $movie-&amp;gt;getFrameHeight());&lt;br /&gt;
?&amp;gt;&lt;/p&gt;
&lt;p&gt;$ php getFrameHeight-bug.php gW4LflrS.flv&lt;br /&gt;
[flv @ 0xcc5660]Estimating duration from bitrate, this may be inaccurate&lt;br /&gt;
gW4LflrS.flv: 544x306&lt;br /&gt;
gW4LflrS.flv: 544x320&lt;/p&gt;
&lt;p&gt;so, after getVideoCodec has been called, the height is reported 320 instead of 306&lt;/p&gt;
&lt;p&gt;actual size is 544x306, reported by ffmpeg -i:&lt;br /&gt;
$ ffmpeg -i gW4LflrS.flv&lt;br /&gt;
FFmpeg version 0.6.1, Copyright (c) 2000-2010 the FFmpeg developers&lt;br /&gt;
...&lt;br /&gt;
[flv @ 0x649ec0]Estimating duration from bitrate, this may be inaccurate&lt;br /&gt;
...&lt;br /&gt;
Seems stream 0 codec frame rate differs from container frame rate: 1000.00 (1000/1) -&amp;gt; 25.00 (25/1)&lt;br /&gt;
Input #0, flv, from 'gW4LflrS.flv':&lt;br /&gt;
Metadata:&lt;br /&gt;
duration        : 148&lt;br /&gt;
width           : 544&lt;br /&gt;
height          : 306&lt;br /&gt;
videodatarate   : 1200&lt;br /&gt;
canSeekToEnd    : true&lt;br /&gt;
videocodecid    : 4&lt;br /&gt;
audiodatarate   : 160&lt;br /&gt;
audiocodecid    : 2&lt;br /&gt;
framerate       : 25&lt;br /&gt;
creationdate    : Wed Oct 07 17:08:39 2009 &lt;br /&gt;
Duration: 00:02:27.56, start: 0.000000, bitrate: 1388 kb/s&lt;br /&gt;
Stream #0.0: Video: vp6f, yuv420p, 544x306, 1228 kb/s, 25 tbr, 1k tbn, 1k tbc&lt;br /&gt;
Stream #0.1: Audio: mp3, 44100 Hz, 2 channels, s16, 160 kb/s&lt;br /&gt;
At least one output file must be specified&lt;br /&gt;
....&lt;/p&gt;
&lt;p&gt;i've tested with various ffmpeg versions and found all reporting the same behaviour&lt;br /&gt;
ffmpeg-0.4.9 (segfaults)&lt;br /&gt;
ffmpeg-0.5.2&lt;br /&gt;
ffmpeg-0.6.0&lt;/p&gt;
&lt;p&gt;php-ffmpeg-0.6.0, php-ffmpeg trunk (svn r677)&lt;/p&gt;
&lt;p&gt;you can grab the video from here:&lt;br /&gt;
&lt;a href="http://ytv.delfi.ee/v/gW4LflrS.flv" rel="nofollow"&gt;http://ytv.delfi.ee/v/gW4LflrS.flv&lt;/a&gt;&lt;br /&gt;
or if above fails (is mp4), then i saved copy &lt;br /&gt;
here: &lt;a href="http://glen.alkohol.ee/pld/gW4LflrS.flv" rel="nofollow"&gt;http://glen.alkohol.ee/pld/gW4LflrS.flv&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>