Comments (2)
Try the lastest version of ffmpegcv
by pip install git+https://github.com/chenxinfeng4/ffmpegcv.git
. It supports more precise video-duration and average-fps.
In [1]: import ffmpegcv
# MKV file. Duration should be 283.682
In [2]: ffmpegcv.video_info.get_info_precise('2024-01-18_09-57-41_cam4.mkv')
Out[2]: VideoInfo(width=2560, height=1440, fps=25.007, count=7094, codec='hevc', duration=283.682)
In [3]: ffmpegcv.video_info.get_info('2024-01-18_09-57-41_cam4.mkv')
Out[3]: VideoInfo(width=2560, height=1440, fps=25.0, count=7094, codec='hevc', duration=283.76)
# identical file in MP4 format. Duration should be 283.682
In [4]: ffmpegcv.video_info.get_info('2024-01-18_09-57-41_cam4.mp4')
Out[4]: VideoInfo(width=2560, height=1440, fps=25.0, count=7094, codec='hevc', duration=283.682)
In [5]: ffmpegcv.video_info.get_info_precise('2024-01-18_09-57-41_cam4.mp4')
Out[5]: VideoInfo(width=2560, height=1440, fps=25.007, count=7094, codec='hevc', duration=283.682)
The ffmpegcv get_info_precise
will get the precise duration by calculating the time stamp of the first and last frame WITHOUT DECODING THE STREAM.
cmd = ('ffprobe -v error -select_streams v:0 -show_entries frame=pts_time '
f' -of default=noprint_wrappers=1:nokey=1 -read_intervals 0%+#1,99999% "{video}"')
Since the get_info_precise
would take a bit more time than get_info
, so the ffmpeg.VideoCapture will use get_info
for general cases. Even though, the get_info_precise
is much more effient than looping in opencv.
from deep-license-plate-recognition.
Hello @chenxinfeng4
- We had resolved the gray scale bug by doing an ffmpegcv upgrade
- For FPS we are calculating it manually by counting frames for 500ms using
fps_cap.get(cv2.CAP_PROP_POS_MSEC)
it works okay for RTSP too. Which i don't think reading last frame with fprobe will work
Thanks for your comments.
from deep-license-plate-recognition.
Related Issues (20)
- Question on using regions properly via python HOT 2
- Incorrect total_calls (hardcoded to 2500) HOT 1
- What is the license for self hosted docker image HOT 3
- An error occurs during recognition
- How to reduce confidence threshold for lpr reading? HOT 1
- Contact page at PlateRecognizer.com is not working HOT 1
- PlateRecognizer-Installer.exe detected as malware HOT 1
- issue localhost port 8080: Connection refused HOT 18
- Docker run failing with `Low disk space. Make sure to have at least 100MB of free disk space.` error HOT 18
- Installer cannot run Docker.
- Merge sftp_processor.py and ftp_processor.py HOT 6
- stream_monitor.py not reliable for multiple cameras HOT 2
- Stream Calling Endpoint output {"active": True, "cameras": {}} HOT 13
- Django CSFR Error HOT 8
- FFMPEGCV cannot process grayscale videos HOT 2
- FFMPEGCV incorrectly reads video fps as 60 most of the time HOT 9
- Error With .asf Video Format
- Need Help HOT 4
- Reorder docker folder HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deep-license-plate-recognition.