1. 07 Jun, 2022 3 commits
  2. 06 Jun, 2022 1 commit
    • moto's avatar
      Set the default ffmpeg log level to FATAL (#2447) · 4e761081
      moto authored
      Summary:
      With the default log-level, completely sane operation like converting
      YUV to RGB issues bunch of warnings like
      
      `[swscaler @ 0x128aa8000] No accelerated colorspace conversion found from yuv420p to rgb24.`
      
      This commit sets the log level to FATAL.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2447
      
      Reviewed By: hwangjeff
      
      Differential Revision: D36938728
      
      Pulled By: mthrok
      
      fbshipit-source-id: 39c2e6a4307f1eac577fd606e17ab0f298079b54
      4e761081
  3. 04 Jun, 2022 3 commits
  4. 03 Jun, 2022 5 commits
  5. 02 Jun, 2022 5 commits
  6. 01 Jun, 2022 8 commits
  7. 31 May, 2022 2 commits
  8. 30 May, 2022 1 commit
  9. 29 May, 2022 2 commits
  10. 28 May, 2022 1 commit
    • moto's avatar
      Update I/O initialization (#2417) · 65ab62e6
      moto authored
      Summary:
      Attempt to load ffmpeg extension at the top level import
      
      Preparation to use ffmpeg-based I/O as a fallback for sox_io backend.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2417
      
      Reviewed By: carolineechen
      
      Differential Revision: D36736989
      
      Pulled By: mthrok
      
      fbshipit-source-id: 0beb6f459313b5ea91597393ccb12571444c54d9
      65ab62e6
  11. 27 May, 2022 1 commit
    • moto's avatar
      Refactor Streamer to StreamReader in C++ codebase (#2403) · 9ef6c23d
      moto authored
      Summary:
      * `Streamer` has been renamed to `StreamReader` when it was moved from prototype to beta.
      This commit applies the same name change to the C++ source code.
      
      * Fix miscellaneous lint issues
      
      * Make the code compilable on FFmpeg 5
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2403
      
      Reviewed By: carolineechen
      
      Differential Revision: D36613053
      
      Pulled By: mthrok
      
      fbshipit-source-id: 69fedd6720d488dadf4dfe7d375ee76d216b215d
      9ef6c23d
  12. 26 May, 2022 1 commit
  13. 24 May, 2022 2 commits
  14. 23 May, 2022 3 commits
  15. 21 May, 2022 1 commit
    • moto's avatar
      Add file-like object support to Streaming API (#2400) · a984872d
      moto authored
      Summary:
      This commit adds file-like object support to Streaming API.
      
      ## Features
      - File-like objects are expected to implement `read(self, n)`.
      - Additionally `seek(self, offset, whence)` is used if available.
      - Without `seek` method, some formats cannot be decoded properly.
        - To work around this, one can use the existing `decoder` option to tell what decoder it should use.
        - The set of `decoder` and `decoder_option` arguments were added to `add_basic_[audio|video]_stream` method, similar to `add_[audio|video]_stream`.
        - So as to have the arguments common to both audio and video in front of the rest of the arguments, the order of the arguments are changed.
        - Also `dtype` and `format` arguments were changed to make them consistent across audio/video methods.
      
      ## Code structure
      
      The approach is very similar to how file-like object is supported in sox-based I/O.
      In Streaming API if the input src is string, it is passed to the implementation bound with TorchBind,
      if the src has `read` attribute, it is passed to the same implementation bound via PyBind 11.
      
      ![Untitled drawing](https://user-images.githubusercontent.com/855818/169098391-6116afee-7b29-460d-b50d-1037bb8a359d.png)
      
      ## Refactoring involved
      - Extracted to https://github.com/pytorch/audio/issues/2402
        - Some implementation in the original TorchBind surface layer is converted to Wrapper class so that they can be re-used from PyBind11 bindings. The wrapper class serves to simplify the binding.
        - `add_basic_[audio|video]_stream` methods were removed from C++ layer as it was just constructing string and passing it to `add_[audio|video]_stream` method, which is simpler to do in Python.
        - The original core Streamer implementation kept the use of types in `c10` namespace minimum. All the `c10::optional` and `c10::Dict` were converted to the equivalents of `std` at binding layer. But since they work fine with PyBind11, Streamer core methods deal them directly.
      
      ## TODO:
      - [x] Check if it is possible to stream MP4 (yuv420p) from S3 and directly decode (with/without HW decoding).
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2400
      
      Reviewed By: carolineechen
      
      Differential Revision: D36520073
      
      Pulled By: mthrok
      
      fbshipit-source-id: a11d981bbe99b1ff0cc356e46264ac8e76614bc6
      a984872d
  16. 20 May, 2022 1 commit