Log in

View Full Version : Sonic's SVCD-BIN 2 VIDEO_TS batch converter


Sonic77
19th January 2005, 00:01
Sonic's SVCD-BIN 2 VIDEO_TS batch converter

...is a Windows CMD script to convert SVCD Images in BIN format into a (nearly) DVD compliant VIDEO_TS folder. The video remains untouched, that's why it's actually not really DVD compliant, because of the SVCD video resolution - but it also means that it's very fast! The MP2 audio is converted to 48kHz, because on many standalone players 44kHz audio is a bigger problem than the non-DVD-compliant resolution, and it doesn't take that much time.

The script has 3 parameters, the input folder, the output folder, and the settings file. It converts all BIN files from the input folder into one VIDEO_TS folder, which can be burned afterwards with Nero or any other DVD burning software. If you want the VIDEO_TS folder to fit on a DVDR, just don't put too many, too big BIN files into the input folder. The script performs no size check, that's up to you.

In the file bin2video_ts_setting.cmd some settings can be changed with a text editor. It's better to make a copy of that file before changing it and pass it as the 3rd parameter, instead of altering the original settings file, then you can always go back to the original settings if your personal settings won't work any more.

Here's an example that shows the default behaviour. Let's say "c:\input" contains the following files:
movie_a_cd1.bin
movie_a_cd2.bin
movie_b_cd1.bin
movie_b_cd2.bin

On the DVD, there will be two titles afterwards, with two chapters each. The script groups all BIN files that have "almost" the same name to one title. To be more precise: if the names of some BIN files only differ in the last 2 characters of the filename, they will be grouped to form one title on the DVD.

A menu is generated automatically. For all titles with more than one audio track an audio menu is generated too. You can set the names of the movie and the audio languages for each title in the settings file. Color, font, etc. can be changed somewhat in the settings file too, but not too much at the moment.

The script is "Windows only", because it's a CMD file. It's tested only on WinXP Pro, but it should work on Windows 2000 and any newer Windows version. If you try it on another Windows than WinXP Pro, please tell me if it worked.

Besides my self-written CMD and AWK files, the script only uses free software. My CMD and AWK files are free too, of course ;)


INSTALL INSTRUCTIONS:

FIRST OF ALL: I take no responsibility for any kind of damage caused by my script! Use it at your own risk!

Download this self-extracting archive:
http://schimmeln.org/batch/SVCD_BIN2VIDEO_TS_V0.3b.exe
NEW! Version 0.3b

http://schimmeln.org/batch/SVCD_BIN2VIDEO_TS_TOOLS.exe
NEW! All the needed commandline software tools must be downloaded seperately now!
This is because it's much bigger than the script itself and won't change often. Just unpack it into the same folder as the other archive.

The first file contains my CMD&AWK scripts, and the second file contains the following software:
dvdauthor-0.6.9
mpgtx-1.3.1
vcdimager-0.7.21
gawk from unxutils
some DLLs from CygWin

Just start it, and choose a new folder to unpack. For example
"C:\Program Files\SVCD_BIN2VIDEO_TS"

IMPORTANT! You need to download BeSweet and QuEnc seperately!

Download BeSweet 1.5 from the Doom9 full software page (Audio Tools):
http://www.doom9.org/software2.htm
It's important to use this version of BeSweet, other versions can have problems with MP2->MP2 encoding or produce MP2 files that mplex does not like.

Download the newest (beta) version of QuEnc here:
http://nic.dnsalias.com/QuEnc.html
Extract BeSweet into a folder new named "besweet" inside the directory where you have extracted my archive. QuEnc must be put in a folder "quenc".
If you extracted my archive to
"C:\Program Files\SVCD_BIN2VIDEO_TS"
then you'd extract BeSweet to
"C:\Program Files\SVCD_BIN2VIDEO_TS\besweet"
and QuEnc to
"C:\Program Files\SVCD_BIN2VIDEO_TS\quenc"

You are now ready to use the script!

Just type:
bin2video_ts <input folder> <output folder> <settings file>

The <input folder> must contain at least one BIN file.
The <output folder> must be empty and will be created if it doesn't exist.
If no <settings file> is given, the default bin2video_ts_settings.cmd is used.

If the conversion is succesful, it will contain the VIDEO_TS folder after the script has finished it's work.

Have fun with it, and feedback would be appreciated!

V0.3b - bugfix release [26.01.05]
=================================

- Some FOR loops seemed to cause problems on some systems, especially
multi-line FOR loops. Now all FOR loops are one-liners.

V0.3 - major update [24.01.05]
==============================

- Code cleanup, created subfolders, and settings than can be changed are in a
separate file now. The settings file is a 3rd parameter now

- A menu is created, the names of the movies and some other parameters can be
changed in the settings file. In the future it will also be possible to
specify background images or even movies and AVS files as background for the
menu.
At the moment this menu is limited to 8 titles, but I plan to create
templates for much more than 8 titles, e.g. for TV series.

- All audio tracks of each MPG file are converted now

- It is possible to add one additional audio track per movie now as seperate
MP2 files which must be in the input folder. For an additional soundtrack
for "avseq01.mpg" in "movie_cd1.bin" the MP2-file's name must look like
this: "movie_cd1___avseq01.mp2"
Note that ALL files that will become one movie after grouping the BIN files
by their names must have the same number of audio tracks.
Things may go very wrong if the MP2 files aren't exactly of the right
lenght etc., use this feature with caution.

- Each movie is in it's own titleset now, so movies with a different number of
audio tracks can be used. And when PAL and NTSC are mixed, there's a good
chance now that it will run on a standalone player (although no guarantee)

- Introduced a new CMD file "demux_bins.cmd". It can be used to demux all BIN
files in the input folder and put the elementary streams into the output
folder

- Introduced a new CMD file "reauthor.cmd". It can only be used if
KEEP_TEMPFILES was set to TRUE when a DVD was created. In this case,
reauthor.cmd can be used to re-author the MPG files again. This is useful to
change some menu colors etc. without going through the whole process again.

- Fixed a bug with spaces in pathnames introduced in V0.2

- Changed the year in the changelog from 2004 to 2005 ;-)

influenza
20th January 2005, 10:40
Should be very usefull for people who seek for a way to put their svcds onto a dvd-r. Adding a menu afterwards shopuldn't be too hard either.

:thanks:

Sonic77
20th January 2005, 18:26
I've updated the script to V0.1c, see the changelog above.

Sonic77
21st January 2005, 02:29
I've updated the script to V0.2, see the changelog above.

UPDATE: There was a problem with Paths containing Spaces, I've corrected this now, just download V0.2 again if you have that problem.

Sonic77
26th January 2005, 02:42
The script was updated to V0.3b now.
V0.3 introduced some big changes, a title menu is created now, and for titles with more than one audio track an audio menu is created automatically.