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

WasmEdge FFmpeg Plugin to Process Video and Audio Files #4

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Hrushi20
Copy link

@Hrushi20 Hrushi20 commented Nov 26, 2023

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.

Signed-off-by: Hrushi20 <hrushikesh20thegreat@gmail.com>
Copy link
Contributor

alabulei1 commented Nov 26, 2023

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:

  • The video data is now being passed by reference in the ImageToTensor implementation in ffmpeg.rs.
  • The ffmpeg-deps-init.sh script has been removed.
  • The README.md file has been updated to reflect changes in building and running the library.

Potential Problems:

  • The ffmpeg-deps-init.sh script was removed, but it's not clear if any necessary dependencies have been handled elsewhere.
  • The removal of the ffmpeg-deps-init.sh script may have introduced build or runtime errors if it was responsible for setting up necessary dependencies.
  • There is no information on why the rust-ffmpeg dependencies were removed. This may affect the functionality or performance of the code.
  • It's unclear if any new dependencies need to be installed or steps need to be taken to build and run the library after the changes made in the patch.
  • There are some unused environment variables in the README.md file that may need to be removed or explained.

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:

  • The patch updates the code in the FFMpegVideoData and ImageToTensor implementations in the ffmpeg.rs file.
  • In the FFMpegVideoData implementation, the patch replaces the usage of the name() function with the mask() function when obtaining the pixel format descriptor.

Potential problems:

  • It is not clear why the change from name() to mask() is necessary or beneficial. It would be helpful to have a comment or explanation in the code or the pull request description to provide justification for the change.
  • Since the patch only modifies the name/mask retrieval for the pixel format descriptor, there might be other related changes or potential issues that are not addressed in this patch. It would be helpful to review the entire pull request and consider the context of this change in relation to other changes in the codebase.
  • It is important to ensure that the mask() function provides the correct and expected behavior for obtaining the pixel format descriptor. This should be carefully tested to ensure that it doesn't introduce any regressions or errors in the codebase.

…dencies

Signed-off-by: Hrushi20 <hrushikesh20thegreat@gmail.com>
Signed-off-by: Hrushi20 <hrushikesh20thegreat@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants