Log in

View Full Version : DVD-VR format reverse engineered


pixelbeat
26th February 2007, 12:15
As far as I know, this (http://www.pixelbeat.org/programs/dvd-vr/) is the first open source, linux program to support DVD-VR format (http://www.pixelbeat.org/docs/DVD-VR/) discs,
as used by DVD recorders including DVD camcorders.
It identifies and optionally copies the individual programs (VOBs) from a DVD-VR format disc

Any feedback appreciated.

setarip_old
26th February 2007, 19:08
Hi!to support DVD-VR discsBefore considering clicking on a link, it would be good to know what you mean by "support".

Does it support Creating, Reading, Duplicating, or Modifying such DVDs? Or do you mean yet something else?

Is it freeware, shareware, or commercial?

awhitehead
26th February 2007, 22:46
Hi!Before considering clicking on a link, it would be good to know what you mean by "support".

Does it support Creating, Reading, Duplicating, or Modifying such DVDs? Or do you mean yet something else?

Is it freeware, shareware, or commercial?

Hrm. You'd think that a program that has a source available can be considered "freeware" in a sense that you can download a functional version without having to pay for it, or a the very least compile a functional version for yourself.

And considering that the page says "dvd-vr is a utility to identify and optionally copy the individual programs from a DVD-VR format disc", it seems like it supports "Reading".

I am sorry, setarip_old, I am new around here, so I am confused: What's a big deal about clicking on a link?

pixelbeat: Thank you very much for creating this program, and an additional thank you for making source code for it available.

setarip_old
26th February 2007, 23:07
I am sorry, setarip_old, I am new around here, so I am confused: What's a big deal about clicking on a link?Too many possibilities regarding what effect clicking on an unproven link might have on one's system to give you a concise answer.

If someone is going to post a link to a heretofore unknown program, the least that person can do is provide meaningful information in the post about that program - including whether it's freeware, shareware, or commercial. (There are rules at this and most other forums about "advertising" commercial products).

awhitehead
26th February 2007, 23:18
I've attempted to send the following as a private message, as this is truly off topic, but since you chose not to accept private messages....

This is my last comment on the subject.


If someone is going to post a link to a heretofore unknown program, the least that person can do is provide meaningful information in the post about that program - including whether it's freeware, shareware, or commercial. (There are rules at this and most other forums about "advertising" commercial products).

This is my opinion, but perhaps you are being underservedly mean to someone who did a first post stating that he wrote a program that is actually useful to the community. He clearly stated that his program is open source. Frankly, I have interest in the original author to continue writing software, and offering it as open source to the community, as this software is either directly useful to me, or will be in the future. Thus I can't fathom why you are so negative in your replies.

As for clicking on things.... It's your choice, really, but I am not sure that muselix or anyone else got such a negative reaction when they popped out of the blue and posted their software on rapidshare, etc, where there was even less accountability. What if BackupHD-DVD were a trojan? But no, nobody complained at the time, I don't think. So it sounds like a double standard.

Andrew.

blutach
26th February 2007, 23:54
@setarip_old

If you don't want to click on the link, don't do so. Your actions are simply inflammatory.

@pixelbeat - it seems the download is uncompiled.



Regards

setarip_old
27th February 2007, 02:06
There is certainly nothing inflammatory in my initial post in this thread, which essentially makes the same request, in different words, that "neuron2" makes regarding a similar posting at:

http://forum.doom9.org/showthread.php?p=961783#post961783 Please tell us what this program does. Thank you.

Perhaps it would have been preferable if I had been discourteous and not responded candidly, or at all, to "awhitehead"...

hoozdapimp
27th February 2007, 03:41
there is a difference. The post you mentioned contains a link to a zip file. His link takes you to a page that describes the program in more detail.

If you too paranoid to open a link...well like others said, don't click on it.

blutach
27th February 2007, 06:45
@setarip_old

2 things:

1. You are arguing with me in this thread, which you have basically hijacked. I am now saying, leave it here and let's get on with the topic or risk a strike.

2. neuron2 asked in a very different way. It is not for you to compare how you come across to how neuron2 does, nor it is for you to quasi moderate this forum.

Now, let's move on.

Regards

communist
27th February 2007, 07:21
Ok back on topic. I've recently recorded something on DVD-RAM with a DVD-Recorder and the file structure is as mentioned (RT-AV), the recorder allows trimming / playlists etc.
Under windows I just copied the RT-AV folder and loaded up the biggest file in DGIndex, indexed it - frameserved with AviSynth and converted to another format.

Since my linux boxes dont sport any DVD drives I cant test the tool, but please tell me if I understood it right:
- DVD-VR ripper will allow me to extract the individual programs (as recorded by the recorder) as individual files
- if I just mounted a DVD-RAM and copied over the files, they would still work - but everything would be in one file?

Thanks for any answers and for your tool :)

/EDiT, tried to compile it just for fun and got some errors when I try with just $make:
dataman@oldunit:~/dvd-vr-0.1$ make
gcc -DNDEBUG -std=c99 -Wall -Wpadded -c -o dvd-vr.o dvd-vr.c
dvd-vr.c:56:10: fehlendes abschließendes Zeichen '
dvd-vr.c:57:10: fehlendes abschließendes Zeichen '
dvd-vr.c:58:10: fehlendes abschließendes Zeichen '
make: *** [dvd-vr.o] Fehler 1
Fehlendes abschließendes Zeichen ~ missing closing symbol '

Thats with gcc 3.3.5 / Kernel 2.4.27 under Debian 3.1 R4.

pixelbeat
27th February 2007, 11:22
You can test the tool without a DVD drive.
Just make the IFO and VRO files available to the program.
In fact you can just make the much smaller IFO file available
and the dvd-vr program will just give you info about the
programs on the disc.

DVD-VR ripper will allow you to extract the individual programs (as recorded by the recorder) as individual [VOB] files

If you just mounted a DVD-RAM and copied over the files, then you would just get 1 large VRO file containing all your programs (including any programs you deleted). You also wouldn't have
time and date info for when the programs were recorded.

You got compilation errors in an '#if 0' block with gcc 3.3.5 which is weird. You can delete lines 56-58 or 1-72 for that matter.
I'll look into this issue further.

thanks!
Pádraig.

dontasciime
27th February 2007, 12:11
Any chance of a binary for this, thanks

pixelbeat
27th February 2007, 12:37
It's trivial to compile? I should have mentioned that this is a UNIX program,
and so should compile on Linux, FreeBSD &/or Mac OS X.
I've only tested it on linux, so here's the linux binary (http://www.pixelbeat.org/programs/dvd-vr/dvd-vr-0.1/dvd-vr) for v0.1 (8.7K)

awhitehead
27th February 2007, 14:50
It's trivial to compile? I should have mentioned that this is a UNIX program,
and so should compile on Linux, FreeBSD &/or Mac OS X.
I've only tested it on linux, so here's the linux binary (http://www.pixelbeat.org/programs/dvd-vr/dvd-vr-0.1/dvd-vr) for v0.1 (8.7K)

It doesn't actually build under Mac OS X, since it lacks glibc, which this program assumes. For what it's worth:

awhitehead@toaster:~/src/dvd-vr-0.1[08:40 AM]$ make
gcc -DNDEBUG -std=c99 -Wall -Wpadded -c -o dvd-vr.o dvd-vr.c
dvd-vr.c: In function 'stream_data':
dvd-vr.c:178: warning: implicit declaration of function 'posix_fadvise'
dvd-vr.c:178: error: 'POSIX_FADV_DONTNEED' undeclared (first use in this function)
dvd-vr.c:178: error: (Each undeclared identifier is reported only once
dvd-vr.c:178: error: for each function it appears in.)
dvd-vr.c:205:1: warning: "NTOHS" redefined
In file included from /usr/include/ppc/endian.h:107,
from /usr/include/machine/endian.h:30,
from /usr/include/sys/wait.h:182,
from /usr/include/stdlib.h:64,
from dvd-vr.c:81:
/usr/include/sys/_endian.h:107:1: warning: this is the location of the previous definition
dvd-vr.c:206:1: warning: "NTOHL" redefined
/usr/include/sys/_endian.h:106:1: warning: this is the location of the previous definition
dvd-vr.c: In function 'main':
dvd-vr.c:415: error: 'POSIX_FADV_SEQUENTIAL' undeclared (first use in this function)
dvd-vr.c:429: warning: implicit declaration of function 'mremap'
dvd-vr.c:429: error: 'MREMAP_MAYMOVE' undeclared (first use in this function)
dvd-vr.c:429: warning: assignment makes pointer from integer without a cast
make: *** [dvd-vr.o] Error 1
awhitehead@toaster:~/src/dvd-vr-0.1[08:40 AM]$ gcc -v
Using built-in specs.
Target: powerpc-apple-darwin8
Configured with: /private/var/tmp/gcc/gcc-5341.obj~1/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=powerpc-apple-darwin8 --host=powerpc-apple-darwin8 --target=powerpc-apple-darwin8
Thread model: posix
gcc version 4.0.1 (Apple Computer, Inc. build 5341)
awhitehead@toaster:~/src/dvd-vr-0.1[08:40 AM]$ uname -a
Darwin toaster.lan 8.8.0 Darwin Kernel Version 8.8.0: Fri Sep 8 17:18:57 PDT 2006; root:xnu-792.12.6.obj~1/RELEASE_PPC Power Macintosh unknown
awhitehead@toaster:~/src/dvd-vr-0.1[08:41 AM]$

(This is Mac OS X 10.4.8 on PowerPC)

MREMAP_MAYMOVE and POSIX_FADV_SEQUENTIAL seem to be GNUisms. There seem to be some endianness issues as well.

I gave it a whirl under Solaris Express, Build 51 of Nevada (About 3 months old install, that was not updated):


awhitehead@copper:/tmp/dvd-vr-0.1[08:46 AM]$ uname -a
SunOS copper.research.local 5.11 snv_51 i86pc i386 i86pc Solaris
awhitehead@copper:/tmp/dvd-vr-0.1[08:47 AM]$ gcc -v
Reading specs from /usr/sfw/lib/gcc/i386-pc-solaris2.11/3.4.3/specs
Configured with: /builds1/sfwnv-gate/usr/src/cmd/gcc/gcc-3.4.3/configure --prefix=/usr/sfw --with-as=/usr/sfw/bin/gas --with-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++,f77 --enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-20050802)
awhitehead@copper:/tmp/dvd-vr-0.1[08:47 AM]$ make
gcc -DNDEBUG -std=c99 -Wall -Wpadded -c -o dvd-vr.o dvd-vr.c
dvd-vr.c: In function `touch':
dvd-vr.c:149: warning: implicit declaration of function `futimes'
dvd-vr.c: In function `stream_data':
dvd-vr.c:178: warning: implicit declaration of function `posix_fadvise'
dvd-vr.c:178: error: `POSIX_FADV_DONTNEED' undeclared (first use in this function)
dvd-vr.c:178: error: (Each undeclared identifier is reported only once
dvd-vr.c:178: error: for each function it appears in.)
dvd-vr.c: In function `main':
dvd-vr.c:415: error: `POSIX_FADV_SEQUENTIAL' undeclared (first use in this function)
dvd-vr.c:418: warning: initialization from incompatible pointer type
dvd-vr.c:429: warning: implicit declaration of function `mremap'
dvd-vr.c:429: error: `MREMAP_MAYMOVE' undeclared (first use in this function)
dvd-vr.c:429: warning: assignment makes pointer from integer without a cast
dvd-vr.c:566: warning: passing arg 1 of `munmap' from incompatible pointer type
make: *** [dvd-vr.o] Error 1
awhitehead@copper:/tmp/dvd-vr-0.1[08:47 AM]$


So I guess I am looking at an alternative (maybe ifdefed) of
#define _GNU_SOURCE /* for posix_fadvise() and futimes() */

pixelbeat
27th February 2007, 15:11
Thanks a million for checking these systems.
Looks like posix_fadvise() isn't supported by many posix systems :)
The good news is it's only to tell the system to not
fill the cache with the video data, so you can comment it out.

Also futimes could be replaced with the less efficient utime(),
but can temporarily be commented out as it only sets the
modification times of the resultant VOBs appropriately.

I'll look into doing a more portable mremap() in the next version.

thanks again.
Pádraig.

awhitehead
27th February 2007, 21:01
Under macosx ntohs and ntohl are pre-defined, so that particular problem goes away if I ifndef around it, and compile if with a platform specific define (just created a new target for Makefile, "make macosx", that adds -DMACOSX to gcc arguments):

From OS X /usr/include/sys/_endian.h:

[...]
#if defined(KERNEL) || !defined(_POSIX_C_SOURCE)
#define NTOHL(x) (x) = ntohl((u_long)x)
#define NTOHS(x) (x) = ntohs((u_short)x)
#define HTONL(x) (x) = htonl((u_long)x)
#define HTONS(x) (x) = htons((u_short)x)
#endif /* defined(KERNEL) || !defined(_POSIX_C_SOURCE) */
#endif /* !_SYS__ENDIAN_H_ */

pixelbeat
30th March 2007, 10:53
It compiles at least on Mac OS X on intel.
It should work on any POSIX system.
http://www.pixelbeat.org/programs/dvd-vr/

cheers,
Pádraig.

pixelbeat
15th November 2007, 00:49
You can now download version 0.4 (http://www.pixelbeat.org/programs/dvd-vr/dvd-vr-0.4.tar.gz).

Added functionality includes:

Allow specifiying a particular program to process, rather than all programs.
Generate globally unique filenames using timestamps.
Report program labels.
Report 480x480 resolution discs.

pierdeux
18th November 2007, 09:35
@setarip_old

If you don't want to click on the link, don't do so. Your actions are simply inflammatory.



@setarip_old : at best youre creating "noise", or, even worse you are attempting to fix some bragging problem of yours...

HyperHacker
19th November 2007, 00:44
But was it really necessary to say that 9 months later? :p

pixelbeat
9th April 2008, 17:30
More portability fixes.
Now compiles on cygwin as well as Mac OS X and linux.

Better support for lables/titles, including Japanese Kanjii conversion.

Fix extracted filename clashing issues.

http://www.pixelbeat.org/programs/dvd-vr/

pixelbeat
3rd June 2008, 21:27
Better extraction of text labels.
Fixes a crash that happens if files to extract already exist.
skips and visualizes read errors.

http://www.pixelbeat.org/programs/dvd-vr/

pixelbeat
7th November 2008, 01:18
A few more DVD-VR fields were decoded,
and some extra DVD-VR variations were supported.

Lots of packaging cleanups to make this
command line tool easier to build and use.

http://www.pixelbeat.org/programs/dvd-vr/

sl1pkn07
7th November 2008, 19:01
sl1pkn07@SpinFlo:~/aplicaciones/dvd-vr-0.8$ make
gcc -std=gnu99 -Wall -Wextra -Wpadded -DVERSION='"0.8"' -O3 -DNDEBUG -DHAVE_ICONV -DICONV_CONST="" -c -o dvd-vr.o dvd-vr.c
dvd-vr.c: En la función ‘get_options’:
dvd-vr.c:821: aviso: la comparación con una literal de cadena resulta en una conducta no especificada
dvd-vr.c: En la función ‘main’:
dvd-vr.c:964: aviso: la comparación con una literal de cadena resulta en una conducta no especificada
dvd-vr.c:988: aviso: la comparación con una literal de cadena resulta en una conducta no especificada
gcc dvd-vr.o -Wl,-S -o dvd-vr
sl1pkn07@SpinFlo:~/aplicaciones/dvd-vr-0.8

pixelbeat
9th November 2008, 02:00
This release just addresses the above compile warning which didn't happen on my gcc 4.1.2 linux system at least. Thanks for taking the time to inform me of this issue.

http://www.pixelbeat.org/programs/dvd-vr/

sl1pkn07
9th November 2008, 19:38
thanks :)

pixelbeat
24th February 2009, 12:28
Support VROs > 4.2 GB.
Modify extracted video to apply aspect ratio from IFO index file.
Modify extracted video to use more standard aspect ratio encoding.

http://www.pixelbeat.org/programs/dvd-vr/

pixelbeat
16th February 2010, 03:07
Changes since 0.9:

* Identify and abort extracting CPRM encrypted discs.
* Fix label (program set) identification on some discs.
* Support --name="[label]" to generate extracts names
based on the (sanitized) label or title.

http://www.pixelbeat.org/programs/dvd-vr/

Ghitulescu
16th February 2010, 08:30
Maybe I'm wrong, but I thought that most DVD-Recorders (I don't know about camcorders, I never had a DVD one) do activate CPRM on any DVD+-RW, and I think would refuse to record in case the disk is not CPRMable. Mine at least and it's the first generation ever. So skipping CPRM disks or individual programs on a disk is no good at all.
TMPGEnc DVD author can extract the data from these disks.
PS: I stomped accidentally on this page, but it looks promising.
PS2: I haven't tried the software, is there a precompiled version for XP 32b?

pixelbeat
16th February 2010, 10:44
Some DVD recorders are CPRM capable and set the corresponding bit on the CD, however they don't actually encrypt the content.

Some do of course, and dvd-vr will warn you accordingly now.

My DVD camcorder knows nothing about CPRM.

For windows you'll need to get cygwin with the gcc, make and libiconv packages at least.

dreammaker
1st April 2010, 00:57
Please make a windows application for this usefull program :) . Thanks

Ghitulescu
1st April 2010, 09:18
Some DVD recorders are CPRM capable and set the corresponding bit on the CD, however they don't actually encrypt the content.
Well, I thought you said that your software did recognized CPRM and refused to copy the files. In fact, you say that your software recognizes the CPRM disks and refuses to copy the files only when they are actually encrypted.