-
Notifications
You must be signed in to change notification settings - Fork 7.1k
PR: Add PyTorch FFmpeg to wheel and conda distributions #2596
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
Merged
Merged
Changes from all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
2fd0162
Add PyTorch FFmpeg to wheel and conda distributions
andfoy 00e3050
Try to install wget from conda
andfoy d3393c1
Add yq flag on Mac
andfoy ffaa66d
Correct copy instructions
andfoy e2b97ec
Use cURL on Windows
andfoy bdd4e2d
Call bzip2 directly due to msys2/MSYS2-packages#1548
andfoy 994b03e
Copy ffmpeg binaries to system-wide directories
andfoy 0276acd
Try to use std:c++17 on Windows
andfoy 85a4e30
Try to define ssize_t on Windows
andfoy c43c378
Use C++14
andfoy 0d8e0e0
Declare AVRational structs explicitly
andfoy 8522638
Initialize AVRational explicitly
andfoy 6592f5b
Replace macro to prevent errors on Windows
andfoy 4706643
Replace AV_TIME_BASE_Q
andfoy 9e9f894
Add library paths for video extension
andfoy 603b164
Force ffmpeg from pytorch channels?
andfoy 309daa8
Fix clang style warnings
andfoy e530ada
Update CONDA_CHANNEL_FLAGS
andfoy 3985e04
Fix clang style issues
andfoy 8859151
Update unittest
andfoy 438ffa1
Merge branch 'master' into distribute_ffmpeg
andfoy 291aa61
Merge branch 'master' into distribute_ffmpeg
andfoy 1a7e797
Merge branch 'master' into distribute_ffmpeg
fmassa ffbc130
Merge branch 'master' into distribute_ffmpeg
andfoy 60ff1ca
Use FFmpeg 4.2
andfoy 1e9ada1
Install correct version on Mac
andfoy 3a1e9d2
Pin av version to 8.0.0
andfoy d394363
Merge branch 'master' into distribute_ffmpeg
andfoy 1a17871
Fix string formatting issue
andfoy dadc9fd
Fix pip pinning
andfoy 05aad31
Merge branch 'distribute_ffmpeg' of github.com:andfoy/vision into dis…
andfoy a2cfab7
Try with 8.0.1
andfoy 71b1262
Merge branch 'master' into distribute_ffmpeg
andfoy 8063d76
Merge branch 'master' into distribute_ffmpeg
andfoy 9cb1366
Use av 8.0.2
andfoy 3e37f4b
Merge branch 'master' into distribute_ffmpeg
andfoy 15a5e0c
Merge branch 'master' into distribute_ffmpeg
andfoy b4bc676
Remove trailling whitespaces
andfoy 7ac5a2b
Disable test_io_opt.py
andfoy cf2935f
Disable test_datasets_video_utils
andfoy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
channels: | ||
- pytorch | ||
- defaults | ||
dependencies: | ||
- numpy | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
channel_sources: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So we could just get rid of the arguments when we call |
||
- pytorch-nightly,pytorch,defaults | ||
blas_impl: | ||
- mkl # [x86_64] | ||
c_compiler: | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -337,7 +337,9 @@ def get_extensions(): | |
ffmpeg_bin = os.path.dirname(ffmpeg_exe) | ||
ffmpeg_root = os.path.dirname(ffmpeg_bin) | ||
ffmpeg_include_dir = os.path.join(ffmpeg_root, 'include') | ||
ffmpeg_library_dir = os.path.join(ffmpeg_root, 'lib') | ||
print("ffmpeg include path: {}".format(ffmpeg_include_dir)) | ||
print("ffmpeg library_dir: {}".format(ffmpeg_library_dir)) | ||
|
||
# TorchVision base decoder + video reader | ||
video_reader_src_dir = os.path.join(this_dir, 'torchvision', 'csrc', 'cpu', 'video_reader') | ||
|
@@ -360,16 +362,16 @@ def get_extensions(): | |
ffmpeg_include_dir, | ||
extensions_dir, | ||
], | ||
library_dirs=library_dirs, | ||
library_dirs=[ffmpeg_library_dir] + library_dirs, | ||
libraries=[ | ||
'avcodec', | ||
'avformat', | ||
'avutil', | ||
'swresample', | ||
'swscale', | ||
], | ||
extra_compile_args=["-std=c++14"], | ||
extra_link_args=["-std=c++14"], | ||
extra_compile_args=["-std=c++14"] if os.name != 'nt' else ['/std:c++14', '/MP'], | ||
extra_link_args=["-std=c++14" if os.name != 'nt' else '/std:c++14'], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The flag is useless at linking stage for MSVC. |
||
) | ||
) | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need
pytorch
here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I think I know the reason. We are using
ffmpeg
from the pytorch channel.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to be sure, this means that if there is a package under
pytorch-nightly
andpytorch
, the one frompytorch-nightly
is picked as it comes first in the priority, right?