forked from srrDB/pyrescene
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
207 lines (155 loc) · 9.12 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
::
__________ _________
______ ___.__\______ \ ____ / _____/ ____ ____ ____ ____
\____ < | || __/ __ \ \_____ \_/ ____/ __ \ / \_/ __ \
| |_> \___ || | \ ___/ / \ \__\ ___/| | \ ___/
| __// ____||____|_ /\___ /_______ /\___ \___ |___| /\___ >
|__| \/ \/ \/ \/ \/ \/ \/ \/
General Information
===================
**pyReScene** is a port of ReScene .NET to the Python programming language,
but by now many new features, improvements and scripts have been added.
ReScene is a mechanism for backing up and restoring the metadata from "scene"
released RAR files. RAR archive volumes are rebuild using the stored metadata
in the SRR file and the extracted files from the RAR archive. This process
only worked on RAR files created with "Store" mode (otherwise known as
-m0 or No Compression), but since pyReScene version 0.4 this is also possible
for various other compression settings. However, it is not guaranteed that
reconstruction of compressed archives is always possible. Also a handful of
known bugs related to this still exist. pyReScene consists of multiple
related tools and scripts.
**pyReSample** is a companion to ReScene. It does for samples what ReScene does
for RARs. You can use ReSample to build a blueprint of an *AVI*, *MKV*, *MP4* or *WMV*
sample, and then use that blueprint (the .srs file) with the full video file
to recreate that sample. It contains backups of all parts of the sample file
that are not the actual track data as well as a signature that helps ReSample
locate the missing track data from the full video file.
Also *MP3* and *FLAC* music files are supported. The tags with all the meta data
are copied to the SRS file. This can be restored at another time. *fpcalc*
must be available in your path to use this feature. It can be downloaded from
https://bitbucket.org/acoustid/chromaprint/downloads. This tool creates 120s
AcoustID music fingerprints. http://acoustid.org/chromaprint
The SRS of *VOB* and *M2TS* files are very small. They serve as verification
of the sample data stream. The VOB SRS can rebuild the sample, but with
M2TS this will always fail.
**pyReScene Auto** makes it all a bit easier: one command to create an SRR file.
It does not require write access to the release directories and it can create
SRR files of your whole collection!
(Create and mount a private file share to force the read only behavior
in Windows. This way you can be absolutely sure!)
**pyReScene Usenet** is able to create SRR files from NZB files. It works by
downloading only (parts of) the segments it needs for creating an SRR file.
srr_usenet.py and other NZB related scripts are located in the usenet
directory. The compiled _yenc.so module (for more speed) can be obtained from
http://pypi.python.org/pypi/yenc/. Create a srr_usenet.cfg configuration file
in the usenet directory for easy usage. A template example file is available.
Some related external tools are included into the repository:
* **Awescript** is a Usenet downloads post processing script made by Guber. It is
able to create SRR files and extract RAR archives.
* **Rerar** is a tool written in Python 3 by Vadmium to re-create sets of
uncompressed rar files. It can also report the metadata and parameters
stored in a rar file. It should be able to exactly re-create many real-world
RAR files if the right input parameters and metadata are known.
View ``srr_spec.txt`` and http://rescene.wikidot.com/ for more info.
Dependencies
============
- Python (http://www.activestate.com/activepython)
- Chromaprint* (https://acoustid.org/chromaprint)
- UnRAR* (http://www.rarlab.com/download.htm) or unrar-nonfree(!) on Debian
- Shareware WinRAR setup files* (http://rescene.wikidot.com/rar-versions)
`* Works without, but required for certain functionality.`
pyReScene requires Python 2.6, 2.7, or 3 to run. There are some executables
made available for Windows users. fpcalc is necessary for creating
music SRS files. If you want to try reconstructing compressed RAR volumes,
you will need to obtain a couple of the shareware (Win)RAR packages.
These files will need to be preprocessed by the bin/preprardir.py script.
This script extracts the RAR executables from the archives and renames them
for further usage. The new folder with RAR executables will need to be passed
to the -z parameter of ReScene when reconstructing compressed archives.
UnRAR.exe or its Linux equivalent is required for SRR creation of vobsubs.
Installation instructions
=========================
``python setup.py install``
Install chromaprint from your repository or put the fpcalc executable
somewhere in your path. It will also work if you put it in the ./bin or
./resample directory.
Windows installation instructions
---------------------------------
Install Python 3. Download it from http://www.activestate.com/activepython
Install it to C:\\Python33\\ for example.
Place the source somewhere on your hard disk. e.g. C:\\pyReScene\\
Add the bin\\windows directory to your path.
* Run ``add_current_dir_to_path.bat`` that you can find in that directory.
It'll prepend your SYSTEM path.
* Or add it manually: http://www.computerhope.com/issues/ch000549.htm
Done! Now you will be able to call ``pyrescene`` from any directory.
Another way, but it's better to not mess with Windows folders!
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Copy the .bat to a folder that is in your PATH, e.g. C:\\Windows\\System32\\ [1]_
Edit the .bat files to reflect the path where Python and the script source code
is located: e.g. ``C:\Python33\python.exe C:\pyReScene\bin\srr %*``
.. [1] *If .exe files are placed in C:\\Windows\\System32\\ and they fail to run,
move them to C:\\Windows\\SysWOW64\\.
Even better would be to use your own folder you've added to the PATH!*
Linux installation instructions
-------------------------------
Make sure you can run the 32 bit rar binaries when you try to reconstruct
compressed rar archives: http://rescene.wikidot.com/faq#x64
Tutorials
=========
Do ``tool_name --help`` to see all the available options.
A one stop solution to create SRR files is the following command:
``python pyrescene.py -r --best /root/directory/to/check``
This command will recursively check /root/directory/to/check for scene
releases. Sample files are checked against the main movie files (-s) and SRR
files for compressed RARs are also created (-c). An SRR file for vobsubs
will be created recursively if unrar can be found (-v). --best: -c -s -v
To create a .srr file for vobsubs, do:
``python pyrescene.py --vobsubs file.sfv``
Pointing to the .rar file works too and
Windows users can use the vs.bat shortcut.
http://rescene.wikidot.com/tutorials has some more tutorials.
For the paranoid
================
This is a list of security considerations someone reluctant to use pyReScene
to create SRR files should know about.
* pyReScene Auto does not make any external network connections.
* pyReScene Auto does not need write access to the location of the release
file. SRR files can be put into the release directory if wanted though.
* A temporary folder is used for SRR creation. By default it uses the location
``tempfile.mkdtemp()`` provides. On Windows systems this is somewhere in the
AppData folder and "The directory is readable, writable, and searchable
only by the creating user." A custom temporary directory can be provided with
the ``-t`` parameter. Due to unknown bugs, "SRR-xxxxxx" folders could be
left behind in the temporary folder when the tool crashes. Tell me about this!
* When .srs creation fails, a .txt file will be included into the .srr with
some basic information instead. Due to an unknown bug/crash, this could
include paths to the location of the .py or .exe files on your system.
Use non-descriptive paths or the default installation location on Unix systems.
* A site nfo will be included if encountered.
Use ``--skip-regex`` to skip over custom files and folders.
* Log files of known programs are never included. e.g. rushchk.log
* SFV files can include the creating tool info if they aren't raped yet.
This is a good thing for the project! But it could reveal source of origin
of these excellent SRRs to those close to the origin.
Hamster them for a while.
* Same for NFO files: e.g. trailing whitespace could not be stripped yet.
Whatever your objections, create SRRs now.
In time all will become irrelevant anyway ;)
What's new?
===========
Read the *NEWS* file.
Who wrote this?
===============
Check the *AUTHORS* file.
Where can I get help?
=====================
- Read the `FAQ`_
- Check out the `tutorials`_
- `Forum`_
- Chat: `#srrdb`_ on EFNet
.. _FAQ: http://rescene.wikidot.com/faq
.. _tutorials: http://rescene.wikidot.com/tutorials
.. _Forum: http://rescene.wikidot.com/forum:start
.. _#srrdb: irc://irc.efnet.org/%23srrdb
Do contribute to srrdb.com and help us to motivate the right people! --Gfy