nadermx / backgroundremover

Background Remover lets you Remove Background from images and video using AI with a simple command line interface that is free and open source.
https://www.backgroundremoverai.com
MIT License
6.46k stars 538 forks source link

video processing not working for cli and demo website #11

Closed ghost closed 1 year ago

ghost commented 2 years ago

Hi,

Hope you are all well !

I gave a try to your repository today and I noticed that it is not generating videos and gifs.

Please check the following colab to test (2 last cells): https://colab.research.google.com/drive/1tDoKlSoARB3U-ck6C-1eU3Uj04-A8wW6?usp=sharing

Thanks for any insights or inputs ont that problem

Cheers, Luc Michalski

nadermx commented 2 years ago

The colab code, seem to use a ffmpeg version under 4.4, please update it to 4.4+ and try again.

nadermx commented 2 years ago

And also, when you say the demo site wasn't making one? It sometimes takes a bit, but I just tested it and it's working fine. Of course there has to be a object it can focus on, if not the file returns 404, but otherwise if within the first 5 seconds of your video (on the site, command line does hole video) then it will render whatever without the background.

ghost commented 2 years ago

Hi,

Thanks for your reply, I updated the colab with ffmpeg 4.4. Link: https://colab.research.google.com/drive/1QuYModj9EzKXhfKtL3eZphEYqIkDuwrf?usp=sharing

I managed to generated the video over a video: https://user-images.githubusercontent.com/1963546/132939436-c0a8fc50-c537-4f1b-9248-de08de131ea2.mov

But I have a weird output for the one with image background with video: https://user-images.githubusercontent.com/1963546/132939449-eacb5923-7a7b-4e50-828e-ae611cbfe936.mov

I will create a cool colab for your project this week-end. :-)

Cheers, Luc Michalski

nadermx commented 2 years ago

That isn't documented yet, like the flask api server, since it's not finished. I'm waiting on some help on this superuser question, https://superuser.com/questions/1651866/ffmpeg-automatically-scale-image-then-overlay-video-onto-image-in-one-step

ghost commented 2 years ago

why do n't you convert the image background to video of the length of the input video ? then you can re-use your overlay rule from video2video

nadermx commented 2 years ago

That's clever. I'll mess around with it later this month, when I close one other issue

nadermx commented 1 year ago

I will fix video over lay on this commit

nadermx commented 1 year ago

You can try and update backgroundremover now to see if I fixed it.