I want to polygonize a raster file with GDAL. I only want to rasterize cells with a value of 0. Is it possible to specify that within the polygonize function or do I have to modify my raster before hand?
No, it's not possible directly in the function. You can either a) reclassify the raster first (probably fastest and easiest), or 2) convert to vector then delete all non-zero polygons, or 3) create a mask, and pass that to gdal_polygonize using -mask (see manual.)