Open 1ncoQAQ opened 6 months ago
Hi,
I'm having the same issue.
It appears that for me the while-statement below does not evaluate to False
anymore at the very end and thus it keeps sleeping:
Are both of you trying to convert to mp4? Can I see the full command?
I am. For example with:
python -m backgroundremover.cmd.cli -i "short.mp4" -tv -o "output.mov"
I've tried .mov
files as input as well, by coverting .mp4
's first:
ffmpeg -i short.mp4 -f mov short.mov
In this case the script runs more smoothly, but in the delivers a video that isn't openable by quicktime (I'm on macOS, m1). It does open in DaVinci Resolve, but just shows a sort of distored/damaged input video. This is another issue, but just FYI.
It won't work if you are doing a video to MP4. MP4 doesn't have transparent background. When trying video try the human algorithm. Too
On Fri, Dec 22, 2023, 1:27 AM Jordi Wippert @.***> wrote:
I am. For example with:
python -m backgroundremover.cmd.cli -i "short.mp4" -tv -o "output.mov"
I've tried .mov files as input as well, by coverting .mp4's first:
ffmpeg -i short.mp4 -f mov short.mov
In this case the script runs more smoothly, but in the delivers a video that isn't openable by quicktime (I'm on macOS, m1). It does open in DaVinci Resolve, but just shows a sort of distored/damaged input video. This is another issue, but just FYI.
— Reply to this email directly, view it on GitHub https://github.com/nadermx/backgroundremover/issues/117#issuecomment-1867334678, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABYACXDTGDVLI2D5CMOKKCDYKUY5RAVCNFSM6AAAAABAZK7K3WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRXGMZTINRXHA . You are receiving this because you commented.Message ID: @.***>
I think I figured it out. The input video is shot with my smartphone. Maybe my phone uses a different encoding standard, which causes some frames can not be recognized by backgroundremover, so the process stuck.
To fix this, I simply convert my video using ffmpeg once:
ffmpeg -i originalVideo.mp4 fixedVideo.mp4
Then use backgroundremover to deal with the fixed video, this time the program works.
Thank you for the reply Jordi! you inspired me to preprocess the video first before throwing it into backgroundremover.
Maybe we can add this preprocessing to the workflow to make sure backgroundremover can handle the video correctly?
That's actually not a bad idea although maybe more as an exception, there has to be a way to figure out if it's compatible or not and hten use preprocessing or not.
On Fri, Dec 22, 2023 at 2:26 PM 1nco @.***> wrote:
I think I figured it out. The input video is shot with my smartphone. Maybe my phone uses a different encoding standard, which causes some frames can not be recognized by backgroundremover, so the process stuck. To fix this, I simply convert my video using ffmpeg once: ffmpeg -i originalVideo.mp4 fixedVideo.mp4 Then use backgroundremover to deal with the fixed video, this time the program works. Thank you for the reply Jordi! you inspired me to preprocess the video first before throwing it into backgroundremover. Maybe we can add this preprocessing to the workflow to make sure backgroundremover can handle the video correctly?
— Reply to this email directly, view it on GitHub https://github.com/nadermx/backgroundremover/issues/117#issuecomment-1868047992, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABYACXBHWDNVBF6TWS6LOTLYKXUHNAVCNFSM6AAAAABAZK7K3WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRYGA2DOOJZGI . You are receiving this because you commented.Message ID: @.***>
Hello, Johnathan. Thank you very much for sharing this amazing project! I'm running into issue when converting the video
My video has 9723 frame, the progress stop at 9706 and not process, I'm not sure what cause that, if you could lend a hand I'd be very grateful!
OS: windows10 python: 3.10.9 torch: 2.1.2 cuda: 11.8 ffmpeg: 2023-12-14-git-5256b2fbe6-full_build