# Opencv-python version4.5.x get(cv2.CAP\_PROP\_POS\_MSEC)'s problem

**URL:** <https://forum.opencv.org/t/opencv-python-version4-5-x-get-cv2-cap-prop-pos-msec-s-problem/7613>\
**Category:** Python\
**Tags:** videoio\
**Created:** [February 17, 2022, 7:50am UTC](https://forum.opencv.org/t/opencv-python-version4-5-x-get-cv2-cap-prop-pos-msec-s-problem/7613 "2022-02-17T07:50:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![LiangMa](https://avatars.discourse-cdn.com/v4/letter/l/7cd45c/32.png) [@LiangMa](https://forum.opencv.org/u/LiangMa)\
**Post date:** [February 17, 2022, 7:50am UTC](https://forum.opencv.org/t/opencv-python-version4-5-x-get-cv2-cap-prop-pos-msec-s-problem/7613/1 "2022-02-17T07:50:15Z")

</div>

my code like below:

```auto

cam = cv2.VideoCapture(mp4_file)
while True:
    ret, frame = cam.read()
    if ret:
         ms = cam.get(cv2.CAP_PROP_POS_MSEC)

```

I want to get every frame’s time but the last six frames’ time **ms** was always 0  
I tried to change some different mp4 files all had the same problem
