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 AVFMT_NOBINSEARCH, AVFMT_NOGENSEARCH, AVFMT_NO_BYTE_SEEK. Is that an 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 12%13 [...] 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 f68ab9de4e). 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, Dee _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".