Offline Creator - Automated dummy content script/program
#1
Something that I hope should be useful to anyone with lots of offline content such as DVD's. This will automate the process of creating dummy files used for XBMC library scanning and create avi's that tell you what disc the content is on when you play that library item.

It's only a simply console application, no fancy gui.

Features:
- Loads a list of Movies and Disc Numbers from a .cvs file
- Creates dummy folders (optional)
- Fetches the url for the top imdb result and creates and .nfo file for easy XBMC lookup (optional)
- Fetches the year from imdb (optional)
- Creates an avi file containing the text "Please Insert Disc X" where X is the Disc Number for that Film.

Image

Download Offline Creator v1.2(WINDOWS)

Download Offline Creator v1.3(Linux/OSX)

Quote: Changelog
================================================
- 1.3
Fixed: Running under linux would not create the video (no such file or directory error)
- 1.2
Added an option for using a background image instead of just black
Added an option for using a custom font - be aware the text may not center properly
- 1.1
Added the ability to change the "Please Insert Disc" text to custom text in settings.ini

To use,
1) Edit library.cvs in excel/notepad to include your movie names, and disc ids(optional)
2) Run the program
3) Scan the Offline folder in XBMC
See the readme.txt for information on usage.

For the next version I will look into fetching posters and adding a "DVD" watermark, and possibly allowing custom backgrounds for the dummy avi files.
Reply
#2
Looks promising! Testing this out and i have run into a bit of a program. I created the csv file with about 30 movies but when i run the script i get:
Code:
wyild1@BITCHTITS:~/offline-creator$ python offlinecreator.py
# - Skipped Creating Image -- Moviez5.png
# - Creating Video -- Moviez5.avi
Traceback (most recent call last):
  File "offlinecreator.py", line 62, in <module>
    vid_maker._create_vid(i)
  File "/home/wyild1/offline-creator/lib/video_maker.py", line 28, in _create_vid
    self._run_command(command)
  File "/home/wyild1/offline-creator/lib/video_maker.py", line 49, in _run_command
    startupinfo=stup, creationflags=creationflags)
  File "/usr/lib/python2.5/subprocess.py", line 594, in __init__
    errread, errwrite)
  File "/usr/lib/python2.5/subprocess.py", line 1147, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Any thoughts?
Reply
#3
This a great idea! I would like to see some of the suggested ideas but what a great start. I just need to add all my movies to the collection.

wyild1 I too got this error on Linux, it is having issues creating the movie folder names, I could dig into why, but my Python is not very good.

I tried it out on windows with the exe and it works great, so for now my workaround is using the VM of windows that I have.
Reply
#4
Thank you so much! I've needed something like this. It works perfectly with Ant Movie Catalog. I just export my movies list to csv with the title and the disc number, then let this program do the magic. I already have nfo files with the proper imdb urls but I like that you have an imdb url scraper built in.

My only request is that you allow the user to change the text "Please Insert Disc" in the settings.ini. And also allow the user to choose a delimiter instead of comma. I ran into problems when movie titles had commas like "I, Robot" or "Me, Myself & Irene".

Thanks again! Big Grin
Reply
#5
Hi,

Thanks ! Works great !
But if you try to use letters for your disc ids, the app put a cap for the first letter and don't respect the case of the text in the "library.csv".

It should not be too difficult to fix.

Thanks in advance
Reply
#6
xbmcjb Wrote:Hi,

Thanks ! Works great !
But if you try to use letters for your disc ids, the app put a cap for the first letter and don't respect the case of the text in the "library.csv".

It should not be too difficult to fix.

Thanks in advance

Open up settings.ini in wordpad and change
Code:
title_names = True
to
Code:
title_names = False



wyild1 Wrote:Looks promising! Testing this out and i have run into a bit of a program. I created the csv file with about 30 movies but when i run the script i get:
Code:
wyild1@BITCHTITS:~/offline-creator$ python offlinecreator.py
# - Skipped Creating Image -- Moviez5.png
# - Creating Video -- Moviez5.avi
Traceback (most recent call last):
  File "offlinecreator.py", line 62, in <module>
    vid_maker._create_vid(i)
  File "/home/wyild1/offline-creator/lib/video_maker.py", line 28, in _create_vid
    self._run_command(command)
  File "/home/wyild1/offline-creator/lib/video_maker.py", line 49, in _run_command
    startupinfo=stup, creationflags=creationflags)
  File "/usr/lib/python2.5/subprocess.py", line 594, in __init__
    errread, errwrite)
  File "/usr/lib/python2.5/subprocess.py", line 1147, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Any thoughts?

Have you installed mencoder? See the readme, you may need to specify the location of mencoder in the ini

stacked Wrote:Thank you so much! I've needed something like this. It works perfectly with Ant Movie Catalog. I just export my movies list to csv with the title and the disc number, then let this program do the magic. I already have nfo files with the proper imdb urls but I like that you have an imdb url scraper built in.

My only request is that you allow the user to change the text "Please Insert Disc" in the settings.ini. And also allow the user to choose a delimiter instead of comma. I ran into problems when movie titles had commas like "I, Robot" or "Me, Myself & Irene".

