Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Currently the command used for audio sampling is "-ab". It should be "-ar".
Patch attached.
Comment | File | Size | Author |
---|---|---|---|
audio_sampling.patch | 536 bytes | RyanPrice | |
Comments
Comment #1
brycefisherfleig CreditAttribution: brycefisherfleig commentedHi RyanPrice,
This is the first cleanly-applying patch I have received as maintainer of this module. Thanks!!
Unfortunately, phpvideotoolkit (which your patch modifies) is an external library to the video module. Apparently, we've already made significant changes to this library, so I'm open to accepting another change here.
The phpvideotoolkit has been completely rewritten and is now maintained on github by the original author:
https://github.com/buggedcom/phpvideotoolkit-v2
I'd like to look at refactoring this module to rely on the new and improved phpvideotoolkit library -- hopefully, we can contribute fixes we need back to that project #2281595: Consider PHPVideoToolkit V2
For the time being, can you explain what problem this patch solves? What are the steps to reproduce? What does the "ar" flag actually do? Thanks!
Cheers
Bryce
Comment #2
brycefisherfleig CreditAttribution: brycefisherfleig commentedComment #3
brycefisherfleig CreditAttribution: brycefisherfleig commentedComment #4
RyanPrice CreditAttribution: RyanPrice commentedSorry I didn't get alerts to replies on this topic for some reason.
The -ar flag, as explained here: http://libav.org/avconv.html :
‘-ar[:stream_specifier] integer (input/output,audio)’
set audio sampling rate (in Hz)
sets the audio sampling rate. The same flag can be found on the ffmpeg manual: https://ffmpeg.org/ffmpeg.html
For some reason, the module was using -ab instead. Not sure if it was a typo or a deprecated flag, but there is not evidence of the -ab even existing in either manual. I was receiving errors related to the audio frequency it was attempting to encode at and eventually nailed it down to this being the issue.
Hope that explains things.
Comment #5
RyanPrice CreditAttribution: RyanPrice commentedSetting to needs review, this is still an issue.
Comment #6
RyanPrice CreditAttribution: RyanPrice commentedNobody else seemed to respond, but I have been using this patch in a couple production sites for a while now and its working great.
Comment #7
RyanPrice CreditAttribution: RyanPrice commentedLooks like its been contributed. Thanks