We present preliminary COMPASS results on pion and kaon multiplicities produced in semi inclusive deep inelastic scattering of 160[Formula: see text]GeV muons off an isoscalar ([Formula: see text]LiD) target. The results constitute an impressive data set of more than 400 points in p and 400 in K, covering a large x,Q[Formula: see text] and z domain in a fine binning, which will be used in future QCD fits at next to leading order to extract quark fragmentation functions. We show results of a first leading order fit performed to extract the favored and unfavored quark fragmentation functions into pions D[Formula: see text] and D[Formula: see text].