Giter VIP home page Giter VIP logo

Comments (3)

venomone avatar venomone commented on July 24, 2024 2

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.

miversen33 avatar miversen33 commented on July 24, 2024

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.

jboy avatar jboy commented on July 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.