LivePortrait icon indicating copy to clipboard operation
LivePortrait copied to clipboard

Error encoder 'libx264' when writing animation on Mac OS X silicon

Open Gohloum opened this issue 1 year ago • 4 comments

My local Installation was throwing errors when clicking in the interface. I installed the proposed solutions at this post https://github.com/gradio-app/gradio/pull/9277#issuecomment-2332911070 which resolved the errors.

Now that I am past those errors I am having an encoder error once animation is complete:

Writing ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0% -:--:--[vost#0:0 @ 0x11d607500] Unknown encoder 'libx264' [vost#0:0 @ 0x11d607500] Error selecting an encoder Error opening output file /Users/tj/LivePortrait/animations/s7--d0_concat.mp4. Error opening output files: Encoder not found

Any idea how to address this?

Gohloum avatar Oct 04 '24 15:10 Gohloum

The same issue for me, recompiling ffmpeg with all the options didn't help

iliavls avatar Oct 12 '24 14:10 iliavls

Installing ffmpeg from the Conda Forge solve this issue.

conda install -c conda-forge ffmpeg

amarduwal avatar Oct 26 '24 13:10 amarduwal

change code in video.py

replace libx264 by libopenh264 everywhere

rerun PYTORCH_ENABLE_MPS_FALLBACK=1 python inference.py

jlzhou avatar Jan 23 '25 05:01 jlzhou

change code in video.py

replace libx264 by libopenh264 everywhere

rerun PYTORCH_ENABLE_MPS_FALLBACK=1 python inference.py

太棒了,这个解决方式很有效。 我是Mac m1

kj-1024 avatar May 23 '25 06:05 kj-1024