-
-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--read-length CLI option + some code suggestions #11
Conversation
- duration is rounded at calculation & when creating BitrateStatsSummary
- removed verbose input parameter - added debug level log
- calculates pts from next packet if value is missing
Thanks for the suggestion. I can see how this is useful! Some thoughts: It imposes some restrictions on the value of I will leave some more comments in the code. |
# "-analyzeduration", | ||
# str(self.chunk_size*1000000), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this if not needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my tests, it seems unnecessary; I copied it over from unleashlive's repo. I'll remove it.
As a side note, do you understand what the -analyzeduration
option does? From what I read, it seems to specify the duration that ffprobe's probe attempts to read the input file's metadata/headers. Is that right?
That makes sense, running the tests again. |
Actually, looking at it again, I will change the parameter to be |
I had to fix some types using
I would expect the output to contain 12 frames only (the full 1 second file has 25 frames), but I still get 25? |
Did you get a chance to check the functionality? I'd like to merge it but I'm not sure if this does what it is supposed to do. |
Hi sorry, I didn't have the time to come back to this PR this week. I should be able to get back to you next Tue, let you know then :) |
- occurs with --read-duration)
Had some issues (when using -rd) with the 1st packet's duration value, added some code for that.
Seems like the I happen to do some tests with the from the documentation I should be good after this commit, let me know if there is anything else I can do. Otherwise, pleasure working with you! 😄 |
- added check for 1st packet's duration type
Ah yes, it says in the docs:
|
Released in v1.1.0, thanks for your contribution! |
@all-contributors Please add @GabrielChanzy for code |
I've put up a pull request to add @GabrielChanzy! 🎉 |
Hello,
Thanks so much for making your project available, I've really benefited from it :)
I've added an additional
--read-length
option for my use case (getting stats for live RTSP streams). My edits have been heavily influenced by this other forked repo. They seemed to stop maintaining it so thought to fork your project & initiate a pull request. (The gist of it is the--read_intervals
option offfprobe
)The other commits are small edits I made in the code, the last one being a bug fix for the new
--read-length
option. Hopefully the commit message is clear enough; let me know if you require clarifications.Thanks for taking the time to go through this. This is my first time trying out forks & pull requests so please let me know if I could have done something better! I am pretty unfamiliar with FFmpeg & python as well, so let me know if I misunderstood something :)