Skip to content
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

⚡️Helper: Added more robust implementation of validate_audio method. #350

Merged
merged 10 commits into from
Jan 6, 2023

Conversation

abhiTronix
Copy link
Owner

Brief Description

This PR will bring more robust implementation of validate_audio method with improved and more robust regex patterns for identifying audio bitrate in any audio file. Plus it will move/clone all assets from GitHub to GitLab.

Requirements / Checklist

Related Issue

#343
#347

Context

This PR is aimed at improving regex patterns for identifying audio bitrate in any audio file and also moving/cloning all vidgear assets from GitHub to GitLab for smoother user-experience while accessing these assets.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

- ✨ Added `content.code.copy` and `content.tabs.link` features.
- ✏️ Minor typos fixed.
Fixes #343)

- ⚡️Updated `validate_audio` method with improved and more robust regex patterns for identifying audio bitrate in any audio file.
- 🐛Fixed `fltp` keyword in regex pattern causing non-ftlp streams to be not recognized.
- ⚡️Added new more robust regex pattern for extracting audio-samplerate.
- ✨Added new `validate_audio` method for calculating accurate bitrate(in kbps) from audio samplerate, channels, bit-depth values.
- ⚡️Implemented new patterns and logic for accurately extracting audio channels and bit-depth from given metadata.
- 🐛 Fixed `validate_audio` returning wrong bitrate values for samplerate values less than `44100Hz`.
- 🔥 Removed dead code.
- 🚚 Mirrored all assets to `gitlab.com` for smoother user-experience while accessing vidgear assets.
- 🚸 Replaced all `raw.githubusercontent.com` URLs with `gitlab.com` URLs.
- ✏️ Fixed typos in README.md.

👷 CI: Added test cases for newer implementation of `validate_audio` method.
- 🚑️ Fixed response.headers returning `content-length` as Nonetype since it may not necessarily have the Content-Length header set.
  - 💬 Reason: The response from gitlab.com  contains a Transfer-Encoding field as `'Transfer-Encoding': 'chunked'`, which means data is sent in a series of chunks, so the Content-Length header is emitted. More info: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Transfer-Encoding#Directives
- 🔊 Improved logging.
- 🚑️ Fixed response.headers returning `content-length` as Nonetype since it may not necessarily have the Content-Length header set.
  - 💬 Reason: The response from gitlab.com  contains a Transfer-Encoding field as `'Transfer-Encoding': 'chunked'`, which means data is sent in a series of chunks, so the Content-Length header is emitted. More info: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Transfer-Encoding#Directives
@abhiTronix abhiTronix added ENHANCEMENT ⚡ New Feature/Addition/Improvement WORK IN PROGRESS 🚧 currently been worked on. META 💭 Meta Issue/PR PENDING TESTS 🧪 Waiting for CI tests to complete successfully. labels Jan 5, 2023
@abhiTronix abhiTronix added this to the v0.3.0 milestone Jan 5, 2023
@abhiTronix abhiTronix added this to In progress in VidGear v0.3.0 via automation Jan 5, 2023
@abhiTronix abhiTronix self-assigned this Jan 5, 2023
@codecov
Copy link

codecov bot commented Jan 5, 2023

Codecov Report

Base: 94.66% // Head: 94.66% // Decreases project coverage by -0.00% ⚠️

Coverage data is based on head (48ee685) compared to base (4edbfab).
Patch coverage: 70.58% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           testing     #350      +/-   ##
===========================================
- Coverage    94.66%   94.66%   -0.01%     
===========================================
  Files           16       16              
  Lines         3131     3130       -1     
===========================================
- Hits          2964     2963       -1     
  Misses         167      167              
Impacted Files Coverage Δ
vidgear/gears/helper.py 93.90% <61.53%> (-0.20%) ⬇️
vidgear/gears/asyncio/helper.py 99.17% <100.00%> (-0.02%) ⬇️
vidgear/gears/streamgear.py 95.96% <0.00%> (+0.25%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

…ab (Fixes #347)

- 🚑️ Fixed DASH playback failing by setting the `maxAttempts` to Infinity.
- 📝 Updated announcement bar and added minor tweaks to scripts.
- 💄 Removed `x-sign` glow-text effect CSS.
- 🚑️ Fixed conditional logic to check file is downloaded properly.
- 🚑️ Corrected Decrement Variable code in Bash.
- ♻️ Removed unnecessary quotes.
@abhiTronix abhiTronix merged commit 9047d91 into testing Jan 6, 2023
VidGear v0.3.0 automation moved this from In progress to Done Jan 6, 2023
@abhiTronix abhiTronix deleted the development branch January 6, 2023 08:34
@abhiTronix abhiTronix added SOLVED 🏁 This issue/PR is resolved now. Goal Achieved! and removed WORK IN PROGRESS 🚧 currently been worked on. PENDING TESTS 🧪 Waiting for CI tests to complete successfully. labels Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ENHANCEMENT ⚡ New Feature/Addition/Improvement META 💭 Meta Issue/PR SOLVED 🏁 This issue/PR is resolved now. Goal Achieved!
Projects
1 participant