Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libmedia_codec not installing #46

Open
MrCampbellDuchess opened this issue May 26, 2021 · 6 comments
Open

libmedia_codec not installing #46

MrCampbellDuchess opened this issue May 26, 2021 · 6 comments

Comments

@MrCampbellDuchess
Copy link

MrCampbellDuchess commented May 26, 2021

As the title suggests when attempt to use the sdk like this:

from robomaster import robot

I get this:
Traceback (most recent call last):
File "/home/admin/bottest.py", line 1, in
from robomaster import robot
File "/home/admin/.local/lib/python3.7/site-packages/robomaster/robot.py", line 31, in
from . import camera
File "/home/admin/.local/lib/python3.7/site-packages/robomaster/camera.py", line 25, in
from . import media
File "/home/admin/.local/lib/python3.7/site-packages/robomaster/media.py", line 21, in
import libmedia_codec
ModuleNotFoundError: No module named 'libmedia_codec'

I can see it's in the SDK download here on github but I can't get it to work.

Python 3.7.3 on rpi and openCV is installed.

@JohnieBraaf
Copy link

You need do do pip install robomaster or build the codec whl file yourself, see my open pull request.

-- #49
-- https://github.com/JohnieBraaf/RoboMaster-SDK

@Moku151
Copy link

Moku151 commented Mar 4, 2022

Hi!
I do have the same problem and unfortunately this Pull Request is not merged yet.
Can I Download this Code and the SDK will work or do i have to setup something?
Thank you for your answer!

@JohnieBraaf
Copy link

JohnieBraaf commented Mar 4, 2022

Yes, you can use https://github.com/JohnieBraaf/RoboMaster-SDK for now, I have merged the latest upstream commits

@aftersomemath
Copy link

On Ubuntu linux you can can install libmedia-codec using what is currently on the master branch of this repository. A from scratch installation of the SDK can be done using the following commands:

cd RoboMaster-SDK
pip install .
cd lib/libmedia_codec
pip install .

I had to install the libopus header's to get the libmedia_codec package to compile on Ubuntu, sudo apt install libopus-dev.

Getting a windows build to work should be possible as well.

@whydahuzi
Copy link

\lib\site-packages\robomaster\media.py", line 32, in init
self._video_decoder = libmedia_codec.H264Decoder()
AttributeError: module 'libmedia_codec' has no attribute 'H264Decoder'

@hahasa11
Copy link

C:\Users\hahyu\RoboMaster-SDK>python test_robo_connection.py
Traceback (most recent call last):
File "C:\Users\hahyu\RoboMaster-SDK\test_robo_connection.py", line 1, in
from robomaster import robot
File "C:\Users\hahyu\AppData\Local\Programs\Python\Python310\lib\site-packages\robomaster\robot.py", line 31, in
from . import camera
File "C:\Users\hahyu\AppData\Local\Programs\Python\Python310\lib\site-packages\robomaster\camera.py", line 25, in
from . import media
File "C:\Users\hahyu\AppData\Local\Programs\Python\Python310\lib\site-packages\robomaster\media.py", line 21, in
import libmedia_codec
ImportError: DLL load failed while importing libmedia_codec: 지정된 모듈을 찾을 수 없습니다.

C:\Users\hahyu\RoboMaster-SDK>
I buid it succesfully without error code but it didn't make "libmedia_codec.dll" Chatgpt says thats the problem that i can't control robomaster, is it right? than how to get libmedia_codec.dll.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants