directshow - Why do I get these artifacts when using Microsoft MPEG-TS Demultiplexer and H.264 decoder on a H.264 MPEG-TS stream? -
i have written live push filter gets mpeg-ts stream containing h.264 video , aac audio. set directshow pipeline , configure output pins. can render h.264 stream artifacts in rendering can seen screenshot when streaming gstreamer using videotestsrc , "ball" pattern.
this screenshot should contain 1 white dot on black background. 2 additional "leftovers" appear when animation plays.
if stream mpeg-2 , change pipeline accordingly, pattern renders without error. have tried use settings described on msdn configure pin, both using h264 , avc1 explicitly providing sequence header , on. still same kind of artifacts.
one interesting thing artifacts appear @ same frequency i-frames arrive, , if send i-frames (key-int-max=1), artifacts disappear completely.
also, errors seem appear @ top half of image when i-frame interval 60, i.e. every 2 seconds. when change 1 i-frame every second frame (key-int-max=2), artifacts appear in narrow strip @ top of image.
the following gstreamer pipeline produced video stream:
videotestsrc live-source=true pattern=ball ! video/x-raw-yuv,format=(fourcc)i420,width=1366,height=768,framerate=30/1 ! timeoverlay halign=left valign=bottom shaded-background=true ! x264enc bitrate=4096 tune=zerolatency ! h264parse ! queue ! mux. audiotestsrc wave=ticks volume=0.2 ! voaacenc ! mux. mpegtsmux name=mux ! udpsink host=<ip> port=<port> this pipeline looks like: 
the configuration in example majortype = mediatype_video, subtype = mediasubtype_h264, formattype = format_mpeg2video. no sequenceheader provided, etc.
so question is, these kinds of artifacts symptoms of common configuration problem?
you loosing data in transmission possibly leading errors. issue pictures have higher bitrate p pictures. if have cbr n/w can potentially see issue.
why artifacts appear way:
now if had video 1 white ball , rest of background black, when loose frames reference pictures lost , appear garbled because decoder may try use frames last valid frame display. since last valid frame black rest of screen looks ok, part while ball still shows errors.
replace pattern different 1 , see more mean.
with pictures there no question of reference pictures , hence clean output.
one way check if transmission ok dump output file , read on other side file. if works fine know transmission loosing data.
also since have clock @ bottom should see clock jumping if there loss in frames.
Comments
Post a Comment