[FFmpeg-user] unable to convert png to movie, error: Invalid PNG signature ,

Reindl Harald h.reindl at thelounge.net
Tue Dec 6 12:24:54 EET 2016



Am 06.12.2016 um 11:07 schrieb Puneet Singh:

> [libx264 @ 0x2248380] *width not divisible by 2* (481x480)

481:480 is the problem

hence when we calcultae values for padding in our php wrapper code 
pieces like below, you won't see that 1 pixel and it don't fail

      $diff = round($h_target - ($w_target / $vh_source));
      if(fmod($diff, 2) <> 0)
      {
       $diff = $diff + 1;
      }
      $diff_single = $diff / 2;
      if(fmod($diff_single, 2) <> 0)
      {
       $diff_single = $diff_single + 1;
      }
      $this->pad_top = $diff_single;


More information about the ffmpeg-user mailing list