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 --to-mp4 argument to resize_videos.py #1021

Merged
merged 6 commits into from
Jul 13, 2021
Merged

add --to-mp4 argument to resize_videos.py #1021

merged 6 commits into from
Jul 13, 2021

Conversation

makecent
Copy link
Contributor

@makecent makecent commented Jul 13, 2021

Motivation

Current resize_videos.py doesn't support resizing .webm videos.

  1. It can be solved by change the -c:v libx264 to -c:v libvpx:

    f'-c:v libx264 {"-g 16" if args.dense else ""} '

  2. Or just outputting .mp4 videos, which is what this PR does.

I choose the second solution because I found writing .mp4 files saved lots of time. BTW, it requires lots of extra time to write the resized videos (which run in the background) after the python script execution is finished.

Modification

Add --to-mp4 argument, to output .mp4 files.

Others

I had tested it on the ActivityNet dataset, which contains .mkv, .webm abd .mp4 videos.

@CLAassistant
Copy link

CLAassistant commented Jul 13, 2021

CLA assistant check
All committers have signed the CLA.

@dreamerlin dreamerlin merged commit b25cca3 into open-mmlab:master Jul 13, 2021
@makecent makecent deleted the resize_video_for_webm branch July 13, 2021 12:38
@kennymckormick
Copy link
Member

@dreamerlin Better to have lint passed before merging.

@dreamerlin dreamerlin linked an issue Jul 14, 2021 that may be closed by this pull request
@makecent
Copy link
Contributor Author

@dreamerlin Better to have lint passed before merging.

My bad. I used the Pycharm to run commit. Do you know how to enable pre-commit in Pycharm?

@dreamerlin
Copy link
Collaborator

run pre-commit run --all-files in command line

@dreamerlin
Copy link
Collaborator

@makecent
Copy link
Contributor Author

ref: https://github.com/open-mmlab/mmcv/blob/master/CONTRIBUTING.md

Thx. I solved it by sudo apt install ruby. A new pull request #1026 was created to solve the format issue.

@yaqi0510
Copy link

Dear makecent,

First of all, we want to express our gratitude for your significant PR in the MMAction2 project. Your contribution is highly appreciated, and we are grateful for your efforts in helping improve this open-source project during your personal time. We believe that many developers will benefit from your PR.

If you are Chinese or have WeChat,welcome to join our community on WeChat. You can add our assistant :openmmlabwx. Please add "mmsig + Github ID" as a remark when adding friends:)

We would also like to invite you to join our Special Interest Group (SIG) private channel on Discord, where you can share your experiences, ideas, and build connections with like-minded peers. To join the SIG channel, simply message moderator— OpenMMLab on Discord or briefly share your open-source contributions in the #introductions channel and we will assist you. We look forward to seeing you there! Join us :https://discord.gg/raweFPmdzG

Thank you again for your contribution❤

Best regards!@makecent

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.

Some problems with tools/data/resize_video.py
5 participants