Closed GoogleCodeExporter closed 9 years ago
You can put --debug on the command line to have more info.
In the logs, there is the line:
INFO:root:TimeOut : <urlopen error timed out>
It may seem to show that it's related to some download exception. The --debug
will be verbose but should help me understand what's going on.
Original comment by patrick....@gmail.com
on 10 Dec 2010 at 1:38
Ok, i tried the --debug option and here is the output :
CHRONOS:/c/media/Videos/Films# periscope -l fr ./Welcome.avi --debug
INFO:root:Searching subtitles for Welcome.avi with langs ['fr']
INFO:root:Searching on OpenSubtitles
INFO:root:Searching on Subtitulos
INFO:root:Subtitulos writing 0 items to queue
INFO:root:Searching on Addic7ed
INFO:root:Addic7ed writing 0 items to queue
INFO:root:Searching on Podnapisi
INFO:root:Searching on TheSubDB
DEBUG:root:Searching for Welcome
INFO:root:Searching on BierDopje
DEBUG:root:dl'ing http://simple.podnapisi.net/ppodnapisi/search?sR=Welcome&sJ=8
INFO:root:BierDopje writing 0 items to queue
DEBUG:root:File hash : 45a70064b4e46e00f148e9b9ead3bbc1
DEBUG:root:Query URL :
http://api.thesubdb.com/?action=search&hash=45a70064b4e46e00f148e9b9ead3bbc1
INFO:root:TheSubDB writing 0 items to queue
DEBUG:root:{'status': '200 OK', 'seconds': 0.32, 'token':
'dc5gfirkmkhfsftlal3q91p2p1'}
DEBUG:root:query: token='dc5gfirkmkhfsftlal3q91p2p1', search='{'moviebytesize':
'735413792', 'sublanguageid': 'fre', 'moviehash': '535a2af6ef41f375'}'
DEBUG:root:Result: {'status': '200 OK', 'seconds': 0.224, 'data': False}
INFO:root:OpenSubtitles writing 0 items to queue
DEBUG:root:[]
DEBUG:root:dl'ing http://simple.podnapisi.net/ppodnapisi/search?sR=Welcom&sJ=8
DEBUG:root:[]
INFO:root:Podnapisi writing 0 items to queue
WARNING:root:**************************************************
WARNING:root:Downloaded 0 subtitles
WARNING:root:**************************************************
I checked on opensubtitles with the hash => No subtitle found. I'll try later
the same command (on the same file) from my desktop to compare the output.
PS : Thank you for your reactivity !
Original comment by zakapa...@gmail.com
on 10 Dec 2010 at 1:57
I tried using two differents way (the target is the same video file):
- Launching periscope directly from my NAS (Debian Sarge)
- Launching periscope from my Desktop (Ubuntu 10.10)
Attached to this post, you'll find the outputs for both nas and desktop.
Obviously, the movie hash is different, so i assume this is the cause of my
problem...
Original comment by zakapa...@gmail.com
on 13 Dec 2010 at 8:34
Attachments:
Do you know what architecture you've got on those two machines ? Is one 64bit
and the other 32 bits or ARM ?
Original comment by patrick....@gmail.com
on 13 Dec 2010 at 9:56
According to my memories, Ubuntu desktop 32bit is installed on the Desktop
whereas the NAS uses a SPARC processor (ARM architecture) to run Debian Sarge.
FYI, my NAS is a Netgear ReadyNas Duo
Original comment by zakapa...@gmail.com
on 13 Dec 2010 at 10:05
It's probably due to the architecture, I've only tested the hashing code on
32bit and 64bit. I may be wrong but I think SPARC is MIPS and not ARM.
I'll first need to find some documentation about the architectural differences.
Note that this only prevents you from searching on OpenSubtitles, other sources
should return results (if it exists).
Original comment by patrick....@gmail.com
on 13 Dec 2010 at 10:21
Ok, thank you for your efforts ! I was comparing the hashFile function with
hope. I noticed some little differences (see attached files) but i suppose it's
due to architecture.
If i can help testing, i'll do it with pleasure !
Original comment by zakapa...@gmail.com
on 13 Dec 2010 at 10:33
Attachments:
The differences are due to the fact that the SVN version you have is newer than
the one in the Ubuntu package (0.1.13). This change is meant to fix a similar
hash value problem for the amd64 architecture.
I've pushed the 0.1.14 version yesterday in the repository. It contains the new
hash code (and BierDopje for Dutch and English subtitles). This way, you should
have exactly the same code running on your NAS and on the desktop.
Original comment by patrick....@gmail.com
on 13 Dec 2010 at 10:40
Ok, i will update both my NAS and Desktop !
If i get some time, i'll try to investigate, even if i'm not very familiar with
Python (Java/C# developer inside ;)
Original comment by zakapa...@gmail.com
on 13 Dec 2010 at 10:54
Good news today !
Periscope is now working fine on my NAS, including the hash calculation !
To achieve this goal, i re-wrote your "hashFile" function looking at the
following code snippet :
http://bazaar.launchpad.net/~subdownloader-developers/subdownloader/trunk/annota
te/head:/modules/videofile.py#L173
Considering the licence of this project, i assume you can reuse this work if
you respect a few conditions.
For demo purposes, i wrote a small python script to compare 3 different hash
calculation methods : periscope 0.1.113, periscope 0.1.114 and
subdownloader.net. On my nas, these three methods lead to three different
results :(
The last method seems to be the good one in my case, and you'll notice it's
many times faster !
The demo script is attached to this post (if you want to try it, you'll need to
edit the first line to chose one of your video file).
I hope that helps ! thank you again for your efforts.
Original comment by zakapa...@gmail.com
on 14 Dec 2010 at 8:16
Attachments:
Does it return the same result on your 32bit desktop machine ? I'll try to run
your test on my amd64 Ubuntu, my 32bit Windows and my ARMv7 Nokia n810.
If the result are the same everywhere and correct on your NAS, I should be
using the code from subdownloader. I'll test it this evening.
In 0.1.14, I'm using the "official" one from the OpenSubtitles Wiki. It may
need to be updated:
http://trac.opensubtitles.org/projects/opensubtitles/wiki/HashSourceCodes#Python
Original comment by patrick....@gmail.com
on 14 Dec 2010 at 8:46
Some news from Bordeaux : i just ran the script from my 32bits machine (Ubuntu
powered). The three calculation ways give exactly the same hash code.
Additionally, the velocity of these methods is more difficult to see (depending
on the CPU power i suppose : 4000 bogomips for my C2D vs 182 bogomips for the
SPARC CPU of the NAS...).
By the way, as a web developer, i never faced this kind of problem based on CPU
architecture but now, i better understand some headaches encountered by my
colleagues ;)
Original comment by zakapa...@gmail.com
on 14 Dec 2010 at 6:31
Hello,
Would it be possible to merge my patch with the trunk ? I'm testing the patch
since mid december with several CPU architecture and everything is working
fine. It would help all people running your project on atypical CPU ;)
By the way, is there an official way to submit patch ? I'd be interested in
writing plugins for periscope.
Original comment by zakapa...@gmail.com
on 16 May 2011 at 7:58
Attachments:
Hi,
There are currently no official ways to submit patches, but I'm moving from SVN
to GitHub in order to ease patches and forks of Periscope.
I will add this change tonight.
Thanks
Original comment by patrick....@gmail.com
on 16 May 2011 at 8:01
r137
Original comment by patrick....@gmail.com
on 17 May 2011 at 8:54
Original issue reported on code.google.com by
zakapa...@gmail.com
on 10 Dec 2010 at 1:34