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

Add codec arg to process_video #1126

Closed

Conversation

LinasKo
Copy link
Collaborator

@LinasKo LinasKo commented Apr 23, 2024

Description

VideoSink provides an argument for a FourCC codec, allowing encoding the video in different formats. process_video, however, does not and defaults to mp4v.

This PR adds the same arg, hardcode-defaulting to mp4v.
Note: An alternative implementation would make process_video codec have the type Optional[str] and link it with VideoSink, but this is more concise and self-documenting.

Type of change

  • New feature (non-breaking change which adds functionality)

How has this change been tested, please provide a testcase or example of how you tested the change?

https://colab.research.google.com/drive/16ggPDIUnk808HE0nUG-H7QCDjTncjldC?usp=sharing

Any specific deployment considerations

⚠️ Turns out H264, which I meant to enable, is not trivial to set up.

cv2.VideoWriter_fourcc fails silently, without throwing an error, doesn't even produce the file as an output. (tested in a different Colab)

Similar issues plague others - XVID, YVYU, etc.

Leaving this as draft until we figure out what the codec behaviour is.

Docs

  • Docs updated? What were the changes:

@LinasKo LinasKo changed the title Add codec arg for process_video Add codec arg to process_video Apr 23, 2024
@LinasKo
Copy link
Collaborator Author

LinasKo commented Apr 23, 2024

I am closing for now. We'd like greater certainty surrounding the codecs first.

@LinasKo LinasKo closed this Apr 23, 2024
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.

None yet

1 participant