WasmEdge / mediapipe-rs

The Google mediapipe AI library. Write AI inference applications for image recognition, text classification, audio / video processing and more, in Rust and run them in the secure WasmEdge sandbox. Zero Python dependency!
Apache License 2.0
157 stars 17 forks source link

WasmEdge FFmpeg Plugin to Process Video and Audio Files #4

Open Hrushi20 opened 12 months ago

Hrushi20 commented 12 months ago

Integrated WasmEdge FFmpeg Plugin. The Plugin supports Audio and Video Processing.

https://github.com/Hrushi20/rust-ffmpeg

While using the Plugin, you may get some FFmpeg warning. The warning can be ignored. The warning can be removed by setting the appropriate Log Level using FFmpeg Rust SDK.

alabulei1 commented 12 months ago

Hello, I am a code review bot on flows.network. Here are my reviews of code commits in this PR.


Overall Summary:

The pull request titled "WasmEdge FFmpeg Plugin to Process Video and Audio Files" introduces several changes to the codebase. These changes include modifications to the Cargo.toml file, renaming a function, using a different enum value, passing video data by reference, removing a script, and updating the README.md file.

Potential Issues and Errors:

  1. The dependencies.ffmpeg-next section in Cargo.toml is modified, but it is unclear if it is necessary or properly used in the code changes.
  2. The renaming of the read_video_using_ffmpeg function to read_audio_using_ffmpeg is not reflected in the method description, causing potential confusion.
  3. The removal of the ffmpeg-deps-init.sh script raises concerns about missing dependencies and potential build or runtime errors.
  4. The reasons for removing the rust-ffmpeg dependency are not explained, which may impact functionality or performance.
  5. It is unclear if new dependencies need to be installed or additional build and run steps are required to accommodate the changes.
  6. Unused environment variables in README.md should be removed or properly explained.
  7. The justification for changing from name() to mask() when obtaining the pixel format descriptor is not provided.
  8. The context and potential related changes or issues introduced by this modification should be considered.
  9. The mask() function's correctness and expected behavior for obtaining the pixel format descriptor should be thoroughly tested.

Important Findings:

  1. Clarify the necessity and correct usage of the dependencies.ffmpeg-next section in Cargo.toml.
  2. Update the method description to reflect the renaming of read_video_using_ffmpeg to read_audio_using_ffmpeg.
  3. Address any missing or handled dependencies previously handled by the removed ffmpeg-deps-init.sh script.
  4. Provide reasons for removing the rust-ffmpeg dependency and evaluate potential impacts.
  5. Ensure clear instructions for installing new dependencies or any additional build and run steps.
  6. Remove or explain unused environment variables in README.md.
  7. Justify the change from name() to mask() and consider any related changes or potential issues.
  8. Thoroughly test the mask() function for obtaining the pixel format descriptor.

Overall, the patch introduces several changes that require careful evaluation to ensure proper functionality, maintainability, and ease of use. Additional clarification, thorough testing, and documentation improvements are recommended.

Details

Commit d2e7bacf77d1144f92745d539fad4050e9271e1c

Key changes:

  1. The dependencies.ffmpeg-next section in Cargo.toml has been modified to use a different repository URL (https://github.com/Hrushi20/rust-ffmpeg) and the branch has been changed to master.
  2. The read_video_using_ffmpeg function in audio_classification.rs has been renamed to read_audio_using_ffmpeg.
  3. The format::Pixel enum from ffmpeg_next is now used to get the pixel format descriptor in ffmpeg.rs.

Potential problems:

  1. The ffmpeg-next dependency is not used in the code changes. It may be left unused or accidentally removed.
  2. The read_video_using_ffmpeg function in audio_classification.rs has been renamed, but the method description still refers to it as reading video rather than audio. This can cause confusion and should be updated.

Overall, the changes seem straightforward, but it is recommended to verify if the dependencies.ffmpeg-next section is still necessary and that the code changes are correctly addressing the desired functionality.

Commit 30a91dcefb9777fdf0f7f6f4ec62ac340341ed67

Key Changes:

Potential Problems:

Overall, the patch seems to focus on refactoring and updating the code, but there are potential problems that need to be addressed.

Commit ecf8b45ff2aaf18d3b74d07ba08ee7692d2d09a2

Key changes:

Potential problems: