View Full Version : Extract video/audio streams with vobedit
Metallo
12th March 2006, 09:57
Hi there!,
A simple question, I must extract video/audio streams from lots of VOBs and I'm looking for a "batch" way to do it, instead of going through all of them one by one.
Usually, I use vobedit and select demux to do it for a few VOBs, but now I have many of them so I need your help ;)
Thank you
Alex
CoNS
12th March 2006, 12:05
I recommend using PgcDemux instead. http://jsoto.posunplugged.com/
1) In general it's a much better demuxer than VobEdit.
2) It has a CLI, which makes it possible for you to use it for batch processing.
Metallo
12th March 2006, 17:50
I recommend using PgcDemux instead. http://jsoto.posunplugged.com/
1) In general it's a much better demuxer than VobEdit.
2) It has a CLI, which makes it possible for you to use it for batch processing.
Hi,
I have no problem to use Pgcdemux, but I'd appreciate if you tell me how to use the CLI, I cannot find any guide around.
Thanks
Alex
bigotti5
12th March 2006, 17:59
Scroll down the ReadmePgcDemux.txt
Command line support
PgcDemux [option1] [option2] ... [option12] <ifo_input_file> <destination_folder>
option1: [-pgc, <pgcnumber>]. Selects the PGC number (from 1 to nPGCs). Default 1
option2: [-ang, <angnumber>]. Selects the Angle number (from 1 to n). Default 1
option3: [-vid, <vobid>]. Selects the Angle number (from 1 to n). Default 1
option4: [-cid, <vobid> <cellid>]. Selects a cell vobid (from 1 to n). Default 1
option5: {-m2v, -nom2v}. Extracts/No extracts video file. Default NO
option6: {-aud, -noaud}. Extracts/No extracts audio streams. Default YES
option7: {-sub, -nosub}. Extracts/No extracts subs streams. Default YES
option8: {-vob, -novob}. Generates a single PGC VOB. Default NO
option9: {-customvob <flags>}. Generates a custom VOB file. Flags:
b: split VOB: one file per vob_id
n: write nav packs
v: write video packs
a: write audio packs
s: write subs packs
i: only first Iframe
l: patch LBA number
option10:{-cellt, -nocellt}. Generates a Celltimes.txt file. Only in PGC/VID mode. Default YES
option11:{-log, -nolog}. Generates a log file. Default YES
option12:{-menu, -title}. Domain. Default Title (except if filename is VIDEO_TS.IFO)
Metallo
12th March 2006, 18:13
Bigotti,
Thanks for the tip, however, can you send me an image on how to set the Options?
I have 50 VTSes, and I need the .m2v + .vob streams.
-m2v,-vob, :confused:
Where shall I write the CLI?
Sorry, but it's my first time I need to Demux in batch...
Thanks
Alex
jsoto
12th March 2006, 19:16
Edit a file called mybatch.bat with notepad
Your batch file contents should look like
c:\mypathToPgcDemux\pgcdemux.exe -m2v -vob -pgc 1 VTS_01_1.IFO PathToMyOutputFolder
To launch, just double click on the file
Change the name of the VTS and the pgc number as required
If you write the CLI directly in the cmd prompt, you'll need to launch pgcdemux with start /w, otherwise the prog will return w/o completion.
jsoto
Metallo
12th March 2006, 20:12
Hi,
I cannot get it to work, I have a flash of cmd prompt and then nothing.
Where should the path to the input files be?
PgcDemux is in:C:\Program Files\PgcDemux_1205\PgcDemux.exe
My output folder: M:\My Photos\MOTV ALL
So, mybatch.bat looks like the following:
C:\Program Files\PgcDemux_1205\PgcDemux.exe -m2v -vob -pgc 1 VTS_01_0.IFO M:\My Photos\MOTV ALL
What should this script trigger?
Thanks
Alex
jsoto
12th March 2006, 20:15
MS-DOS requires to quote the names with spaces... Try
"C:\Program Files\PgcDemux_1205\PgcDemux.exe" -m2v -vob -pgc 1 VTS_01_0.IFO "M:\My Photos\MOTV ALL"
Note VTS_01_0.IFO has no path, so your script has to be in the same folder than VTS_01_0.IFO, or change the script to include (between quotes) the full name, i.e. "F:\MY DVD\VIDEO_TS\VTS_01_0.IFO"
jsoto
Metallo
12th March 2006, 21:30
"C:\Program Files\PgcDemux_1205\PgcDemux.exe" -m2v -aud -pgc 1 -vob -customvob b -nosub -nocellt -nolog VTS_02_0.IFO "M:\My Photos\MOTV ALL"
I wrote this text, but I cannot get the VOB files to split, I only get a consolidated one.
What I want to get is something like below:
VTS_01_1.m2v
VTS_01_001.VOB
VTS_02_1.m2v
VTS_02_001.VOB
....
Thanks for your help.
Alex
jsoto
12th March 2006, 23:51
-vob (without -customvob) will create a single file
VTS_01_1.VOB.
No matter if the origin is not the VTS #1
-customvb needs additional options to write "something". By default it does not write any pack.
The options to write a playable VOB are:
-customvob bnavsl
In fact, b option is to split by VOBID.
If you want specific naming as you are saying probably you need to do some renaming in the batch file after each pgcdemux run.
jsoto
Metallo
13th March 2006, 21:19
-vob (without -customvob) will create a single file
VTS_01_1.VOB.
No matter if the origin is not the VTS #1
-customvb needs additional options to write "something". By default it does not write any pack.
The options to write a playable VOB are:
-customvob bnavsl
In fact, b option is to split by VOBID.
If you want specific naming as you are saying probably you need to do some renaming in the batch file after each pgcdemux run.
jsoto
Hi,
OK, now, my understanding was that if enter the VTS_03_0.IFO I should get:
VTS_01_0.IFO
VTS_02_0.IFO
VTS_03_0.IFO
Otherwise, why using a script?
"C:\Program Files\PgcDemux_1205\PgcDemux.exe" -m2v -pgc 1 -customvob bnavsl -nosub -nocellt -nolog VTS_03_0.IFO "M:\My Photos\MOTV ALL"
Well, I just get the no.3, splitted as it should in m2v and VOB but only that number.
I want to stream all the 50 VTS in one go, is this possible? :mad:
Thanks
Alex
jsoto
14th March 2006, 02:14
Hi,
OK, now, my understanding was that if enter the VTS_03_0.IFO I should get:
VTS_01_0.IFO
VTS_02_0.IFO
VTS_03_0.IFO
No, in Titles domain you'll get
VTS_01_1.VOB
VTS_01_2.VOB (if total PGC size is higher than 1 GB)
VTS_01_3.VOB (if total PGC size is higher than 2 GB)
...
and in menus domain you'll get
VTS_01_0.VOB
Otherwise, why using a script?
To put all the files indifferent folders, or to rename the files to be put in the same folder
I want to stream all the 50 VTS in one go, is this possible? :mad: Only with a MS-DOS batch file (a script)
May be you can use the for statement... See Windows help
This is an example
for %%N IN ( 01 02 03 04 05 06 07 08 09 10 11 ) do copy a.txt a%%N.txt
jsoto
Metallo
14th March 2006, 20:59
Jsoto,
I will give up, too difficult without any guide for somebody like me :(
Basically, demuxing is to split the video and audio files from the VOB container.
The script consolidates all the files, which is not good for me.
I've lost two days in this and if I had done the files one by one I would have been ready by now.
I'm going to start this process on a manual way.
I could use the script,
"C:\Program Files\PgcDemux_1205\PgcDemux.exe" -m2v -pgc 1 -nosub -nocellt -nolog VTS_03_0.IFO "M:\My Photos\MOTV ALL"
and just get the .mpa + m2v, but unfortunately Pgcdemux does it by consolidating them all, while I need all the 50 VOBs to be splitted in 50 pairs ".mpa + m2v".
It seems to me unbelieavable that there is no guide around to do this batch process, demuxing is very common, what people do then, one by one?
OK, I'm gonna start now, I have a long way to go.
Thanks for your efforts anyhow.
Cheers :thanks:
Alex
jsoto
14th March 2006, 23:16
OK, my last try...
I'm assuming you have all the IFOs/VOBs in the same folder.
The IFOs are called
VTS_01_0.IFO
VTS_02_0.IFO
VTS_03_0.IFO
VTS_04_0.IFO
....
...
VTS_50_0.IFO
So, write TWO batch files in notepad mybatch1.bat and mybatch2.bat
This is the contents of mybatch2.bat
"C:\Program Files\PgcDemux_1205\PgcDemux.exe" -m2v -pgc 1 -nosub -nocellt -nolog VTS_%1%_0.IFO "M:\My Photos\MOTV ALL"
rename "M:\My Photos\MOTV ALL\VideoFile.m2v" VideoFile.%1%.m2v
rename "M:\My Photos\MOTV ALL\*.mpa" *.%1%.mpa
rename "M:\My Photos\MOTV ALL\*.ac3" *.%1%.ac3
In this batch %1% means the first parameter when calling the script in this way:
mybatch2.bat parameter1
And,is the contents of mybatch1.bat (first try, to see if it works)
for %%N IN ( 01 02 ) do mybatch2.bat %%N
launch mybatch1.bat, and if it works fine, write the definitive (for the 30 first)
for %%N IN ( 01 02 03 04 05 06 07 08 09 10 ) do mybat2.bat %%N
for %%N IN ( 11 12 13 14 15 16 17 18 19 20 ) do mybat2.bat %%N
for %%N IN ( 21 22 23 24 25 26 27 28 29 30 ) do mybat2.bat %%N
jsoto
PS: Unfortunately MS-DOS is a very bad Command interpreter... I like very much Unix sh, specially ksh... IIRC there is a ksh interpreter for windows/MS-DOS...
Metallo
14th March 2006, 23:33
Hi,
for %%N IN ( 01 02 ) do mybatch2.bat %%N
When I launch the above script I get a window message saying:
invalid input file
Alex
jsoto
14th March 2006, 23:48
Sorry, there are a couple of bugs....
Parameter syntax is %1 instead of %1%, and renaming with wild cards (audio) has to be done with care...
mybatch2.bat must be
"C:\Program Files\PgcDemux_1205\PgcDemux.exe" -m2v -pgc 1 -nosub -nocellt -nolog VTS_%1_0.IFO "M:\My Photos\MOTV ALL"
rename "M:\My Photos\MOTV ALL\VideoFile.m2v" VideoFile.%1.m2v
rename "M:\My Photos\MOTV ALL\*.mpa" *.%1.mpb
rename "M:\My Photos\MOTV ALL\*.ac3" *.%1.ac4
And, when all the files are created, run manually in cmd prompt to recover the right extension
rename *.mpb *mpa
rename *.ac4 *.ac3
jsoto
Metallo
14th March 2006, 23:59
Jsoto,
Strange, it works fine with the first two:
for %%N IN ( 01 02 ) do mybatch2.bat %%N
but with the complete code I get the command DOS to run for a sec. showing a quick list and then nothing.
for %%N IN ( 01 02 03 04 05 06 07 08 09 10 ) do mybat2.bat %%N
for %%N IN ( 11 12 13 14 15 16 17 18 19 20 ) do mybat2.bat %%N
for %%N IN ( 21 22 23 24 25 26 27 28 29 30 ) do mybat2.bat %%N
Do you have an idea why?
Alex
jsoto
15th March 2006, 00:06
first two script says mybatch2.bat
the full script says mybat2.bat
jsoto
Metallo
15th March 2006, 00:08
Jsoto,
I've realised it, you made a typing mistake, bat instead of batch.
Now it is working, it's great!!!
I have noticed that the script works 10 by 10, so after the first 10 files, I delete the script line just done and then it continues with the next after re-launching.
Thank you very much for your patience.:)
Cheers
Alex
Metallo
15th March 2006, 00:19
Jsoto,
Can you suggest me a website where to learn the basics of scripting?
At least, I will be able to use scripts more frequently with other tasks.
Thanks
Alex
jsoto
15th March 2006, 00:20
Great!. :cool:
Metallo
8th April 2006, 08:49
Hi,
launch mybatch1.bat, and if it works fine, write the definitive (for the 30 first)
for %%N IN ( 01 02 03 04 05 06 07 08 09 10 ) do mybatch2.bat %%N
for %%N IN ( 11 12 13 14 15 16 17 18 19 20 ) do mybatch2.bat %%N
for %%N IN ( 21 22 23 24 25 26 27 28 29 30 ) do mybatch2.bat %%N
Just out of curiosity, why cannot it work if I set the files in one line only, like below:
for %%N IN ( 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 ) do mybatch2.bat %%N
Thanks
Alex
jsoto
16th April 2006, 17:24
Start--> Help
and search for "command line" (in spanish "linea de comandos"). You will find help on MS-DOS scripting
But, if you want to learn a powerful scripting try autoit
http://www.autoitscript.com/autoit3/
jsoto
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.