scherroman / mugen

A command-line music video generator based on rhythm
MIT License
224 stars 39 forks source link

Stuck at 45/46 #19

Closed excenter closed 5 years ago

excenter commented 5 years ago

am I doing something wrong here? It looks like I configured it in such a way there's 1 too few video events available, but I'm not sure if I just did it bad.

I'm stuck in a loop that I tried to capture below (sorry for the duplicate sub-progress-bar) and it just does the sub-task that has 398 items over and over again. I've been here for 10 minutes, but it feels like I've been here all year. send for help.

(mugen) bash-3.2$ mugen create -a bright-lights.wav -vn LostInTranslation.mkv -ss -es 1/8 -aem onsets -bm weak_beats -v output.mkv

Weights
------------
output: 100.00%

Analyzing audio...

Events:
[<EventList 0-44 (45), type: Onset, selected: False>]

Generating music video from video segments and audio...
 98%|███████████████████████████████████▏| 45/46 [02:13<00:01,  1.94s/it]

t:   0%|                               | 0/398 [00:00<?, ?it/s, now=None]
t:  93%|██████████████████▋ | 372/398 [00:03<00:00, 111.91it/s, now=None]
excenter commented 5 years ago

UPDATE: I trimmed the audio file to see if it was too long for the video, and the numbers have changed, but the result is the same:

(mugen) bash-3.2$ mugen create -a bright-lights.wav -vn LostInTranslation.mkv -ss -es 1/8 -aem onsets -bm weak_beats -v output.mkv

Weights
------------
output: 100.00%

Analyzing audio...

Events:
[<EventList 0-43 (44), type: Onset, selected: False>]

Generating music video from video segments and audio...
 98%|███████████████████████████████████▏| 44/45 [01:21<00:02,  2.48s/it]
t:  97%|███████████████████▎| 337/348 [00:03<00:00, 117.14it/s, now=None]
excenter commented 5 years ago

trying it without options until something works. so far not resolving it changes are:

this worked

remove -bm weak_beats mugen create -a bright-lights.wav -v LostInTranslation.mkv -es 1/4 -aem onsets -v output.mkv

scherroman commented 5 years ago

Hey excenter sorry you had to go at this alone.

I didn't see any issues with -bm weak_beats, but I think you might be running into issues because you're mixing up arguments. The -v argument is shorthand for --video-sources and are the video sources that segments will be taken from to make the video. -vn is shorthand for --video-name which is the name mugen will give to the video file it outputs. In the first case above it looks like you're setting your video source -v to output.mkv instead of the movie LostInTranslation.mkv. In the second case you're setting -v twice, and the second is likely overriding your first.

The most common reason it would go on forever doing the same subtask is that your video source can't find any segments that pass the default filters not_is_repeat, not_has_cut, and not_has_low_contrast, and so it just keeps going on trying in vain. The not_is_repeat and not_has_cut filters would definitely cause this if your video source was especially short and/or with little to no time between scene changes. The first one throws out segments that have already been used, and the latter throws out segments where there are scene changes (to keep the music video synced to the beat). This would definitely happen if you tried to use a video that is shorter than your music or use a music video that was generated by mugen as a video source!

Your mugen command should rather look like this:

mugen create -a bright-lights.wav -v LostInTranslation.mkv -ss -es 1/8 -aem onsets -bm weak_beats -vn output.mkv

Note that the video filters can be overridden through the --video-filters, --exclude-video-filters, and --include-video-filters options found in the help menu.