[Libav-user] MPEG2 decoding pixelation problem (but not in ffplay)
michael.goffioul at gmail.com
Sun Jun 4 06:12:33 EEST 2017
I'm trying to use ffmpeg to decode a MPEG2 stream and I'm running into
pixelation problem with some streams (not all of them). The fact is that
the problematic streams play fine in ffplay (or vlc), so I figured the
problem must be in the way I setup the decoder or feed data to it.
I've written a very simple code to illustrate the problem I'm having, it's
It doesn't do anything fancy: just initialize the mpeg2video codec, feed
the data (segmented on the picture start code boundary), drain frames,
convert to RGB and save as PNG. It accepts 2 arguments: the elementary
MPEG2 stream filename and the number of frames to extract.
I'm using this sample clip as test case, it's the elementary video stream
extracted from a MPEG/TS clip (next link):
The pixelation problem is illustrated in this extracted frame:
By comparison, playing the sample clip (elementary stream) with ffplay
Clearly I must be doing something wrong. Does anybody have a hint or
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libav-user