“Can't find starting number (in the name of file)” when trying to read frames from hevc (h265)


I'm trying to read frames from a hevc(h265) .avi video in opencv-python (python3, latest version) but keeps throwing


OpenCV(4.1.1) C:\projects\opencv-python\opencv\modules\videoio\src\cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): C:\Users\gabri\Desktop\2019-11-22_13\a.avi in function 'cv::icvExtractPattern'.


I've tried both in ubuntu and windows 10 using opencv-python, opencv-contrib-python and opencv-contrib-python-nonfree, but it didn't work. Thank you in advance.

Code used to read the video:

<pre class="lang-py prettyprint-override">import cv2 import imutils cap = cv2.VideoCapture("C:\\Users\\gabri\\Desktop\\2019-11-22_13\\a.avi") while True: ret,frame = cap.read() if not ret: break frame = imutils.resize(frame,width = 960) cv2.imshow('image',frame) k = cv2.waitKey(1) & 0xff if k == 27: break

I had the same problem, compilation and linking ok, but the same cryptic error occurs at running.

It happened (with Windows) when opencv_videoio_ffmpeg430_64.dll was not accessible (it seems to be silently called by another opencv lib). Either you did not build opencv with the -DWITH_FFMPEG=ON, or alternatively your dll is not in the path.



  • C++ method declaration including a macro
  • XtraGrid - Export To Excel
  • jQuery - Prevent activation on first click
  • Map Annotation Disclosure Indicator - Xamarin.Form
  • On unchecking a checkbox trigger an event
  • if you have a DLL creating a bitmap in memory, how to return it to the browser?
  • Could not resolve all files for configuration ':react-native-vector-icons:classpath'
  • Error processing job: Project has not enabled BigQuery
  • How to implement Google Drive and Google Plus sdk in ios project
  • Creating Dictionaries from Lists inside of Dictionaries
  • Tensorflow crash using tf.train.Saver() with GPU
  • internal javascript not works in angular2
  • How to get the Owner of the ContextMenu (from Silverlight 4 toolkit)?
  • Get name of days between two date in ios?
  • How to output data of primefaces DataGrid component by columns instead of by rows (transpose data)?
  • Symfony - Setting Cookie onKernelRequest
  • VBScript InputBox and Help Files
  • opencv deskewing a contour
  • C# code can't “see” the methods in my C++ dll
  • Does hibernate load two seprate copies of same instance if they are loaded twice from database?
  • Julia 1.0 UndefVarError - Scope of Variable
  • Query takes almost two seconds but matches only two rows - why isn't the index helping?
  • How to create subsets of a single set of elements with XSLT?
  • How to run chrome.tabs.insertCSS from the background page on each page?
  • Creating 2d platforms using JavaScript
  • Create an average of multiple excel chart without the data source
  • Comparing variables with strings bash
  • Error handeling in antlr 3.0
  • How can I ssh into a server that requires 2 password authentication using python's paramiko mod
  • DataTables move rows between tables
  • how to run ejabberd with Erlang on Heroku?
  • How to use Streams api peek() function and make it work?
  • Terminal run dalvikvm with am.jar
  • `$http:badreq Bad Request Configuration` - from angular post method, what is wrong here?
  • Make checkout phone field optional for specific countries in WooCommerce
  • calling IO Operations from thread in ruby c extension will cause ruby to hang
  • Angular 4: Responsive Grid List
  • Jersey serializes character value to ASCII equivalent numeric string
  • WPF custom control and direct content support
  • Write to .csv file with PHP (Commas in Data Error)