Skip to content
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

Stuck on "analyzing audio" #72

Open
0x5066 opened this issue Apr 28, 2023 · 5 comments
Open

Stuck on "analyzing audio" #72

0x5066 opened this issue Apr 28, 2023 · 5 comments

Comments

@0x5066
Copy link

0x5066 commented Apr 28, 2023

When running python3 stammer.py SteamedHams.mp4 OnJulySecond1988.wav onjuly.mp4, the video is processed to have it's frames dumped into memory, but when it comes time to read the audio (of what?) and analyzing it, the process just gets stuck doing nothing using up one core and is unkillable by doing Ctrl+C.

Calculating video length
Separating video frames
frame=    0 fps=0.0 q=0.0 size=       0kB time=-577014:32:22.77 bitrate=  -0.0kb
frame= 4047 fps=245 q=-0.0 Lsize=N/A time=00:02:48.75 bitrate=N/A speed=10.2x    
reading audio
analyzing audio

This is the current console output.
https://files.catbox.moe/79n9ks.wav
And this is the file "OnJulySecond1988.wav", am I doing something wrong?

@hello10293
Copy link

Maybe try using a MP3 file instead of WAV?

@Firepal
Copy link
Collaborator

Firepal commented May 2, 2023

@hello10293 This is unrelated to audio formats. When it's "reading audio", it's reading the audio of both files into memory as WAV, regardless of the audio format contained in the input. This is how Stammer matches frames by audio.


Unfortunately, right now the analyzing step can be extremely slow for long inputs, as it is completely single-threaded and does looped operations to match the frequencies of the entirety of both inputs.

It's probably possible to have threads working on chunks of the modulator input, to compare against the entirety of the carrier input. I'd like to experiment with that

@Firepal
Copy link
Collaborator

Firepal commented May 2, 2023

Actually, kinda stumped. There is supposed to be a progress string being printed...
I'll have to look into this later, because a two minute carrier and a 30-sec modulator should not exhibit this.

@0x5066
Copy link
Author

0x5066 commented May 2, 2023

I do have ffmpeg installed, so there shouldn't be any issues seeing as it does extract the frames.
I did test other formats, exported to 44khz, seeing if it did have problems with 22khz audio... I came around to the same result.

@Firepal
Copy link
Collaborator

Firepal commented May 2, 2023

The input always gets converted to the same sample rate internally by stammer anyway

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants