garymooney / qmuvi

qMuVi - A python package that converts quantum circuits into audiovisual experiences, bridging the gap between complex quantum computations and human perception. Render music videos that reveal the evolution of quantum states during algorithm processing, making quantum computing more intuitive and accessible.
https://garymooney.github.io/qmuvi/
GNU Lesser General Public License v2.1
14 stars 4 forks source link

Embed video samples into md and remove all samples from repo #22

Closed garymooney closed 1 year ago

garymooney commented 1 year ago

The files in _generatedsamples take up a lot of space and are less important now that we have the _qmuvihighlights.mp4 video. Although, it would still be nice to have a place to show off what the latest generated videos look and sound like. We can convert the ones we want to keep to .wasm (using ffmpeg?) and add them to a .md file in the root of the repo called _qmuvisamples.md, or we can create multiple .md files to help organise the videos, in which case we could put them in a folder called _qmuvigallery.

Once the _generatedsamples folder is removed, rename the demos folder to examples.

If you're not sure which videos to keep, you can just generate output for the actual quantum algorithms: qft3.py, and grover_cmaj_noisy.py. Also it would be good to add one that has coherent noise, but this is not required at the moment. All of the outputted videos should have a .py script that exactly reproduces it, so that updating the videos to the latest version in the future is simple.

SamTonetto commented 1 year ago

I created a branch called "samples_page". So far it just adds a README.md file to generated_samples/, which contains github-hosted webm-converted videos from videos/. The advantage of calling it README.md is that github auto-displays it when you open the subfolder, but downside is the name isn't descriptive... . Haven't removed anything yet - not sure if we wanted to keep the relatively small midis/ or mp3s/ folders.

The videos were converted to webm because the github hosting limit seems to be 10MB. These commands were used to convert mp4->webm: (ditto for avi)

ffmpeg  -i input.mp4  -b:v 0  -crf 30  -pass 1  -an -f webm -y /dev/null
ffmpeg  -i input.mp4  -b:v 0  -crf 30  -pass 2  output.webm

Sidenote: Although videos/ does take up a lot of space (173MB), the bulk of the space in the repo seems to be taken up by the .git folder (>400MB). So may need to clean up git history somehow.

garymooney commented 1 year ago

Nice!

I think we can keep the midis and remove the mp3s.

Can you rename the generated_samples folder to qmuvi_gallery or something similar. Put the qmuvi_highlights.mp4 in the folder too.

We can delete the existing video samples (a lot of them are out of date anyway). The ones you have in the readme should be replaced by new generated videos. Perhaps there should be a video for each example script, or we can make a specific script in the gallery folder that generates all of the samples. But we can create a new issue for this, since we should modify the code to allow the option for a single midi output again (it was changed to be 1 mid file for each track)

The advantage of calling it README.md is that github auto-displays it when you open the subfolder, but downside is the name isn't descriptive.

I guess we could organise them by folder name instead if we want to later.