Comments (3)
And why does this lib even exists if I can do:
ffprobe -print_format json -show_streams -show_format -loglevel quiet -hide_banner
from ffprobe-python.
It looks like the issue is a regex problem. My exception was raised on this line
' Chapter #0:0: start 0.000000, end 485.902000\n'
In particular, on the string
end 485.902000\n
The regex being used to piece this apart
m = re.search(r'(\w+)\s*:\s*(.*)$', s)
Wont return anything as the string above doesn't match the regex listed. I am not quite sure the best way to go about parsing that out, though to @venomone 's point, this entire script could be redone to simply wrap and ingest the output of -print_format json -show_format
Also probably worth using that -hide_banner
flag to ignore parsing out (and ignoring) the banner text displayed by ffprobe.
Both these options appear to be quite old in ffprobe, so they should be safe to use here.
https://github.com/FFmpeg/FFmpeg/blame/master/fftools/ffprobe.c
If I have more time I might look into doing that. For now though I am going to have to abandon this project and inject the output json myself
from ffprobe-python.
If anyone's looking for a longer-term solution, I've implemented the above
ffprobe -print_format json -show_streams -show_format
command-line, plus a bunch of other bug-fixes, features, and improvements, in a fork:
https://github.com/jboy/ffprobe3-python3
(Python3 only, sorry.)
from ffprobe-python.
Related Issues (13)
- ValueError: not enough values to unpack (expected at least 2, got 1) HOT 3
- ImportError: cannot import name 'FFProbe' from partially initialized module 'ffprobe' HOT 8
- Would like duration in milliseconds rather than rounded seconds.
- SRT protocol
- Error probing file HOT 6
- Installing with pip is broken with setuptools 59.x.y
- ValueError: not enough values to unpack HOT 3
- Chapters HOT 3
- Trying to convert m4a to wav format using Python code from an AML pipeline. When run from an AML pipeline on a Compute Cluster it fails stating: ImportError: cannot import name 'FFProbe' from partially initialized module 'ffprobe'
- Use ffprobe's -print_format json to parse, and also let ffprobe handle the "file" instead HOT 3
- Parsing-Error when probing wav-files
- Support remote video files HOT 2
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 ffprobe-python.