-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Send Video Error yowsup #1689
Comments
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1 Cleaning up... |
Remove from setup.py ffvideo dependency and try again. |
How to make this ? |
This is the same issues as #1662 and #1656.
Somehow it has to do with both, yowsup and ffvideo itself. Did you find a solution? Or do you think if I get ffvideo installed it will work? Because nevertheless DownloadableMediaMessageProtocolEntity has no |
Ok, one hour later: I got it now. It is indeed 2 seperate issues. FirstfromFilePath was not updated with 0f18179 by @tgalal in SecondFFVideo's newest version is currently For both problems I will add a reference to an easy fix tomorrow. |
Here are the fixes: FirstGitHub repository Dargmuesli/yowsup. SecondBitBucket repository Dargmuesli/FFVideo. You can download and install them as usual with |
If - for some reason - importlib's import_module does not work and you still get the same import error, change from ffvideo import VideoStream class VideoTools:
@staticmethod
def getVideoProperties(videoFile):
# with FFVideoOptionalModule() as imp:
# VideoStream = imp("VideoStream")
s = VideoStream(videoFile)
return s.width, s.height, s.bitrate, s.duration #, s.codec_name
@staticmethod
def generatePreviewFromVideo(videoFile):
#with FFVideoOptionalModule() as imp:
#VideoStream = imp("VideoStream")
fd, path = tempfile.mkstemp('.jpg')
stream = VideoStream(videoFile)
stream.get_frame_at_sec(0).image().save(path)
preview = ImageTools.generatePreviewFromImage(path)
os.remove(path)
return preview But note that captions for videos are currently not send. |
ERROR:yowsup.common.optionalmodules:ffvideo import failed
ERROR:yowsup.layers.protocol_media.mediauploader:Error occured at transfer type object 'DownloadableMediaMessageProtocolEntity' has no attribute 'fromFilePath'
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.5.0-py2.7.egg/yowsup/layers/protocol_media/mediauploader.py", line 138, in run
self.successCallback(sourcePath, self.jid, result["url"])
File "/home/pi/Desktop/Projeto3/yowCli/layer.py", line 265, in
successFn = lambda filePath, jid, url: self.doSendMedia(mediaType, filePath, url, jid, resultRequestUploadIqProtocolEntity.getIp(), caption)
File "/home/pi/Desktop/Projeto3/yowCli/layer.py", line 251, in doSendMedia
entity = VideoDownloadableMediaMessageProtocolEntity.fromFilePath(filePath, url, ip, to, caption = caption)
File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.5.0-py2.7.egg/yowsup/layers/protocol_media/protocolentities/message_media_downloadable_video.py", line 134, in fromFilePath
entity = DownloadableMediaMessageProtocolEntity.fromFilePath(path, url, DownloadableMediaMessageProtocolEntity.MEDIA_TYPE_VIDEO, ip, to, mimeType, preview)
AttributeError: type object 'DownloadableMediaMessageProtocolEntity' has no attribute 'fromFilePath'
ERROR:layer:Upload file /home/pi/Desktop/Projeto3/videos/video.avi to https://mmi478.whatsapp.net/u/o8DiDg86ruOU9kNCf3v6nf5es8sABTdMTAqVWA/AokDljlXhMDs2gjTHXPgQb3JqeBDAg66l_sHB26LmBBh for XXMYNUMBER@s.whatsapp.net failed!
Please Help!
The text was updated successfully, but these errors were encountered: