Back Forum Reply New

Extract video/audio streams with vobedit

Hi there!,

A simple question, I must extract video/audio streams from lots of VOBs and I'm looking for a quot;batchquot; 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

I recommend using PgcDemux instead.

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.


Originally Posted by CoNSI recommend using PgcDemux instead.

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

Scroll down the ReadmePgcDemux.txt Code:
Command line support
PgcDemux [option1] [option2] ... [option12] lt;ifo_input_filegt; lt;destination_foldergt;
option1: [-pgc, lt;pgcnumbergt;].      Selects the PGC number (from 1 to nPGCs). Default 1
option2: [-ang, lt;angnumbergt;].      Selects the Angle number (from 1 to n). Default 1
option3: [-vid, lt;vobidgt;].          Selects the Angle number (from 1 to n). Default 1
option4: [-cid, lt;vobidgt; lt;cellidgt;]. 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 lt;flagsgt;}. 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)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,  

Where shall I write the CLI?

Sorry, but it's my first time I need to Demux in batch...

Thanks
Alex

Edit a file called mybatch.bat with notepad

Your batch file contents should look likeCode:
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

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

MS-DOS requires to quote the names with spaces... TryCode:
quot;C:\Program Files\PgcDemux_1205\PgcDemux.exequot; -m2v -vob -pgc 1 VTS_01_0.IFO quot;M:\My Photos\MOTV ALLquot;
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. quot;F:\MY DVD\VIDEO_TS\VTS_01_0.IFOquot;

jsoto

quot;C:\Program Files\PgcDemux_1205\PgcDemux.exequot; -m2v -aud -pgc 1 -vob -customvob b -nosub -nocellt -nolog VTS_02_0.IFO quot;M:\My Photos\MOTV ALLquot;

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

-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 quot;somethingquot;. 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


Originally Posted by jsoto-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 quot;somethingquot;. 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.

jsotoHi,

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?

quot;C:\Program Files\PgcDemux_1205\PgcDemux.exequot; -m2v -pgc 1 -customvob bnavsl -nosub -nocellt -nolog VTS_03_0.IFO quot;M:\My Photos\MOTV ALLquot;

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?  

Thanks
Alex


Originally Posted by MetalloHi,

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?
Only with a MS-DOS batch file (a script)

May be you can use the for statement... See Windows help
This is an example

Code:
for %%N IN ( 01 02 03 04 05 06 07 08 09 10 11 ) do copy a.txt a%%N.txt
jsoto

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,

quot;C:\Program Files\PgcDemux_1205\PgcDemux.exequot; -m2v -pgc 1 -nosub -nocellt -nolog VTS_03_0.IFO quot;M:\My Photos\MOTV ALLquot;

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 quot;.mpa + m2vquot;.

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  
Alex

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

Code:
quot;C:\Program Files\PgcDemux_1205\PgcDemux.exequot; -m2v -pgc 1 -nosub -nocellt -nolog VTS_%1%_0.IFO quot;M:\My Photos\MOTV ALLquot;
rename quot;M:\My Photos\MOTV ALL\VideoFile.m2vquot; VideoFile.%1%.m2v
rename quot;M:\My Photos\MOTV ALL\*.mpaquot;  *.%1%.mpa
rename quot;M:\My Photos\MOTV ALL\*.ac3quot;  *.%1%.ac3
In this batch %1% means the first parameter when calling the script in this way:
mybatch2.bat  parameter1And,is the contents of mybatch1.bat (first try, to see if it works)Code:
for %%N IN ( 01 02 ) do mybatch2.bat %%N
launch mybatch1.bat, and if it works fine, write the definitive (for the 30 first)

Code:
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...

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

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

Code:
quot;C:\Program Files\PgcDemux_1205\PgcDemux.exequot; -m2v -pgc 1 -nosub -nocellt -nolog VTS_%1_0.IFO quot;M:\My Photos\MOTV ALLquot;
rename quot;M:\My Photos\MOTV ALL\VideoFile.m2vquot; VideoFile.%1.m2v
rename quot;M:\My Photos\MOTV ALL\*.mpaquot;  *.%1.mpb
rename quot;M:\My Photos\MOTV ALL\*.ac3quot;  *.%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

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

first two script  says mybatch2.bat
the full script says    mybat2.bat

jsoto

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

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
¥
Back Forum Reply New