morrolinux / simple-ehm

A simple tool for a simple task: remove filler sounds ("ehm") from pre-recorded speeches. AI powered.
MIT License
228 stars 19 forks source link

Stuck in the cutting - merging process #4

Closed RCapolungo closed 3 years ago

RCapolungo commented 3 years ago

Hello,

i'm having a problem during the cutting - marging phase. i'm using windows 10 as OS, ffmpeg 4.2.2 and python 3.8.6 . i don't know if it's a ffmpeg or a program problem but it gets stuck after creating 2 of the 6 instances and only one working (it stop working after cutting 6 packages).

i'll leave here a photo of the console.

Screenshot 2020-12-13 144130

pokemaniac05 commented 3 years ago

May you send here RAM size, CPU type, Win10 build and other useful information to reproduce this issue? Did you install all requirements from requirements. md? May you install the latest version of ffmpeg (4.3.1)? Did you compile ffmpeg and/or python from source or download the precompiled version from official websites.

RCapolungo commented 3 years ago

Sure. 16 GB RAM AMD Ryzen 5 3600 Windows 10 build 18363

All requirements has been installed. I also update ffmpeg to 4.3.1 and unfortunately the problem is still there. ffmpeg is precompiled, while i got python from the installer on https://www.python.org/downloads/ so at the end it should be precompiled too.

morrolinux commented 3 years ago

What's your CPU and memory usage during "stuck" execution? For how long did you see it stuck before giving up? The ffmpeg process stdout and stderr is suppressed in https://github.com/morrolinux/simple-ehm/blob/11e90f9eb25f03209ef9db077da7bf708439666a/simple_ehm-runnable.py#L243 You can remove stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE to let the shell print watever ffmpeg is outputting and maybe there's some useful clue to what's really happening and why the process is stuck

RCapolungo commented 3 years ago

I followed your suggestion and removed these arguments and it starts working fine until last frame :( idk why but when arrives the last frame ffmpeg stops working.

This is a screenshot of the task manager. Screenshot 2020-12-14 143514

This is a file of the subprocess output.txt

morrolinux commented 3 years ago

For how long did you see it stuck before giving up?

RCapolungo commented 3 years ago

Almost half an hour

morrolinux commented 3 years ago

Yeah, try to let it go for 1 hour or so just to be sure it's not an ffmpeg (slow) seek issue. Also try with a different video file and see if anything changes

RCapolungo commented 3 years ago

Ok, so i let it go for 2 h 45 min and nothing happend, the last ffmpeg process was stuck at 0% of CPU usage for the whole time. I tried on multiple files and i noticed that if they last less than 10 minutes the last ffmepg process ends. i'm not sure what is the duration limit before the process stops working but for sure for 1 h files it get stuck

morrolinux commented 3 years ago

That's odd... But now that I think about it, you probably should remove shell output piping from the merge command which is on another line

Il mar 15 dic 2020, 15:27 RCapolungo notifications@github.com ha scritto:

Ok, so i let it go for 2 h 45 min and nothing happend, the last ffmpeg process was stuck at 0% of CPU usage for the whole time. I tried on multiple files and i noticed that if they last less than 10 minutes the last ffmepg process ends. i'm not sure what is the duration limit before the process stops working but for sure 1 h files get stuck

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/morrolinux/simple-ehm/issues/4#issuecomment-745322117, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE22U3SL5B3TH7TEN32LHFLSU5W33ANCNFSM4UZQXCYQ .

RCapolungo commented 3 years ago

Yes, the problem was the stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE in this lines. https://github.com/morrolinux/simple-ehm/blob/11e90f9eb25f03209ef9db077da7bf708439666a/simple_ehm-runnable.py#L82 https://github.com/morrolinux/simple-ehm/blob/11e90f9eb25f03209ef9db077da7bf708439666a/simple_ehm-runnable.py#L243 https://github.com/morrolinux/simple-ehm/blob/11e90f9eb25f03209ef9db077da7bf708439666a/simple_ehm-runnable.py#L266

i've just removed them and now it's working perfectly

Thanks for your help