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 synthesize videos. #84

Merged
merged 5 commits into from
Aug 5, 2020
Merged

Conversation

JackyTown
Copy link
Contributor

Synthesize videos based on RGB frames.

Args:
frame_dir_item (list): Rawframe item containing raw frame directory
full path, rawframe directory (short) path, rawframe directory id.
dev_id (int): Device id.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is dev_id necessary?

@codecov
Copy link

codecov bot commented Aug 5, 2020

Codecov Report

Merging #84 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #84   +/-   ##
=======================================
  Coverage   85.32%   85.32%           
=======================================
  Files          75       75           
  Lines        4083     4083           
  Branches      652      652           
=======================================
  Hits         3484     3484           
  Misses        493      493           
  Partials      106      106           
Flag Coverage Δ
#unittests 85.32% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ed6f5fe...6468419. Read the comment docs.



def synthesize_video(frame_dir_item):
"""Generate videos using opencv-python.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Encode frames to video using ffmpeg

from multiprocessing import Pool


def synthesize_video(frame_dir_item):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

synthesize_video -> encode_video


cd ../
python build_videos.py ../../data/sthv1/rawframes/ ../../data/sthv1/videos/ --fps 12 --level 2 --start-idx 1 --filename-tmpl '%05d'
echo "Genearte videos"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and here.

generate means create something completely new. here we are encoding images to videos---a kind of format transformation

@innerlee innerlee merged commit 11d638f into open-mmlab:master Aug 5, 2020
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.

3 participants