-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Conversation
@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? |
run |
Thx. I solved it by |
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 |
Motivation
Current
resize_videos.py
doesn't support resizing .webm videos.It can be solved by change the
-c:v libx264
to-c:v libvpx
:mmaction2/tools/data/resize_videos.py
Line 34 in cf15d56
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.