[FFmpeg-user] dshow and gdigrab formats missing NOSEEK flags?

Diederick C. Niehorster dcnieho at gmail.com
Mon May 24 15:02:03 EEST 2021

Dear Sir, Madam,

I am trying to figure out whether a format is seekable. It was suggested to
me to check the context->iformat (AVInputFormat) flags and whether
read_seek/read_seek2 are non-NULL. That however does not work correctly for
the dshow and gdigrab avdevice input formats, as these do not set any of
oversight, since these avdevices are realtime and do not support seeking?

Trying to seek these formats anyway leads to a Invalid argument error, not
an operation not permitted as one would expect, see, e.g.:
ffprobe -f dshow -i "video=Integrated Webcam" -show_frames -read_intervals
Input #0, dshow, from 'video=Integrated Webcam':
  Duration: N/A, start: 331739.487000, bitrate: N/A
  Stream #0:0: Video: mjpeg (Baseline) (MJPG / 0x47504A4D), yuvj422p(pc,
bt470bg/unknown/unknown), 1280x720, 30 fps, 30 tbr, 10000k tbn, 10000k tbc
Could not seek to position 12000000: Invalid argument
Could not read packets in interval id:0 start:12 end:13

That is with ffprobe version 4.4-full_build-www.gyan.dev (commit ref

I'd be happy to provide a patch. Looking at the source, this is also the
case for at least the v4l2, vfwcap, x11grab, fbdev, kmsgrab and
android_camera devices, but i would not be able to test most of these.

Thanks and all the best,

More information about the ffmpeg-user mailing list