Rob-- / SnapWrap

Wrapper for the unofficial and undocumented Snapchat API (using Snapchat's latest endpoints).
MIT License
57 stars 7 forks source link

Video file issues ffmpeg #10

Closed ObjectiveTruth closed 9 years ago

ObjectiveTruth commented 9 years ago

FFMPEG is having a tough time identifying certain videos and thus can't be uploaded/saved/manipulated. Any idea on how to fix this?

Its not all videos, so far its 2 of my friends who 1 use an iphone4 and the other uses a Oneplus One.

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x38060c0] Format mov,mp4,m4a,3gp,3g2,mj2 detected only with low score of 1, misdetection possible!
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x38060c0] moov atom not found
username_595151426445676456r.mp4: Invalid data found when processing input

P.S. Great job on the library!

ObjectiveTruth commented 9 years ago

Fixed this, the issue was that sometimes the .mp4 is compressed. I wrote a script that extracts the appropriate file and renames the original. I call it before the subprocess ffmpeg in save story and now all the videos work

Rob-- commented 9 years ago

Oh sweet, thanks! If you want to make a pull request, I'll edit the library to detect zipped videos and then run it through the extractor.

ObjectiveTruth commented 9 years ago

I just pulled the newest changes to `master to add my files and I can't get the example to run.. tells me this:

Traceback (most recent call last):                                                                                    │~
  File "example.py", line 14, in <module>                                                                             │~
    bot = CustomBot(*["~~USERNAME~~", "~~PASSWORD~~"])                                                                   │~
  File "/home/miguel/SnapWrap/SnapWrap/snapchat.py", line 12, in __init__                                             │~
    info = self.client.login(username, password)                                                                      │~
  File "/home/miguel/SnapWrap/SnapWrap/Client/__init__.py", line 128, in login                                        │~
    'Authorization' : 'AidLogin 4002600885140111980:7856388705669173275'                                              │~
  File "/usr/local/lib/python2.7/dist-packages/requests-2.6.0-py2.7.egg/requests/api.py", line 108, in post           │~
    return request('post', url, data=data, json=json, **kwargs)                                                       │~
  File "/usr/local/lib/python2.7/dist-packages/requests-2.6.0-py2.7.egg/requests/api.py", line 50, in request         │~
    response = session.request(method=method, url=url, **kwargs)                                                      │~
  File "/usr/local/lib/python2.7/dist-packages/requests-2.6.0-py2.7.egg/requests/sessions.py", line 464, in request   │~
    resp = self.send(prep, **send_kwargs)                                                                             │~
  File "/usr/local/lib/python2.7/dist-packages/requests-2.6.0-py2.7.egg/requests/sessions.py", line 576, in send      │~
    r = adapter.send(request, **kwargs)                                                                               │~
  File "/usr/local/lib/python2.7/dist-packages/requests-2.6.0-py2.7.egg/requests/adapters.py", line 431, in send      │~
    raise SSLError(e, request=request)                                                                                │~
requests.exceptions.SSLError: hostname 'android.clients.google.com' doesn't match either of '*.google.com', '*.android│~
.com', '*.appengine.google.com', '*.cloud.google.com', '*.google-analytics.com', '*.google.ca', '*.google.cl', '*.goog│~
le.co.in', '*.google.co.jp', '*.google.co.uk', '*.google.com.ar', '*.google.com.au', '*.google.com.br', '*.google.com.│~
co', '*.google.com.mx', '*.google.com.tr', '*.google.com.vn', '*.google.de', '*.google.es', '*.google.fr', '*.google.h│~
u', '*.google.it', '*.google.nl', '*.google.pl', '*.google.pt', '*.googleadapis.com', '*.googleapis.cn', '*.googlecomm│~
erce.com', '*.googlevideo.com', '*.gstatic.cn', '*.gstatic.com', '*.gvt1.com', '*.gvt2.com', '*.metric.gstatic.com', '│~
*.urchin.com', '*.url.google.com', '*.youtube-nocookie.com', '*.youtube.com', '*.youtubeeducation.com', '*.ytimg.com',│~
 'android.com', 'g.co', 'goo.gl', 'google-analytics.com', 'google.com', 'googlecommerce.com', 'urchin.com', 'youtu.be'│~
, 'youtube.com', 'youtubeeducation.com'  

I masked Username and password above, I'm putting valid credentials.

Using Ubuntu Server 14, was working with my previous branch