Closed fisheggg closed 7 months ago
Very nice work @fisheggg! I have reviewed your new functionalities on 3 different OS and Python versions, and all checks have passed smoothly. Therefore, I have merged your pull request.
If you have time, could you provide some code snippets for using all your new functionalities in the Wiki page? That would be amazing!
Hi guys! This is the PR for #315. I've implemented most of the functionalities that we discussed, and there are some TODOs left as I will wrote down below.
New functionalities
Mg360Video
class that inheritsMgVideo
, contains exclusive properties and methods for 360 videosProjection
class that is an enum of different types of projections, using the same naming with ffmpeg with a few additions (There are two aliases for equirectangular that are 'e' and 'equirect', but no 'equirectangular' or 'erp' which I think are more common).Mg360Video.Projection
property that represents the current projection of the video.Mg360Video.convert_projection()
that converts the video into target projection using ffmpeg.Mg360Video
class can, of course, support all the analysis functions in the originalMgVideo
class.MgVideo
andMg360Video
, by using a list of paths as filename.mgv = MgVideo(["video_1.mp4", "video_2.mp4"])
will merge the two video files and create the object with the merged file path._utils.merge_videos()
that merges multiple video files with ffmpeg._utils.in_ipynb()
. There was a detection for google colab, and now we can detect regular notebooks too. I've also added in_utils.show()
that automatically switches to notebook mode if detected.Fixes
Mg360Video.show()
. The originalMgVideo.show()
uses non embed mode, which does not support large video files. We change the default ofMg360Video.show()
to embed mode, and that does not affect the originalMgVideo.show()
.MgVideo.show()
does not support video files with non-lower case extension name, e.g. "video.MP4". That happens for some cameras such as the Garmin 360 VIRB which saves files in capital extension name.TODOs
.360
files from the GoPro MAX. It is a customized file format that requires extra stream processing and stiching. We've discussed the format in our coming paper, but some extra effort is needed to support the format in MGT._360Video.CAMERA
.Cheers! 🍻 Arthur