Skip to content

Tests: Add video samples#23

Closed
mkchoi212 wants to merge 3 commits intovideolan:masterfrom
mkchoi212:sample-video
Closed

Tests: Add video samples#23
mkchoi212 wants to merge 3 commits intovideolan:masterfrom
mkchoi212:sample-video

Conversation

@mkchoi212
Copy link
Contributor

@mkchoi212 mkchoi212 commented Jul 5, 2018

4 sample videos have been downloaded and added.
Each video is about 3-5 seconds for the total size of 1.5 MB.

All videos have been downloaded from https://vimeo.com/user32335610 and are under the Creative Commons Public Domain Dedication license.

After downloading the clips, I shortened the videos and changed the file formats to diversify the sample.

@mkchoi212 mkchoi212 force-pushed the sample-video branch 5 times, most recently from d279284 to 3f33047 Compare July 6, 2018 04:33
@fkuehne
Copy link
Contributor

fkuehne commented Jul 8, 2018

Is it possible to store those videos online (we can provide storage space) and download them on-the-fly so we don't need to add so much binary data to the git?

@mkchoi212
Copy link
Contributor Author

mkchoi212 commented Jul 9, 2018

Good idea. If you could upload them to a server and provide me a link to them, that would be great!


# URL and desired file names of four videos to be downloaded
VIDEOS = [
('https://www.sample-videos.com/video/mp4/240/big_buck_bunny_240p_1mb.mp4', 'bird.m4v'),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These links must be updated :D

@carolanitz
Copy link
Member

if we upload it somewhere we have the same issues as in the mainrepo which is tests intermittedly failing because of slow connection or failing connection and if the tests are not reliable they're useless

@fkuehne
Copy link
Contributor

fkuehne commented Jul 9, 2018

Then we should have a git submodule for the files. Adding 6MB of binary blobs to the git just for testing will increase download time and used disk space for everyone, so it would be nicer to optionalize this.

@carolanitz
Copy link
Member

Can we look into best practices for this usecase? We're not the only ones who deal with this problem so i'd like to know how other projects handle this case

@jbkempf
Copy link
Contributor

jbkempf commented Jul 9, 2018

Git-LFS is an option, but a pain to synchronize between repos.

The other is a local cache from distant files, like the contrib tarballs (SHA-512) and is probably the simplest.

@carolanitz
Copy link
Member

Git-LFS is for large files, we're talking 1,5 MB here and isn't absolutely common to check in files for testing into a repo ?

@carolanitz
Copy link
Member

btw don't get me wrong, this is absolutely a valid point that we might unnecessarily enlarge our repository here. I could've sworn though that checking test data into your repository is common practice so I didn't even second guess it.

@mkchoi212 mkchoi212 force-pushed the sample-video branch 2 times, most recently from e22a8c3 to e02937d Compare July 17, 2018 01:12

# URL and desired file names of videos to be downloaded
VIDEOS = [
('https://www.sample-videos.com/video/mp4/240/big_buck_bunny_240p_1mb.mp4', 'bird.m4v'),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These links will be replaced by links for code.v.o once available

@carolanitz
Copy link
Member

could you rebase this on master ? or does circleci failing because of something else ?

@mkchoi212
Copy link
Contributor Author

The PR for TestAssets hasn’t been merged yet :(

I’ll ping thresh

@mkchoi212 mkchoi212 force-pushed the sample-video branch 3 times, most recently from 555d465 to 5b08a75 Compare July 25, 2018 09:44
@mkchoi212 mkchoi212 force-pushed the sample-video branch 5 times, most recently from 1c012ef to 0fb0bf3 Compare July 25, 2018 13:51
@mkchoi212
Copy link
Contributor Author

From Twitter, it seems like loading the videos from the test bundle after being downloaded is the best way to go; which is how this PR is setup.

Pros are

  • Tests can't start if the assets can't be downloaded from code.v.o/TestAssets
    • This is good because if we don't load the videos from the bundle, the tests will start and fail with messages like "can't open file x"
  • Buying into Xcode's infra

Cons are

  • Minor complexity during initial test run
  • Additional files added to .pbxproj

@carolanitz
Copy link
Member

merged with commit aa98dd3 &&
commit 1be28e1 &&
commit 458b355

@carolanitz carolanitz closed this Jul 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants