# Andrey Golovizin: 25 Feb 2007
I've used it with my camcorder, and it works fine. Thank you! :)

There is also a small feature request: please make dvd-vr allow
copying individual programs instead of the whole bunch. :)
# altair8800: 01 Apr 2008
I feel your dvd-vr is very useful. Thank you for your good hacking.

A label text on a disc is constructed by a 128-byte field, as you
coded, and I found the first 64 bytes of that field are described by
ASCII character set. The second 64 bytes of the 128-byte field are
used to describe primary text of another character set (e.g.,
Shift_JIS or ISO-8859-15?).

I modified your code and uploaded the patch at:

I have tested the above patched code on my linux box (which can handle
Japanese language). It seems that the patched "dvd-vr" utility now
can show labels in Japanese language which were created by Japanese
models of DVD recorders.
(But , ISO-8859 encoded discs have not been tested, because I don't
have an European DVD recorder).

# Pádraig Brady: 02 Apr 2008
I noticed the following referenced from your blog post:

That person seems to be processing separate labels and titles,
the Shift_JIS data being in the titles only?

Also do you have any Shift_JIS IFO files I could look at?
It would really help a lot.

# altair8800: 03 Apr 2008
> I noticed the following referenced from your blog post:http://d.hatena.ne.jp/Nunocky/20080327

> That person seems to be processing separate labels and titles,
> the Shift_JIS data being in the titles only?

I've found two kind of records in Shift_JIS encoding:
1. Program titles (for each video program)
2. Disc volume label

1. Program titles (for each video program)

Here is a hexadecimal dump of a 128-byte label field:
0000e080 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
| ...............|
0000e090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
* (32 byte of zeros)
0000e0c0 8f ba 98 61 83 4e 83 47 83 58 83 67 00 00 00 00
0000e0d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
* (32 byte of zeros)

"8f ba 98 61 83 4e..." is "昭和クエスト" in Shift_JIS

2. Disc volume label

I found it at offset 0xA0:
000000a0 00 00 8c 80 92 63 83 58 81 5b 83 70 81 5b 81 45 |.....c.X.
000000b0 83 47 83 4c 83 5a 83 93 83 67 83 8a 83 62 83 4e
000000c0 81 45 83 56 83 41 83 5e 81 5b 00 00 00 00 00 00 |.E.V.A.^.
000000d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

"8c 80 92 63 83..." is "劇団スーパー・エキセントリック..." in Shift_JIS.

> Also do you have any Shift_JIS IFO files I could look at?
> It would really help a lot.

Yes, of cource. Because it is too large to post here, I will send
you a few files lator.

# peter: 30 May 2008
Hello, can you please say me how to install or iniciate the program? Im using ubuntu hardy. Thaks
# Pádraig Brady: 30 May 2008
Sorry I will add a README in the next version.
After downloading do:

gzip -dc dvd-vr-0.5.1.tar.gz | tar x
cd dvd-vr-0.5.1

Then you can run the program from that directory like:

Or you could copy it into your $PATH somewhere like
sudo mkdir -p /usr/local/bin
sudo cp dvd-vr /usr/local/bin

Then the `dvd-vr` command can be run from any directory.
# Antoni: 29 Sep 2008
Hi Pádraig,

I have found debian package (dvd-vr_0.4-toro1_i386.deb) which works great on Ubuntu 8.04.
Thanks for a small but great programme.
The only problem I have now is that dvd-ram disk is marked as protected afterwards and I am having difficulty unprotecting it. This happens both when I extract files from the camera and when I extract them from the disk in DVD drive. Any ideas why?


# Pádraig Brady: 29 Sep 2008
I didn't know about the third-party deb package. thanks.

As for your disc being marked protected, it's not related
to dvd-vr as it only reads from the disc. When mounting the
disc you could specify that your operating system does
so in read-only mode, which may help?
# juuso: 31 Oct 2008
how can i use pipes with dvd-vr, i would like to pipe output to mencoder. DVD-VIDEO compatible
# Pádraig Brady: 02 Nov 2008
You can't currently pipe since it always write a file whose filename is based on the timestamp of the recording.
Thanks for the suggestion though, I'll have a look at what mencoder expects and see what I can come up with.
# Pádraig Brady: 06 Nov 2008
Version 0.8 just released, now supports writing vob data to stdout.
# Rob Noble: 24 Dec 2008
Firstly, thanks for doing this. I'd had my camcorder for a while before I realised that selecting DVD-VR mode would make things difficult...

Secondly, one small problem - when I import the generated VOBs into Nero Vision 4 Essentials, they're 4:3 aspect-ratio, when the original video is 16:9, and I can't find any way to override that.

I don't know if it helps, but I installed GSpot to see what it had to say about the vob files generated by dvd-vr, and in the Video/d section it says:

pic (w x720 x 576 seq ext 540 x 576 4:3
sar 1.250 (5:4) par 1.067 (16:15) dar 1.333 (4:3)

Actually, the same is true of vobs from a DVD-Video format disk from the same camcorder, so perhaps it's the camcorder at fault?

It's a Canon DC50, in case that matters.

# Pádraig Brady: 24 Dec 2008
As a matter of interest, without extracting the vobs, what aspect ratio does dvd-vr report?

Anyway, dvd-vr just copies the vob data from the disc, so if the aspect is encoded within the vob data then the camera is probably at fault.

In my experience you have to tell programs what aspect the vob is in. For example to play vobs on my 1280x800 laptop I use the following mplayer command:

mplayer -vf pp=fd -monitoraspect 8:5 -aspect 16:9 movie.vob
# Rob Noble: 22 Jan 2009
Sorry for the slow response...

Here's what I get without extracting vobs:

C:\Users\Rob>\pkg\dvd-vr-0.8.4\dvd-vr.exe d:\DVD_RTAV\VR_MANGR.IFO
format: DVD-VR V1.0

tv_system : PAL
resolution : 720x576
video_format: MPEG2
aspect_ratio: 16:9
audio_channs: 2
audio_coding: Dolby AC-3

Number of programs: 21

date : 2007-11-26 18:40:09
size : 39475200

Is it the case that the aspect-ratio for DVDs is defined in the .ifo file, and it overrides whatever is specified in the .vob?

I wanted to use the video clips from my camcorder to create a new DVD, and whatever program I try to do that, it only imports the vob files and ignores the .ifo, and they all seem to think that the .vobs that come out of dvd-vr are 4:3.

I've just downloaded a copy of ProjectX, and if I drop one of the extracted .vob files onto that, it reports:

-> video basics: 720*576 @ 25fps @ 0.6735 (4:3) @ 9400000bps, vbvBuffer 112

ProjectX has an option to patch the aspect-ratio to 16:9, but it only works if you demux the file, which results in an .m2v and a .ac3. I will need to find a way to remultiplex those two files back together before I can import the video with correct aspect-ratio into a DVD maker, and retain the audio.
# Pádraig Brady: 22 Jan 2009
Thanks for the info Robert.

So it looks like the aspect is/should be encoded in the VOB.
My 16:9 vobs extracted with dvd-vr play correctly. mplayer says:

Playing 2008-07-27_11:39:46.vob.
MPEG-PS file format detected.
VIDEO: MPEG2 720x576 (aspect 2)
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [xv] 720x576 => 1024x576 Planar YV12

The IFO files are just informational, so I'll look to see if I can easily tweak the aspect in the VOB frames, if they're incorrect. Still saying that, you should be able to tell your player that the aspect is 16:9 and it will scale accordingly.
# Rob Noble: 06 Feb 2009
Hi Pádraig,

Thanks for looking into it.

I'm not using a player, I'm using video editor software to create a DVD containing clips from my camcorder, and none of the editing software I've tried has an option to override the aspect ratio of imported video. :-(

# Pádraig Brady: 06 Feb 2009
Hi Rob. There seems to be exsiting windows tools to do what you want: http://www.videohelp.com/tools/DVDPatcher
I'll look into integrating this functionality into dvd-vr
# Antoni: 13 Feb 2009
Hi Pádraig,
I have a problem while dealing with a large file (I have both dvd and hard disk on my camera). DVD works fine, I have managed to overcomme earlier problems by mounting camera read only but transfer of files from HD is incorrect, info part of it is correct, by while transferring, program seems to be going into loop after ca. 4.7Giga (DVD size?)ie. it starts transferring the same data again, even though labels are correct, till it transfers the full HD size (eg. 22 GB of scenes on HD). If I delete a few first files from the camera more scenes are transferred but still up to 4.7GB and then into loop again. I have just downloaded the new version, will see if it is any different than the previous one.

Can you have a look at this please?

Thanks very much

# Pádraig Brady: 13 Feb 2009
That sounds like a 2^32 rollover issue?
So you have 1 small IFO file on HD, and a 22GB VRO file?
I would have thought for HD that VRO files were not required?
If you do have a large VRO file, it would really help if you email on the corresponding small IFO file to P@draigBrady.com
# Antoni: 15 Feb 2009
Hi Padraig,
Thanks for this, I am away from my camera till next week,I will send you the file then. I have a Hitachi camera, capable of recording both on DVD and Hard Disk (30GB), depending on the switch. File on hard disk is also recorded as VRO, it keeps growing , I presume up to 30GB of disk capacity. It looks like your program is picking the information correctly (at least judging by the dates) but when it comes to transferring data it goes back to the beginning after those 4.7GB and transfers again. Kernel recognises HD as DVD RAM and mounts it RO (unlike DVD - since my problems before). I can copy the whole VRO file onto haed disk and cut it (mpgsplit) but obviously your program is a lot better, by giving you exact scenes.
I will send you IFO file next week.


# Pádraig Brady: 24 Feb 2009
@Antoni, Your issue was a 2^32 overflow issue and is fixed in 0.9
@Rob, 0.9 will modify the extracted VOB file to have the correct aspect ratio
# Rob Noble: 17 Apr 2009
Hi Pádraig,

Just to say thanks again, and to let you know that the aspect-ratio changes work perfectly with the 16:9 recordings from my Canon DC50.
# Mire: 10 Jul 2009
Hi Thank you very much for your contact at http://pythonlife.seesaa.net/ .

My HN is Mire.

I think Your dvd-vr is very nice job.

I tried to read souce code of dvd-vr. but I could nothing.
I don't know IFO file's format and C language.
And I can English little.

Then I write python program.
Could you read it's titles function block(def titles(drive): line 90)?

>What version of dvd-vr did you use?

I'm using dvd-vr 0.9.1 (DL from http://www.pixelbeat.org/programs/dvd-vr/dvd-vr-0.9.1.tar.gz)

C:\>D:\cygwin\usr\local\bin\dvd-vr.exe --version
dvd-vr 0.9.1

>Can you send me your IFO file so I can add support for your titles?

Please DL IFO file from http://pythonlife.up.seesaa.net/ifo/VR_MANGR.IFO
(creared by Panasonic DMR-BW900 Blu-ray disc recoder.)
Thank you for your kindness.
# Pádraig Brady: 10 Jul 2009
@Mire your English is good!
Hmm, my version 0.9.1 here on linux can read the titles?

$ ./dvd-vr ../dvd_label/VR_MANGR.IFO | grep title
title: 爆笑問題のニッポンの教養▽私が愛したゴリラ(前編)〜霊長類社会
title: 爆笑問題のニッポンの教養▽私が愛したゴリラ(後編)〜霊長類社会
title: 爆笑問題のニッポンの教養「万物は汚れている〜環境化学・田辺信介
title: 爆笑問題のニッポンの教養「建築のチカラ〜建築設計・西沢立衛〜」
title: 爆笑問題のニッポンの教養「おしゃべりな脳〜言語脳科学・酒井邦嘉
title: 爆笑問題のニッポンの教養「あなたの知らないメロディ―〜音文化学
title: 爆笑問題のニッポンの教養「芸術は“カラダ”だ〜美術解剖学・布施
title: 爆笑問題のニッポンの教養「ロボットの虫〜ロボット工学・三浦宏文
title: 爆笑問題のニッポンの教養「こころは水で作られる!?〜脳神経学・
title: 爆笑問題のニッポンの教養「学校は何も教えてくれない?〜教育社会
title: 爆笑問題のニッポンの教養 成人の日スペシャル「“大人になる”と
title: 爆笑問題のニッポンの教養スペシャル「ニッポン!チャチャチャ」
title: 爆笑問題のニッポンの教養「この世は“破れ”ている〜素粒子物理学
title: 爆笑問題のニッポンの教養「人口は口ほどにものを言う〜歴史人口学

I'm guessing you do not have the iconv (or maybe called libiconv) packages installed on cygwin.
You will need to rebuild dvd-vr.exe after installing that package.

Currently if you build on a system without libiconv, you get:
"Warning: title translation support disabled as libiconv not installed"

I'll try to make this more obvious, but inserting some text in the output from dvd-vr runs.

# Mire: 11 Jul 2009
Thank you for your comment. It's right!

dvd-vr.c has no problem. and your output strings is complate Japanese characters.

My cygwin has libiconv2, not libiconv. Then I installed libiconv and re-try make(make clean; make; make install).

But cygwin's dvd-vr said "Error converting from SHIFT_JIS to US-ASCII". output details: http://pythonlife.seesaa.net/article/123291856.html

I think probably langinfo in cygwin has bug?

# Pádraig Brady: 11 Jul 2009
There is no way to convert from SHIFT_JIS to US-ASCII. Well there are transliteration methods, but that's different.

I'm guessing that you have not setup your codeset correctly in your cygwin environment. I.E. you have not set the LANG environment variable appropriately.

You can do this manually for each dvd-vr.exe run like:

LANG=ja_JP.UTF8 dvd-vr /cygdrive/e/DVD_RTAV/VR_MANGR.IFO


LANG=ja_JP.SJIS dvd-vr /cygdrive/e/DVD_RTAV/VR_MANGR.IFO

Those may need additional locale packages installed on cygwin.
# Mire: 13 Jul 2009
Thank you for for your advice.

I tried it and edited cygwin's setup for japanese language.
But, My cygwin's dvd-vr said "Error converting from SHIFT_JIS to US-ASCII" yet.

Then I read dvd-vr.c and add lines in dvd-vr.c for searching error points.

nl_langinfo(CODESET) says "US-ASCII" now( but, LANG env is ja_JP.Shift_JIS).

I think that my cygwin's langinfo has a problem. But, I have no idea for this problem. I need some days for this solution.

# Pádraig Brady: 13 Jul 2009
Looks like nl_langinfo(CODESET) won't work on cygwin:
I'll look at adding a workaround.

By the way I think it would be simpler to install linux to a separate partition or virtual machine.
# Mire: 13 Jul 2009
Hi, I'got same infomations in japanese.
nl_langinfo(CODESET) has never work on cygwin1.5.x.
Cygwin 1.7.x (Beta testing) work in UTF-8 with some patches.

Japanese user usually makes or searchs patches for Japnanese language.
I use my draft patch for Shift_JIS until New rerease of Cygwin.

+ char * to_code;
+ to_code = nl_langinfo(CODESET);
+ iconv_t cd = iconv_open (to_code, disc_charset);
- iconv_t cd = iconv_open (nl_langinfo(CODESET), disc_charset);

+ disc_charset, to_code);
- disc_charset, nl_langinfo(CODESET));

And linux has no problems in locale. Now, I can't use dvd-vr with linux. Brcause I have no linux pc now.

# Pádraig Brady: 13 Jul 2009
Won't to_code still be US-ASCII with that patch?
I.E. I can't see what it changes.

# Pádraig Brady: 13 Jul 2009
Ok This patch should honour your LANG environment variable.

I.E. you should be able to do something like:

LANG=ja_JP.SJIS dvd-vr /cygdrive/e/DVD_RTAV/VR_MANGR.IFO
# Mire: 14 Jul 2009
Thank you!

I've write ad hoc patches.

patch of 2009-02-25 like my patch.

Today, I wrote c language patch in a long time. 10? or 15?year ago. ^^;;
# Pádraig Brady: 14 Jul 2009
Great, thanks for doing that!
It looks like iconv directly handles the codes you mention there, which I checked with:

for c in SJIS Shift_JIS PCK EUC-JP eucJP; do iconv -f $c </dev/null; done

Well PCK gives an error, but that seems to be just used on solaris according to google.

So it looks like my patch presented above should work.

# Peter: 30 Jul 2009
Great man!
I've been looking for tool like this for quite a while.

Now that I have the VOB files, what is the easiest way to assemble a standard DVD VIDEO?
# Pádraig Brady: 31 Jul 2009
Glad it works for you Peter.
I've never actually created a standard DVD VIDEO can you believe :)
I guess there are many tools to do it though.
http://www.google.com/search?q=dvd+author shows lots of relevant hits
# Ken Arnold: 16 Jan 2010
I was looking all over for the right tool to extract the video from a VRO file. Final Cut Pro can't read them, and VLC wasn't able to convert it to anything else. I saw some references to mpgtx and vrosplit, but the first didn't work and the second seemed suspicious. dvd-vr not only successfully pulled out the video, but split it into individual files by stream. Very nice, thanks!
# Steve Collie: 08 Feb 2010
I am trying to use this to extract programs from DVD RAM disks recorded by my Panasonic DMR-ES30VEB. However, it seems that this unit records the programs using CPRM encryption, which dvd-vr doesn't support :(

Is this something that could be added to dvd-vr? I'm not familiar with CPRM encryption, but I *am* familiar with C. If a routine to dercypt CPRM was available, and was straightforward to add to dvd-vr, I'd be happy to do this?

Any advice/guidance most appreciated !

# Pádraig Brady: 08 Feb 2010
@Steve. There was an issue with 0.9.3 where it would identify some dics as enrypted when in fact they only supported encryption.
Could you try this version which analyses the video stream to better detect encryption:

I haven't put effort into CPRM decryption as I've not got a system that produces CPRM discs and one needs physical access to the disc to get the keys AFAIK. If you got CPRM decryption working I wouldl gladly add it to dvd-vr.

# Steve: 08 Feb 2010
@Pádraig. Brilliant - that worked perfectly. Thanks very much!

I've made a minor update so it now saves the VOB file using the title from the IFO file if it's available, in addition to the timestamp - is this something you would want to incorporate back into the main codebase ?

# Pádraig Brady: 08 Feb 2010
That's 3 people who've asked for this now, so I'll add an option to support using lables/titles in the file name. Note though it's _very_ problematic as there are bad characters and duplicate names etc. I'll add something equivalent to tr -c '[:alpha:]' '_'
# Eyal: 17 Feb 2010
Thank you for developing this great utility.
I compiled and ran it successfully under Ubuntu (as guest OS under OS X).
I want to run it natively on OS X but it doesn't compile.
It cannot find any of the include files and output many error.
Here're the first few error lines:

Makefile:44: "Warning: title translation support disabled as libiconv not installed"
cc -std=gnu99 -Wall -Wextra -Wpadded -DVERSION='"0.9.4"' -O3 -DNDEBUG -c -o dvd-vr.o dvd-vr.c
dvd-vr.c:63:22: error: inttypes.h: No such file or directory
dvd-vr.c:66:19: error: stdio.h: No such file or directory
dvd-vr.c:67:20: error: stdlib.h: No such file or directory
dvd-vr.c:68:20: error: string.h: No such file or directory
dvd-vr.c:69:19: error: wchar.h: No such file or directory
dvd-vr.c:70:20: error: unistd.h: No such file or directory
dvd-vr.c:71:19: error: fcntl.h: No such file or directory
dvd-vr.c:72:18: error: time.h: No such file or directory
dvd-vr.c:73:20: error: locale.h: No such file or directory
dvd-vr.c:74:20: error: getopt.h: No such file or directory
dvd-vr.c:76:23: error: sys/types.h: No such file or directory
dvd-vr.c:77:22: error: sys/stat.h: No such file or directory
dvd-vr.c:78:22: error: sys/mman.h: No such file or directory
dvd-vr.c:79:22: error: sys/time.h: No such file or directory
dvd-vr.c:80:19: error: errno.h: No such file or directory
In file included from dvd-vr.c:81:
/Developer/usr/bin/../lib/gcc/i686-apple-darwin9/4.0.1/include/limits.h:10:25: error: limits.h: No such file or directory
dvd-vr.c:119: error: syntax error before ‘*’ token
dvd-vr.c:119: warning: type defaults to ‘int’ in declaration of ‘stdinfo’
dvd-vr.c:119: warning: data definition has no type or storage class
dvd-vr.c:121:22: error: langinfo.h: No such file or directory
dvd-vr.c: In function ‘percent_display’:
dvd-vr.c:164: warning: implicit declaration of function ‘fprintf’
dvd-vr.c:164: warning: incompatible implicit declaration of built-in function ‘fprintf’
dvd-vr.c:164: error: ‘stderr’ undeclared (first use in this function)

# Pádraig Brady: 18 Feb 2010
Looks like you're missing basic header files. Googling suggests that Mac OS X doesn't install them by default and that you need to install the "Xcode Tools" package.
# Eyal: 18 Feb 2010
Xcode Tools is installed and I can locate the header files on the system.
I'll try to reinstall Xcode Tools. Maybe I installed it before upgrading to Snow Leopard.
Will let you know.

# Eyal: 18 Feb 2010
I had old Xcode installed. Now I have the Snow Leopard Xcode installed and 'make' can find the headers.
But, It doesn't compile.

cc -std=gnu99 -Wall -Wextra -Wpadded -DVERSION='"0.9.4"' -O3 -DNDEBUG -DHAVE_ICONV -DICONV_CONST="" -c -o dvd-vr.o dvd-vr.c
dvd-vr.c: In function ‘get_label_base’:
dvd-vr.c:945: warning: implicit declaration of function ‘strndup’
dvd-vr.c:945: warning: incompatible implicit declaration of built-in function ‘strndup’
cc dvd-vr.o -liconv -Wl,-S -o dvd-vr
Undefined symbols:
"_strndup", referenced from:
_main in dvd-vr.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [dvd-vr] Error 1

Any idea?

# Pádraig Brady: 18 Feb 2010
Sigh. I released 0.9.5 to fix that.
# Eyal: 19 Feb 2010
Compiled in a sec.
Perfect - Thank you very much!
# Joey: 11 Aug 2010
I downloaded 0.9.6 and compile it on ubuntu 10.4 AMD64. It did successfully extracted vob files from vro file created by my panasonic DVD camcorder. However, when the vob files are played by Movie player and pitivi, at the beginning of the video, some green patterns appeared and lasted for less than a second. But VLC does not show the green pattern. I also extracted the same VOB files from a windows program which do not show these green patterns at the beginning at all. The files extracted by DVD-VR and my windows program are almost identical except one byte at the position 156 from the beginning. Windows's VOB is Hex 42, but DVD-VR is 02. If I change the 02 into 42, the DVD-VR extracted file play fine by Movie player. I am not familiar with VOB data structure and I am wondering if DVD-VR can be modified to generate 42 at the byte 156 rather than 02?

# Pádraig Brady: 11 Aug 2010
So dvd-vr may be incorrectly clearing a single bit.
Could you provide a vob file, or even the first part of it?
Also the small IFO file would be useful to have.
# anonymous: 11 Aug 2010
The VOB file is too big to send now. I will take a very short video later and email you the IFO, VRO file and extracted VOB file. But for now, the first a few line of the VOB file in Hex format looks like this:

Please notice the data 06 06 06 0B 02 where 02 would be 42 if I use my windows program to extract the same VRO file.

00 00 01 BA 44 00 04 00 04 01 01 89 C3 F8 00 00 01 BB 00 12 80 C4 E1 04 E1 7F B9 E0 E8 B8 C0 20 BD E0 3A BF E0 02 00 00 01 E0 07 D4 81 C1 0D 31 00 01 E2 A3 11 00 01 9C 41 1E 60 E8 00 00 01 B3 2C 01 E0 24 17 55 E3 81 10 11 11 12 12 12 13 13 13 13 14 14 14 14 14 15 15 15 15 15 15 16 16 16 16 16 16 16 17 17 17 17 17 17 17 17 18 18 18 19 18 18 18 19 1A 1A 1A 1A 19 1B 1B 1B 1B 1B 1C 1C 1C 1C 1E 1E 1E 1F 1F 21 00 00 01 B5 14 82 00 01 00 00 00 00 01 B5 25 06 06 06 0B 02 0F 00 00 00 01 B8 00 08 00 40 00 00 01 00 00 8F FF F8 00 00 01 B5 8F FF FB 9C 00 00 00 01 01 22 87 FC 6A E2 5C 52 48 53 51 8B 22 C2 CE 18 CA E9 0A 48 CB 8B 29 75 B3 46 1B 5C F4 DB 64 03 67 33 65 5B 03 02 47 2B 24 8B 28 60 47 8B 17 87 C9 67 A8 0D 1A 6C 42 8A 61 B7 AD FF 0A EB E7 BE F6 79 26 14 6B EA 40 F5 1C 55 46 A4 88 EB D3 A9 A5 DA 3F 25 1E A4 26 E6 E5 C7 ED D8 85 4F DD AC AE 86 39 6D 2C 62 AB 67 B1 00 D3 0D BD 7B 80 18 82 0F F4 39 7F DA
# Pádraig Brady: 12 Aug 2010
Hmm, this means that the Sequence Display Extension was set to 704x480,
whereas you're saying that 720x480 works without issue.
dvd-vr updates the SDE to work around players that don't set the aspect correctly,
and so dvd-vr updates the MPEG data with the aspect and resolution from the IFO index.
The aspect or resolution may be wrong in your IFO and so we'll need to work around it,
or perhaps dvd-vr is setting things incorrectly. Outputting debug info would help here.
So could you extract a problematic program as follows,
and email me (P@draigBrady.com) the resulting text file?

make clean
make DEBUG=1
./dvd-vr -p$NUM file.ifo file.vro > sde.txt

# Joey: 12 Aug 2010
I just sent the original IFO an and VRO files to you via email so that you can do a thorough analysis, I hope you will receive it since it was abot 4M in size. If have not received it, please let me know so that I will extract the debug info for you.

Thanks a lot, Joey
# Pádraig Brady: 12 Aug 2010
1 hour now, and still nothing?
Please converse using email from now on
# Joey: 12 Aug 2010
OK, I extracted the information as below.

I can see where the problem is here. My video clip is 640x480 since the aspect ratio is 4:3, but the IFO file says it is 704x480. I don't know what is SDE which say both 720x480 and 702x480.

format: DVD-VR V1.1
Number of info tables for VRO: 1
Number of vob formats: 1
pgit_ea: 00000086

tv_system : NTSC
resolution : 704x480
aspect_ratio: 4:3
video_format: MPEG2
audio_channs: 2
audio_coding: Dolby AC-3

Number of programs: 1

num : 1
label: 08.11.2010
VVOB info (1) address: 74
date : 2010-08-11 19:44:32
num time infos: 1
num VOBUs: 7
time offset: 0
vob offset: 0*2048
Found SH @ 0+60
Found SE @ 0+136 (type=1)
Found SDE @ 0+146 (720 x 480)
New SDE @ 0+146 (704 x 480)
size : 4,143,104
# Pádraig Brady: 12 Aug 2010
So IFO info may be incorrect.
I'd need to get the VOB/VRO to debug MPEG data fully.
# Joey: 12 Aug 2010
So what is the best way to send you the clips since email did not seem to work.
# Pádraig Brady: 26 Aug 2010
To complete the thread started by Joey.
The issue was tracked down to incorrectly updating all SDEs in some situtations. This then triggered other bugs in gstreamer based players. This was fixed in dvd-vr 0.9.7
# Matt Rosin: 21 Oct 2010
Nice software. I am converting a DVD recorded on a Japanese deck from TV.
On Mac OS X, I ran make and sudo make install. I found the program to be quite sensitive to the Japanese titles and the order of arguments.

First I got errors on converting SJIS to ASCII. Then I had errors about bad IFO file or bad VRO file. Finally I discovered it would work if I put the IFO file before the VRO file on the command line.

It converted, though giving errors that part of each track is encrypted. As I post this I am unable to display the resulting vob files in QT Player or VLC as-is, so I am running them through MPEG Streamclip. The first couple of times nothing useful came out (convert to MPEG, convert to MPEG with MP2 audio, convert to QT). I seem to be having some luck with convert to AVI but until finished I can't tell. One track said it couldn't be prepared, another seems to be working.

FYI I am posting some output. Sorry not sure what the device was. It generates a DVD_RTAV folder within which are VR_MANGR.BUP, VR_MANGR.IFO, and VR_MOVIE.VRO files. There are a lot of timecode skips it seems too. Mac's Disk Utility was able to image the DVD.

This is by the way a DVD with 10 recorded segments, MPEG 1/2 video, AC-3 audio, 720 x 480 I believe.

Still as I type this Streamclip is a turtle.. data rate 55 kbps is going to take years..


MacBook-Pro:DVD_RTAV mattr$ ls -l
total 6558472
-rwxrwxrwx 1 xxx staff 78589 Oct 10 15:49 VR_MANGR.BUP
-rwxrwxrwx 1 xxx staff 78589 Oct 10 15:49 VR_MANGR.IFO
-rwx------ 1 xxx staff 3357771776 Oct 10 15:49 VR_MOVIE.VRO
$ dvd-vr VR_MANGR.IFO
format: DVD-VR V1.1
Encryption: CPRM supported

tv_system : NTSC
resolution : 720x480
aspect_ratio: 16:9
video_format: MPEG2
audio_channs: 2
audio_coding: Dolby AC-3

Number of programs: 10

num : 1
Error converting text from SHIFT_JIS to US-ASCII
date : 2010-10-07 22:37:00
size : 13195264

num : 2
Error converting text from SHIFT_JIS to US-ASCII
date : 2010-10-07 23:25:00
size : 27041792

…10 in all.

MacBook-Pro:DVD_RTAV mattr$ dvd-vr VR_MOVIE.VRO
invalid DVD-VR IFO identifier

MacBook-Pro:DVD_RTAV mattr$ dvd-vr VR_MOVIE.IFO
Error opening [VR_MOVIE.IFO] (No such file or directory)

MacBook-Pro:DVD_RTAV mattr$ dvd-vr VR_MANGR.IFO
format: DVD-VR V1.1
Encryption: CPRM supported

tv_system : NTSC
resolution : 720x480
aspect_ratio: 16:9
video_format: MPEG2
audio_channs: 2
audio_coding: Dolby AC-3

Number of programs: 10

num : 1
Error converting text from SHIFT_JIS to US-ASCII
date : 2010-10-07 22:37:00
size : 13195264

num : 2
Error converting text from SHIFT_JIS to US-ASCII
date : 2010-10-07 23:25:00
size : 27041792

num : 3
Error converting text from SHIFT_JIS to US-ASCII
date : 2010-10-08 06:34:00
size : 66068480

MacBook-Pro:DVD_RTAV mattr$ dvd-vr VR_MOVIE.VRO
invalid DVD-VR IFO identifier

MacBook-Pro:DVD_RTAV mattr$ dvd-vr VR_MOVIE.VRO VR_MANGR.IFO
invalid DVD-VR IFO identifier

MacBook-Pro:DVD_RTAV mattr$ dvd-vr VR_MANGR.IFO VR_MOVIE.VRO
format: DVD-VR V1.1
Encryption: CPRM supported

tv_system : NTSC
resolution : 720x480
aspect_ratio: 16:9
video_format: MPEG2
audio_channs: 2
audio_coding: Dolby AC-3

Number of programs: 10

num : 1
Error converting text from SHIFT_JIS to US-ASCII
date : 2010-10-07 22:37:00
size : 13195264
Warning: program is encrypted

num : 2
Error converting text from SHIFT_JIS to US-ASCII
date : 2010-10-07 23:25:00
size : 27041792
Warning: program is partially encrypted

num : 3
Error converting text from SHIFT_JIS to US-ASCII
date : 2010-10-08 06:34:00
size : 66068480
Warning: program is partially encrypted

num : 4
Error converting text from SHIFT_JIS to US-ASCII
date : 2010-10-08 19:45:00
size : 2147454976
Warning: program is partially encrypted

num : 5
Error converting text from SHIFT_JIS to US-ASCII
date : 2010-10-09 00:11:00
size : 129783808
Warning: program is partially encrypted

num : 6
Error converting text from SHIFT_JIS to US-ASCII
date : 2010-10-09 01:11:00
size : 346243072
Warning: program is partially encrypted

num : 7
Error converting text from SHIFT_JIS to US-ASCII
date : 2010-10-09 05:45:00
size : 45580288
Warning: program is partially encrypted

num : 8
Error converting text from SHIFT_JIS to US-ASCII
date : 2010-10-09 09:09:00
size : 183003136
Warning: program is partially encrypted

num : 9
Error converting text from SHIFT_JIS to US-ASCII
date : 2010-10-09 22:41:00
size : 158697472
Warning: program is partially encrypted

num : 10
Error converting text from SHIFT_JIS to US-ASCII
date : 2010-10-10 00:01:00
size : 240703488
Warning: program is partially encrypted

MacBook-Pro:DVD_RTAV mattr$ ls -l
total 13116640
-rw-r--r-- 1 xxx staff 13195264 Oct 7 22:37 2010-10-07_22:37:00.vob
-rw-r--r-- 1 xxx staff 27041792 Oct 7 23:25 2010-10-07_23:25:00.vob
-rw-r--r-- 1 xxx staff 66068480 Oct 8 06:34 2010-10-08_06:34:00.vob
-rw-r--r-- 1 xxx staff 2147454976 Oct 8 19:45 2010-10-08_19:45:00.vob
-rw-r--r-- 1 xxx staff 129783808 Oct 9 00:11 2010-10-09_00:11:00.vob
-rw-r--r-- 1 xxx staff 346243072 Oct 9 01:11 2010-10-09_01:11:00.vob
-rw-r--r-- 1 xxx staff 45580288 Oct 9 05:45 2010-10-09_05:45:00.vob
-rw-r--r-- 1 xxx staff 183003136 Oct 9 09:09 2010-10-09_09:09:00.vob
-rw-r--r-- 1 xxx staff 158697472 Oct 9 22:41 2010-10-09_22:41:00.vob
-rw-r--r-- 1 xxx staff 240703488 Oct 10 00:01 2010-10-10_00:01:00.vob
-rwxrwxrwx 1 xxx staff 78589 Oct 10 15:49 VR_MANGR.BUP
-rwxrwxrwx 1 xxx staff 78589 Oct 10 15:49 VR_MANGR.IFO
-rwx------ 1 xxx staff 3357771776 Oct 10 15:49 VR_MOVIE.VRO

# Pádraig Brady: 21 Oct 2010
The shift JIS message seems to be because you running in a non UTF8 locale, or have not got iconv libraries installed. Do you get a warning about missing iconv when building? If not then I suggest setting your LC_ALL environment variable to something like en_US.utf8

The other warning is self evident:
Warning: program is partially encrypted
dvd-vr does not support decrypting cprm at present
So you'll have a little video at the start, then gibberish
# cao: 09 Nov 2010
i am using windows xp , can you tell me how to use your program please, i downloaded the dvd-vr, extract them but can't find dvd-vr.exe
# cao: 09 Nov 2010
what is cygwin1? i got cygwin1.dll (1830kb) in my cdrtools folder
# Pádraig Brady: 09 Nov 2010
You need to install cygwin, and select gcc, make, libiconv and build dvd-vr.exe
# cao: 10 Nov 2010
thanks, i'll get cygwin
# Gary Morris: 16 Nov 2010
You said "You need to install cygwin, and select gcc, make, libiconv and build dvd-vr.exe"

I installed cygwin.

How do I "select gcc?"
How do I run "Make, libiconv, and build dvd-vr.exe?"

I am assuming that gcc is the compiler but I run "gcc -help" and " gcc /h" and others to get a help file and nothing. It has been a long time since I wrote c code and compiled, can you be more specific with the steps I need to take?

Please help, I really need this program if it does what I think it will.

# Pádraig Brady: 16 Nov 2010
It's probably easier to install linux to a usb key/vm, or boot a live linux image? Anyway I don't have windows but others have used cygwin with success. Let me see...

Ok I went to http://www.cygwin.com/ and it says
"Run setup.exe any time you want to update or install a Cygwin package"
Having a look at the list of packages from a mirror (which may be further grouped under devel or something in the setup.exe interface) I would choose:

gcc4, make, libiconv, libiconv2, help2man, man, coreutils, tar, gzip

# Michael: 17 Feb 2012
I made a little change so that [label] works even if a program does not have a label. It falls back to the timestamp then:

# edvard: 03 Oct 2012
I have compiled DVD-VR on Windows XP 32-bit with cygwin and it works just fine on my son's 64-bit Win 7 laptop.
I also made a autohotkey script and exe to provide a convenient front end, do you have somewhere I could upload it and people test it?
# Pádraig Brady: 04 Oct 2012
While I _really_ appreciate the provision of the binary, I can't host or use it as I don't know what's in it really.
What would benefit a lot would be to provide exact instructions for how to setup the cygwin env and build the source.

Then I might be able to find a windows system where I could build the source, or at least host the detailed instructions.

# Pádraig Brady: 04 Oct 2012
While I _really_ appreciate the provision of the binary, I can't host or use it as I don't know what's in it really.
What would benefit a lot would be to provide exact instructions for how to setup the cygwin env and build the source.

Then I might be able to find a windows system where I could build the source, or at least host the detailed instructions.

# edvard: 05 Oct 2012
No worries, I totally understand. 99% of the time, I'm in my Linux box, but if I remember correctly, I just installed cygwin, put c:\cygwin\bin in %PATH% and used setup to install the "Development" category, then compiled with the 'make' command. The resulting dvd-vr.exe then can go in th e cygwin bin folder, or in it's own folder along with cygwin1.dll and cygiconv-2.dll.
For the GUI, you'll need Autohotkey, a bit of artwork 40x80 px named dvd_vr.gif (which can be changed in the script) and this script:
VroDir := A_MyDocuments
ExeDir := A_WorkingDIr

Gui, Add, Picture,w40 h80,dvd_vr.gif
Gui, Add, Text, x+5, Select folder where VRO files are located:
Gui, Add, Edit, vVroDir,%VroDir%
Gui, Add, Button, gGetFolder x+0 w75 , Browse
Gui, Add, Button, Default gSplit w120 h35 x55 y+5, Unpack VRO File
Gui, Add, Button, gGoExit x+5 wp+0 hp+0, Exit
Gui, Show,, DVD-VR GUI

FileSelectFolder,VroDir,*%VroDir%,2,Select Folder
if (VroDir="") {
VroDir := A_MyDocuments
MsgBox, Try again...
GuiControl,, VroDir, %VroDir%

RunWait,%ExeDir%\dvd-vr.exe "%VroDir%\VR_MANGR.IFO" "%VroDir%\VR_MOVIE.VRO",%VroDir%,hide
MsgBox, Operation complete.`nPlease check the folder for the extracted VOB files.

It's very simple, just pick the folder where the VRO file is, and it will call dvd-vr to unpack it to the same folder.
No options for renaming or unpacking to another folder, but it gets the job done and the Windows folks will be happy with something they can mouse around with ;)

If you'd like, when I get some time, I can write up some more detailed instructions for setting up cygwin and compiling dvd-vr, although it may not be necessary, as the process was quite easy.
# edvard: 05 Oct 2012
Okay, so here goes...
download the cygwin distribution from here:
Run setup, and follow the prompts until you get to a large window with a long list of categories.
Click the circled arrows next to the "Devel" category until the label next to it reads "Install" instead of "Default", then hit the "Next" button at the lower left of the window. When it's done, click "Finish".
No need to add C:\cygwin\bin to your PATH, but you can if you want.
Click Start -> All Programs -> Cygwin -> Cygwin Terminal
In the terminal, CD to the place where you unpacked DVD-VR (you did unpack it, didn't you?). Cygwin cd command acts like the Linux cd command, it's case-sensitive and has line completion via the tab key. Instead of "C:\", use "cygwindrive/c/".
Once you get in the folder where you unpacked, type "make" (no quotes) and it will compile to "dvd-vr.exe".
Now copy the files "cygwin1.dll" and "cygiconv-2.dll" from C:\cygwin\bin to the folder where you just compiled dvd-vr.exe, and run it.

To use the GUI I wrote, download and install Autohotkey:
Copy and paste the script above into a notepad and save as "dvdvrgui.ahk". Add your own 40x80 artwork as described above, and run the script, or you can compile it using the Autohotkey compiler at C:\Program Files\Autohotkey\Compiler.

# Pádraig Brady: 05 Oct 2012
Edvard thanks!
I'll update the info and link from the main page.
# Andrew: 04 May 2013
This is great, thank you.

However, when I try to separate a VRO into its VOB files, I get all the VOBs, but they are all 0 bytes.

What am I doing wrong?
# Pádraig Brady: 04 May 2013
Hmm, maybe the VOB data is zero unless unlocked or something like that? Could you email the smaller ifo file to me for inspection? If the VOB data wasn't too large, perhaps you could upload it somewhere for me to look at too, since this program now does inspect the mpeg data.
# Enrico: 21 Apr 2014
First at all my congratulation: I have found this program unique, as the only one allowing to split DVD-VR without re-encoding of the VOB.

I am using with DVD-VR generated by my Pioneer. The problem I have seen is that often a title is spread over several program NUM (somehow mapping chapters).
I have solved by adding a new parameter (-a) for merging (appending) contiguous program NUM with the same title or time-stamp. Have a look for including in a new version. This is my first experience in C, but it appears working fine.

Further, I have found useful the autohotkey work. So I done one that takes input DVD_RTAV directly from a DVD driver and allows to set the output directory. Named "dvdvrgui DVD.ahk"

All changes for a V0.9.8 are here (+ the .ahk script):

# Pádraig Brady: 21 Apr 2014
@Enrico, thanks a lot for the patch!
So this is a useful feature which I'll include.
Please email your full name and email address to P@draigBrady.com so I can give appropriate credit.

Note it would be really great to avoid having to use -a to enable this option. Would it be possible for you to send an IFO file to see can I auto detect these "contiguous programs".
I'm guessing there might be some extra info tying these programs togther, rather than just the labels.
# BlueChip: 01 May 2015

This is simply a BIG Thank You ...I've been transferring my VHS to digital using a Panasonic DMR ES10 and a couple of DVD-RAM disks ...I have been going mad trying to find an easy way to break the VRO in the individual recordings ...After two weeks of hunting I found dvd-vr; installed cygwin; and am now very happy I do not have to try and reverse engineer the IFO file :)

...I would have liked it if you had a win32 executable available for download - but at least I now have a proper dev environment on my Windows box.

Once more: Thanks,
# BlueChip: 02 May 2015
Hi again,

I have made a trivial mod to the code so the output filename is of the format #001_ProgramName.vob (instead of ProgramName#001.vob) [yes, Pádraig, I remembered to increase the filename buffer by 1 - lol] ...Why? 'Cos that's what I personally wanted <shrug>

If you want a recent win32 compile, I have uploaded the result here: http://homepage.ntlworld.com/cyborgsystems/dvd-vr/
...tested and working brilliantly :)

...I also wrote a little "drag'n'drop batch file" to make my life easier - that is also in the zip file if you want it.

# Pádraig Brady: 03 May 2015
@BlueChip, thanks for the info.

I host no binaries on my site, as there is no way for users to know their contents, but I'll leave the link to yours above,
to let others decide.

For security I suggest users compile from source.

# BlueChip: 14 May 2015
Hi Pádraig,

I've been trying to work through your code and understand what is going on inside the IFO and VOB, but from a starting-point of zero-knowledge it is very hard to follow what is going on.

Have you considered putting together a zip-bundle of the documentation you used ...and perhaps some notes to help point newcomers at the most important bits?

# Pádraig Brady: 14 May 2015

This summarizes my reverse engineering notes:
# Tadayoshi Sato: 04 Mar 2017
Is this project still active?

I find this tool very useful and am trying to push it to homebrew for Mac users.

# Pádraig Brady: 04 Mar 2017
Cool thanks. I commented on that thread.
# Uncle D.: 29 Apr 2017
Very useful tool!Thanks!It works perfectly with Canon DC 100E.
# DrRob: 04 Feb 2018
Just refound this tool while trying again to sort out our home Canon DC50E camcorder recordings. Excellent, thanks!

One small thing - I had a "dereferencing type-punned pointer will break strict-aliasing rules" error when trying to build it in an Ubuntu 16.04 Docker container, for line 1591 of dvd-vr.c. I've fixed it by changing the line to this:

uint16_t vobu_size = ((*(uint8_t*)(&vobu_info->vobu_info[1]))<<0)+((*(uint8_t*)(&vobu_info->vobu_info[2]))<<8);

which isn't great because it assumes a certain endianness. Maybe someone knows a better way?
# Pádraig Brady: 05 Feb 2018
Note your expression could be simplified to:

uint16_t vobu_size = vobu_info->vobu_info[1] + (vobu_info->vobu_info[2]<<8);

The assumed endianess is correct, as all dvd-vr structures are big endian.
The NTOHS on the next line, adjusts accordingly.

We can simplify further by picking appropriate types in the structure in the first place.
I've done that in https://github.com/pixelb/dvd-vr/commit/e93a77

# DrRob: 24 Mar 2018
Thank you for fixing it.

FYI, I gave this tool a mention in a blog posting: http://ideasandbox.blogspot.co.uk/2018/03/extracting-timestamped-video-clips-from.html
(no HTML)