View Full Version : Irregular DirectShow timestamps from DFG/USB2-lt

January 25, 2013, 17:21:12

I have a DirectShow capture graph where an analog NTSC video source is streamed to an MPEG2 encoder.

Using a third party analog capture card, the graph works fine. If I inspect the media samples coming from the capture source, the timestamps are always about 0.0333667 seconds apart, which is expected for 29.97 fps NTSC video.

When I try the graph with my DFG/USB2-lt capture device, the resulting video seems intermittently jerky. Inspection of the media sample timestamps shows a pattern of 0.0322 seconds between samples, with the occasional 0.046 gap every 10-20 samples.

My guess would be that this timestamp irregularity is causing the jerkiness in the video. Why are samples being timestamped like this?

(I thought it might be that frames are being dropped, but I would think that I'd see a multiple of the regular frame duration in that case. The samples aren't being marked as discontinuities, either, and I also tried reducing the resolution to make dropped frames less likely, but that didn't change the timestamp behavior.)

Stefan Geissler
January 28, 2013, 11:01:37

The gabs are usual, and there was a reason for them. (Sorry, but I forgot the reason.)

The time stamps are generated in the computer by the driver, when the USB controller notifies the driver, that there is a new image.