# OpenCV Dependency on x264

**URL:** <https://forum.opencv.org/t/opencv-dependency-on-x264/6713>\
**Category:** Python\
**Tags:** ffmpeg, videoio, build\
**Created:** [December 13, 2021, 6:41pm UTC](https://forum.opencv.org/t/opencv-dependency-on-x264/6713 "2021-12-13T18:41:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Max\_Zheng](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/max_zheng/32/1684_2.png) [@Max\_Zheng](https://forum.opencv.org/u/Max_Zheng)\
**Post date:** [December 13, 2021, 6:41pm UTC](https://forum.opencv.org/t/opencv-dependency-on-x264/6713/1 "2021-12-13T18:41:54Z")

</div>

Hi. I noticed that in a conda environment, opencv depends on x264. Since x264 is a gpl package, I’m wondering which functionalities in opencv uses x264, and if there is a way for us to use opencv without x264.

---

<div class="post-metadata">

**Author:** ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)\
**Post date:** [December 13, 2021, 6:48pm UTC](https://forum.opencv.org/t/opencv-dependency-on-x264/6713/2 "2021-12-13T18:48:06Z")

</div>

> [@Max\_Zheng](#):
>
> opencv depends on x264

where exactly do you see this ?  
are you aware, that opencv does not maintain any conda builds ?

---

<div class="post-metadata">

**Author:** ![Max\_Zheng](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/max_zheng/32/1684_2.png) [@Max\_Zheng](https://forum.opencv.org/u/Max_Zheng)\
**Post date:** [December 13, 2021, 6:52pm UTC](https://forum.opencv.org/t/opencv-dependency-on-x264/6713/3 "2021-12-13T18:52:11Z")

</div>

Hmmm that’s what I got by installing opencv with conda. I guess I need to talk to the conda-forge folks then.

Does opencv depend on ffmpeg? I think the x264 dependency might come from ffmpeg.

---

<div class="post-metadata">

**Author:** ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)\
**Post date:** [December 13, 2021, 6:55pm UTC](https://forum.opencv.org/t/opencv-dependency-on-x264/6713/4 "2021-12-13T18:55:43Z")

</div>

> [@Max\_Zheng](#):
>
> Does opencv depend on ffmpeg?

no.  
also, to my knowledge, only the h264 _encoder_ is gpl’ed.  
you could use gstreamer instead,  
and a lot of progs do not need video decoding at all

> [@Max\_Zheng](#):
>
> I guess I need to talk to the conda-forge folks then.

indeed

- List item

---

<div class="post-metadata">

**Author:** ![Max\_Zheng](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/max_zheng/32/1684_2.png) [@Max\_Zheng](https://forum.opencv.org/u/Max_Zheng)\
**Post date:** [December 13, 2021, 7:08pm UTC](https://forum.opencv.org/t/opencv-dependency-on-x264/6713/5 "2021-12-13T19:08:26Z")

</div>

Thank you for the replies!

---

<div class="post-metadata">

**Author:** ![crackwitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/crackwitz/32/14_2.png) [@crackwitz](https://forum.opencv.org/u/crackwitz)\
**Post date:** [December 13, 2021, 8:34pm UTC](https://forum.opencv.org/t/opencv-dependency-on-x264/6713/6 "2021-12-13T20:34:32Z")

</div>

OpenCV does not _depend_ on ffmpeg (hence x264) but it _can be built to use_ ffmpeg. the video I/O module uses ffmpeg as a possible backend.
