Showing posts with label Tricks. Show all posts
Showing posts with label Tricks. Show all posts

Sunday, 25 August 2013

Python Application To Download Movie Subtitles

It is my first project and you know I haven't started it as a project, like I never thought that I will upload it to PyPI (Python Package Index). I have written it cause I was kind of bored downloading movie subtitles manually and the main reason was I like CLI I mean I use terminal a lot, a lot so needed an application that can do it for me. Then pysub-dl came to my mind and i wrote it. On the first version it was buggy but useful for me enough then I thought I should make it more stable that other people can use it cause there are many folks like me (kinda lazy). By the way, I forgot to tell that I first googled for a ready-made script but i couldn't find it so the situation drove me to this :p (Though there was some but I found them little complex and I like simplicity).
Now it is a program that one can easily find it useful in his/her daily routine.
It's time for quick documentation.

Download package: here

1. How to install it?

Ans:  It is stable enough and light-weight application, so you can install it to your system. To install pysub-dl via pip:
$ sudo pip install pysub-dl 

or if you have already downloaded the .zip or .tar.gz then after extracting cd to the it and run it like:
$ sudo python setup.py install 

or if someone want to test it first on a virtual environment then he/she does not need su access.

2. The big question: How to use it?

Ans: First answer is: One can do:

$ pysub-dl --help

It will show the usage. It shows something like:
usage: pysub-dl [-h] movie language

Searches and downloads subtitle for your movie

positional arguments:
  movie       Name of the movie
  language    Subtitle language

optional arguments:
  -h, --help  show this help message and exit

It is quite simple! huh! Now some example will clarify all the questions that I think.

3. Examples 

$ pysub-dl despicable-me-2 english

Like you can see the first argument is the movie name and the second in the language and one important thing that you should not use any spaces in the movie name, you should use '-' (hyphen) instead of ' '(white space). Now the output will show the available subtitles at subscene.com (Till now it supports onlu subscene.com) like:

List of subtitles available at subscene.com
1. Language: English
Despicable.Me.2.2013.TS.XviD.Feel-Free
2. Language: English
Despicable.Me.2.2013.TS.XviD.Feel-Free
3. Language: English
Despicable.Me.2.2013.TS.x264.AC3-BadMeetsEvil
4. Language: English
Despicable.Me.2.2013.720p.TS + END SCENE XViD - JUSTiCE
5. Language: English
Despicable Me 2 TS LiNE AC3 XViD-sC0rp
6. Language: English
Despicable Me 2 2013 HDCAM READNFO x264 AAC-BadMeetsEvil
7. Language: English
Despicable Me 2 2013 720p TS+ END SCENE XViD - JUSTiCE
Enter the number respective to download subtitle: 

You should put the index number corresponding to the subtitle like if I put 3 it will create a file named subtitle.zip in the present working directory which will contain the 3rd subtitle of the list.

Enter the number respective to download subtitle: 3
Was that appropriate? no

If you do not like it you can say 'n' or 'no' or 'nope' or 'nah', It will give you a chance to download another one:

Choose another one subtitle
Enter the number respective to download subtitle: 7

If you liked it just say 'yes' or 'y' or 'yeah' whatever:

Was that appropriate? yeah
Cool. Enjoy the movie!

It was so simple!

Tuesday, 26 February 2013

Total Utilization of VLC: Convert, Capture, Play_game

VLC Media Player is being used by 90% of its total user as a multimedia player only but it has media conversion property also. Many people use to buy a media converter to convert their media files into different formats but they should use VLC cause it's open source, free & does quality conversion also. You can use it to play puzzle games when you are bored doing work. So check these below:
Download latest VLC 2.0.5: here

VLC as CONVERTER:
Follow these simple steps below to do this job!

1. Open vlc.exe from program files.
2. From the menu bar click on 'Media' or press [Alt]+M from keyboard, then a drop-down menu will open.
3. Click on 'Convert/save' or press [Ctrl]+R, then a dialogue box will open.
4. Here comes the main part. From files add the file to convert(that can be loaded from hard disc, cd/dvd, network, etc.).
5. Then click on 'convert/save'. Here choose the destination & the desired name of the converted file.
6. Select the profile. Here for advanced users go to settings & manage your trolls. For basic users select video or audio profiles & hit convert.
7. You will see the file is streaming. After a while converion will be complete & enjoy.

CAPTURE THE SCREEN using VLC:
1. Open vlc.exe from program files.
2. Press [Ctrl]+N & then type "screen://" (without quotes) in the blank field. Hit play. See the magic. It will start to capture the screen. Whatever the movement you make that will be captured by this. It is actually streaming the screen.
3. Now, again repeat the 'Conversion' trick. There just do a different thing that is dont add any file, only write "screen://" (without quotes) & choose the destination like above.
4. You will see the file is streaming.

PLAY PUZZLE GAME in VLC:
1. Open any video file with vlc.
2. Now navigate to Tools->Effect & Filters->Video Effects->Geometry
3. Now you will see few options with the puzzle one(right bottom corner).
4. Check the option. You can also check the Black slot option too.