Thanks again! Big Grin

CSV files require items with commas in to be quoted such as
Code:
The Matrix, 1
"I, Robot", 2
If Ant Movie Catalog is not exporting the csv this way, then you will need to take it up with them.

As for the custom "Please Insert Disc", I have just added the option into settings.ini in the latest version, see the original post.
Quote: Changelog
================================================
- 1.1
Added the ability to change the "Please Insert Disc" text to custom text in settings.ini
Reply
#7
sw1tch Wrote:CSV files require items with commas in to be quoted such as
Code:
The Matrix, 1
"I, Robot", 2
If Ant Movie Catalog is not exporting the csv this way, then you will need to take it up with them.

Oh, I forgot to include the quotes on the export settings.

Thanks for the update too.
Reply
#8
Some other suggestions :

- You could add an item in settings.ini to change the font
Code:
font = helvetica.ttf
(the workaround for now is to rename an other font to ARIAL.TTF and put it instead of the default one)

- Is it possible to add a background image instead of black ?

Anyway, these are details. Thanks for the update.
Reply
#9
Lightbulb 
@sw1tch, could you please through in an option to create the dummy files/folders structure without the NFO files?

Dummy file/folder structures are great for testing XBMC on different platforms, and to show of to your friends on their own computers, ...but I do not want the NFO files.

Wink
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#10
@Gamester17, simply do a search for *.nfo in the dummyfolder then Wink
Reply
#11
blittan Wrote:@Gamester17, simply do a search for *.nfo in the dummyfolder then Wink

an easier way would be to change

Code:
create_nfo_file = True
to
Code:
create_nfo_file = False
in settings.ini Nod

this is a cool program! as a windows noob i'd like to see a gui, though. that way it would be easier to select the corresponding librarie.csv for different needs, i.e. i have hd-movies and hd-porn that needs to be seperated Tongue
cheers,azido :;):
Reply
#12
xbmcjb Wrote:Some other suggestions :

- You could add an item in settings.ini to change the font
Code:
font = helvetica.ttf
(the workaround for now is to rename an other font to ARIAL.TTF and put it instead of the default one)

- Is it possible to add a background image instead of black ?

Anyway, these are details. Thanks for the update.

I'll add an option to change the name/location of the font file.

As for custom background image, it is certainly possible to do. I was just concerned about the legibility of the text as I couldn't create an outline around the text, but I think I have a work-around for that.

For now, it would be limited to the same picture for all discs. One of my plans was for fetching fanart from themoviedb.org to use as the background, but that would mean some drastic changes in the code as it needs to use the same video file for each 'disc id'.
Reply
#13
Star 
Hi,

first of all i wanna say thank you for this great program!

i think a good feature would be, if you could use fanarts instead of the static background image.

maybe you can use the api from themoviedb.org to download the backdrops.
here is a link: http://api.themoviedb.org/2.0/docs/
Reply
#14
Morning!

I thought i would try this again on a brand new install of eeebuntu. I made sure the python-imaging was installed as per the readme but I am still having the same problem as previous:

Code:
wyild1@EEESYWHORE:~/offline-creator$ python offlinecreator.py
# - Skipped Creating Image -- 1.png
# - Creating Video -- 1.avi
Traceback (most recent call last):
  File "offlinecreator.py", line 62, in <module>
    vid_maker._create_vid(i)
  File "/home/wyild1/offline-creator/lib/video_maker.py", line 28, in _create_vid
    self._run_command(command)
  File "/home/wyild1/offline-creator/lib/video_maker.py", line 49, in _run_command
    startupinfo=stup, creationflags=creationflags)
  File "/usr/lib/python2.5/subprocess.py", line 594, in __init__
    errread, errwrite)
  File "/usr/lib/python2.5/subprocess.py", line 1153, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

in the settings.ini file i specified where mencoder was

Code:
mencoder_path = /usr/bin/mencoder
make_folders = True
cache_folder = cache
title_names = True
font_file = ARIAL.TTF
background_image =
cvs_name = library.csv
disc_insert_text = Please Insert Disc
video_height = 720
title_lower = False
video_length = 10
library_folder = /home/wyild1/Offline
just_refresh = True
video_fps = 25
font_size = 42
video_width = 1280
create_nfo_file = True
imdb_year_fetch = True
title_sep =
imdb_title_correction = True

and mencoder is installed:

Code:
wyild1@EEESYWHORE:~/offline-creator$ whereis mencoder
mencoder: /usr/bin/mencoder /usr/share/man/man1/mencoder.1.gz

So im at a loss. But on the flip side.....the windows one works great! I just hate booting to windows to do that.

Any help would be appreciated!

Cheers
Reply
#15
Try this: http://www.mediafire.com/file/gjgyytzy5d...or-1.3.tar

I think it was just a simply change from False to True in the options for the python command to launch mencoder.
Reply

Logout Mark Read Team Forum Stats Members Help
Offline Creator - Automated dummy content script/program0