# HOWTO: dvdshrink in wine

## ericxx2005

This is my first howto, so it hope it works out for everyone.  I don't know if anyone has posted this before, but here it goes:

First:

```
emerge wine
```

copy /usr/share/wine/config to your home wine directory

```
cp /usr/share/wine/config yourhomedir/.wine/
```

add this to the config file just above # [/wineconf]:

```
[AppDefaults\\DVD Shrink 3.2.exe\\Version]

Windows = winxp
```

save, exit

Then download dvdshrink from dvdshrink.org

unzip dvdshrink32setup.zip:

```
unzip dvdshrink32setup.zip
```

as the user you plan to use dvdshrink with:

```
wine dvdshrink32setup.exe
```

then configure your dvd drive with winecfg:

```
winecfg
```

It will tell you that it is not yet work, but it will for the purpose of this howto.  Go to the 'drives' tab, then click 'add'.  It will add a D: drive.  Highlight the 'D:' drive, then change 'path' to your mounted dvd directory (i.e. /mnt/cdrom).  Change 'type' to "CD-ROM".  Hit OK and exit.

then travel to ~/.wine/drive_c/Program Files/DVD Shrink/

type

```
wine DVD Shrink 3.2.exe
```

You should now be able to open the DVD without the 'ASPI error'

----------

## Kraymer

Thanks man!

Your howto was the first hit on 'wine aspi' search. I hate wine configuration  :Sad:  However, with your article, I got dvdshrink working in a minute!  :Cool: 

Sebastian

----------

## TomCat1

I had problem with install. Instalation was not even started. Problem was with riched20.dll library. It is described here. http://mrbass.org/linux/ubuntu/dvdshrink/

----------

## daff

To make this work you need a working wine configuration first. This being the first time I ever used wine I emerged winesetuptk and let it figure out the needed configuration by itself. I then added the AppDefaults section as described by ericxx2005 and ran the DVD Shrink installation. The winecfg step wasn't neccessary, winesetuptk did all that.

DVD Shrink now runs fine it seems.

Thanks for the HOWTO!

----------

## iainvt

I have been trying to get wine to shrink to detect drives without aspi errors for ages, great guide mate.

----------

## maschievano

 *ericxx2005 wrote:*   

> This is my first howto, so it hope it works out for everyone.  I don't know if anyone has posted this before, but here it goes:
> 
> First:
> 
> ```
> ...

 

Good guide, but how to browse file in HD?

When i use this function it shows me only desktop and I van't open it. (i need to pick some file in /mnt/hdb1/ecc.)

Thanks

----------

## mrbass

you can't browse for a VIDEO_TS in dvdshrink...however if you insist ripping the dvd to VIDEO_TS dir then start up dvdshrink like so

wine .wine/fake_windows/Program\ Files/ DVDShrink/DVDShrink.exe "D:\VIDEO_TS"   or something like that.  Also you can rip directly from DVD with dvdshrink (not recommended because when it 'deep analyzes' it doesn't use DMA.  What I do is rip to .iso in dvddecrypter and in dvdshrink 'open disc image'.

----------

## ralle

Great Guide!

I had problems Ripping a CSS encrypted DVD, however. I got something like "Failed to read file D:\ - Not ready", although the disc was mounted.

I solved this with these easy steps:

mplayer dvd://1

mount /mnt/cdrom/

Start DVD Shrink

So it seems like mplayer does something with the CSS that makes it work.

----------

## ericxx2005

I don't know too much about how it works, just how to get it to work.  Any problems, (i.e. ralle's, maschievano's, and mrbass', I'm not sure.  Maybe some searching will help. I'm going to look up some stuff throughout this week, and hopefully, I will be able to update my howto, and include everyones questions and answers.  I think dvdshrink is a wonderful program, and should be fully functional in Linux for people that need it working.  However, some commercial programs, (I forget which ones) garantee this program to work after purchase.  I will also include a link to this so people that need this program to work for business purposes will be able to use dvdshrink and have tech support.

----------

## Greven

Hello,

Could you post this on http://www.wine-wiki.org?  The Gentoo forums fill up to fast, but the wiki will always be there.

~Jason

----------

## jernst

 *Greven wrote:*   

> Hello,
> 
> Could you post this on http://www.wine-wiki.org?  The Gentoo forums fill up to fast, but the wiki will always be there.
> 
> ~Jason

 

Why ?

Any application-specific how-to should be added to Wine's application database: http://appdb.winehq.org

These informations were available a long time ago from the DVD Shrink AppDB entry here:

http://appdb.winehq.org/appview.php?versionId=2230

----------

## regeya

Excellent.  As it turns out I had a braindead setup from a previous install under a previous distro, and a clean start in that department yielded a working WINE and DVDShrink.  I had been ripping via dvdbackup and reading from disk, but this is much better!  Thanks for a step in the right direction.   :Very Happy: 

----------

## ajayrockrock

I don't have anything to add other then THANKS FOR POSTING THIS!!!

dvdshrink was the only reason I still kept a windows partition.  Now I can finally re-format and get rid of windows forever.

Thanks,

Ajay

----------

## ericxx2005

It seems that something with the newer versions of wine (the versions that stopped using the config file and switched to the registry) has made it not install.  While installing and picking out a folder to install, it says "folder not valid".  Anyone else confirm this?  I haven't found a workaround yet.

----------

## jernst

This is fixed in Wine 0.9 and later.

----------

## ericxx2005

Okay, I just emerged wine-0.9 and it did work.  Thanks

----------

## Guzymuzy

I've got DVD Shrink and DVD Decrypter running with wine-0.9.

Everything is just fine. It finds the DVD Disk even unmounted, make Analysis with preview.

But DVD Shrink is crashing after I push Re-author button. I get a freezed DVD Shrink screen.

Any Help?

Gustavo Motta

----------

## Guzymuzy

I found a way to do what I wanted.

Don't push open dvd. Push Re-author first, then choose the drive where the DVD disk is.

Now I can choose main movie only and select audio streams and subtitles.

Gustavo Motta

----------

## kroenecker

I have a slight problem.  When I try to run dvd shrink 3.2, I am unable to compress the information created after running the analysis.

Custom ratio does nothing.  The value remains at 100%.  Automatic does nothing.

Any suggestions?

----------

## opqdan

 *kroenecker wrote:*   

> I have a slight problem.  When I try to run dvd shrink 3.2, I am unable to compress the information created after running the analysis.
> 
> Custom ratio does nothing.  The value remains at 100%.  Automatic does nothing.
> 
> Any suggestions?

 EDIT: I fixed it, see bottom

I've got the same problem, except I can move the bar between 97.5 and 100%, but I can go no lower.  Anybody have any idea?  Wine and DVD Shrink are latest versions.

EDIT: I only have this problem when reading directly from the DVD.  When I run the analysis it looks real messed up and only runs at 9 frames per second.  Try using k3b or something similar to make an image of the disc.  If you analyze the image it will work fine, you can then compress that. Worked fine for me.

----------

## kroenecker

This works for me:

 *Quote:*   

> 
> 
> vobcopy /media/cdrom0 -l -n 1 -O . -t moviename  
> 
> OR 
> ...

 

And this is for personal dvds of course   :Wink: 

----------

## mlybarger

i'm using dvdshrink under wine just fine.  first i use dvdbackup to extract the files:

dvdbackup -M -i /dev/dvd -o /home/user/.wine/drive_c/foo

then, i use dvdshrink to, er, shrink the disk.   this is gui based.  i'd like to script this if possible, or alternatively run multiple versions of dvdshrink when i need to shrink more than one item at a time.

finally, i use mkisofs to create a burnable iso image.

mkisofs -dvd-video -v -o /home/user/foo.iso /home/user/.wine/drive_c/foo/

----------

## MetalEdge

Anyone know why I get this error trying to run winecfg:

```
/usr/local/bin/wine: error while loading shared libraries: libntdll.dll.so: cannot open shared object file: No such file or directory
```

I am confused as to how to fix this.  I had a very old version of wine and just recently installed the latest.  Any suggestions?  I am exciting in getting DVD Shrink to work...

Thanks

----------

## noizeez

 *mark_lybarger wrote:*   

> i'm using dvdshrink under wine just fine.  first i use dvdbackup to extract the files:
> 
> dvdbackup -M -i /dev/dvd -o /home/user/.wine/drive_c/foo
> 
> then, i use dvdshrink to, er, shrink the disk.   this is gui based.  i'd like to script this if possible, or alternatively run multiple versions of dvdshrink when i need to shrink more than one item at a time.
> ...

 

I thought, after first reading the howto, of talking 'bout dvdbackup, but it's done.

I also use dvdbackup to rip the DVD to HD, then i use dvdshrink to get the movie in my language and compress it for DVD 4Go burn. That was the solution i used when i was a windows user (dvd decrypter instead of dvdbackup), but i works all fine with this solution. For burning the DVD, i use K3B.   :Very Happy: 

----------

## kudude

I have dvdshrink finally up and running.  thanks guys

i have a question however, that i haven't seen a similar problem to.  When I open an .iso that i've made, I can't compress the main movie more than 84.2%.  The is a problem since that makes the disk larger than allowed for a dvd5.  Has anyone seen issues like this and a way to fix them?  thanks again

----------

## ericxx2005

sorry for the late response.  kudude, you might want to try extracting the .iso before opening it with dvdshrink.  i've never tried to open an .iso from dvdshrink, but it's SUPPOSED to work.  :Wink: 

----------

## Doctor Corndog

Hmmm... I don't know what I'm doing wrong. I'm getting the APSI error when I try to open the disk. I've gone over this post about a million times today, but I must be missing something. Here is what my config file looks like & it is in both of these locations:

/usr/share/wine

/home/bryan/.wine

```
WINE REGISTRY Version 2

;; All keys relative to \\Machine\\Software\\Wine\\Wine\\Config

;; If you think it is necessary to show others your complete config for a

;; bug report, filter out empty lines and comments with

;; grep -v "^;" ~/.wine/config | grep '.'

;;

;; MS-DOS drives configuration

;;

;; Each section has the following format:

;; [Drive X]

;; "Path"="xxx"       (Unix path for drive root)

;; "Type"="xxx"       (supported types are 'floppy', 'hd', 'cdrom' and 'network')

;; "Label"="xxx"      (drive label, at most 11 characters)

;; "Serial"="xxx"     (serial number, 8 characters hexadecimal number)

;; "Filesystem"="xxx" (supported types are 'msdos'/'dos'/'fat', 'win95'/'vfat', 'unix')

;;   This is the FS Wine is supposed to emulate on a certain

;;   directory structure.

;;   Recommended:

;;   - "win95" for ext2fs, VFAT and FAT32

;;   - "msdos" for FAT16 (ugly, upgrading to VFAT driver strongly recommended)

;;   DON'T use "unix" unless you intend to port programs using Winelib !

;; "Device"="/dev/xx" (only if you want to allow raw device access)

;;

[Drive C]

"Path" = "/home/bryan/.wine/fake_windows"

"Type" = "hd"

"Label" = "/home/bryan/.wine/fake_windows"

"Filesystem" = "win95"

[Drive D]

"Path" = "/mnt/cdrom"

"Type" = "cdrom"

"Label" = "/mnt/cdrom"

"Filesystem" = "win95"

"Device" = "/dev/cdroms/../hda"

[Drive E]

"Path" = "/mnt/usbstick"

"Type" = "cdrom"

"Label" = "/mnt/usbstick"

"Filesystem" = "win95"

"Device" = "/dev/sdb1"

[Drive X]

"Path" = "/tmp"

"Type" = "hd"

"Label" = "Tmp Drive"

"Filesystem" = "win95"

[Drive Y]

"Path" = "%HOME%"

"Type" = "network"

"Label" = "Home"

"Filesystem" = "win95"

[Drive Z]

"Path" = "/"

"Type" = "hd"

"Label" = "Root"

"Filesystem" = "win95"

[wine]

"Windows" = "C:\\Windows"

"System" = "C:\\Windows\\System"

"Temp" = "X:\\"

"Path" = "C:\\Windows;C:\\Windows\\System;X:\\;X:\\test;Y:\\"

"GraphicsDriver" = "x11drv"

; Wine doesn't pass directory symlinks to Windows programs by default.

; Enabling this may crash some programs that do recursive lookups of a whole

; subdir tree in case of a symlink pointing back to itself.

;"ShowDirSymlinks" = "1"

;"ShowDotFiles" = "1"

"ShellLinker" = "wineshelllink"

# [wineconf]

[Version]

; Windows version to imitate (win95,win98,winme,nt351,nt40,win2k,winxp,win2k3,win20,win30,win31)

"Windows" = "winxp"

; DOS version to imitate

;"DOS" = "6.22"

; Be careful here, wrong DllOverrides settings have the potential

; to pretty much kill your setup.

[DllOverrides]

; some dlls you may want to change

"oleaut32" = "builtin, native"

"ole32" = "builtin, native"

"commdlg" = "builtin, native"

"comdlg32" = "builtin, native"

"shell" = "builtin, native"

"shell32" = "builtin, native"

"shfolder" = "builtin, native"

"shlwapi" = "builtin, native"

"shdocvw" = "builtin, native"

"advapi32" = "builtin, native"

"msvcrt" = "native, builtin"

"mciavi.drv" = "native, builtin"

"mcianim.drv" = "native, builtin"

"msi" = "native, builtin"

; you can specify applications too

; this one will apply for all notepad.exe

;"*notepad.exe" = "native, builtin"

; this one will apply only for a particular file

;"C:\\windows\\regedit.exe" = "native, builtin"

; default for all other dlls

"*" = "builtin, native"

[x11drv]

; Number of colors to allocate from the system palette

"AllocSystemColors" = "100"

; Use a private color map

"PrivateColorMap" = "N"

; Favor correctness over speed in some graphics operations

"PerfectGraphics" = "N"

; Color depth to use on multi-depth screens

;;"ScreenDepth" = "16"

; Name of X11 display to use

;;"Display" = ":0.0"

; Allow the window manager to manage created windows

"Managed" = "Y"

; Use a desktop window of 640x480 for Wine

;"Desktop" = "640x480"

; Use XFree86 DGA extension if present

; (make sure /dev/mem is accessible by you !)

"UseDGA" = "Y"

; Use XVidMode extension if present

"UseXVidMode" = "Y"

; Use XRandR extension if present

"UseXRandR" = "Y"

; Use the take focus protocol

"UseTakeFocus" = "Y"

; Enable DirectX mouse grab

"DXGrab" = "N"

; Create the desktop window with a double-buffered visual

; (useful to play OpenGL games)

"DesktopDoubleBuffered" = "Y"

; Run in synchronous mode (useful for debugging X11 problems)

;;"Synchronous" = "Y"

;

; Use the Render extension to render client side fonts (default "Y")

;;"ClientSideWithRender" = "Y"

; Fallback on X core requests to render client side fonts (default "Y")

;;"ClientSideWithCore" = "Y"

; Set both of the previous two to "N" in order to force X11 server side fonts

;

; Anti-alias fonts if using the Render extension (default "Y")

;;"ClientSideAntiAliasWithRender" = "Y"

; Anti-alias fonts if using core requests fallback (default "Y")

;;"ClientSideAntiAliasWithCore" = "Y"

;

[fonts]

;Read the Fonts topic in the Wine User Guide before adding aliases

;See a couple of examples for russian users below

"Resolution" = "96"

"Default" = "-adobe-helvetica-"

"DefaultFixed" = "fixed"

"DefaultSerif" = "-adobe-times-"

"DefaultSansSerif" = "-adobe-helvetica-"

;; default TrueType fonts with russian koi8-r encoding

;"Default" = "-monotype-arial-*-*-*--*-*-*-*-*-*-koi8-r"

;"DefaultFixed" = "-monotype-courier new-*-*-*--*-*-*-*-*-*-koi8-r"

;"DefaultSerif" = "-monotype-times new roman-*-*-*--*-*-*-*-*-*-koi8-r"

;"DefaultSansSerif" = "-monotype-arial-*-*-*--*-*-*-*-*-*-koi8-r"

;; default cyrillic bitmap X fonts

;"Default" = "-cronyx-helvetica-"

;"DefaultFixed" = "fixed"

;"DefaultSerif" = "-cronyx-times-"

;"DefaultSansSerif" = "-cronyx-helvetica-"

; the TrueType font dirs you want to make accessible to wine

[FontDirs]

;"dir1" = "/usr/X11R6/lib/X11/fonts/TrueType"

;"dir2" = "/usr/share/fonts/truetype"

;"dir3" = "/usr/X11R6/lib/X11/fonts/TT"

;"dir4" = "/usr/share/fonts/TT"

[serialports]

"Com1" = "/dev/ttyS0"

"Com2" = "/dev/ttyS1"

"Com3" = "/dev/ttyS2"

"Com4" = "/dev/modem"

[parallelports]

"Lpt1" = "/dev/lp0"

[ppdev]

;; key:  io-base of the emulated port

;; value : parport-device{,timeout}

;; timeout for auto closing an open device ( not yet implemented)

;"378" = "/dev/parport0"

;"278" = "/dev/parport1"

;"3bc" = "/dev/parport2"

[spooler]

"FILE:" = "tmp.ps"

"LPT1:" = "|lpr"

"LPT2:" = "|gs -sDEVICE=bj200 -sOutputFile=/tmp/fred -q -"

"LPT3:" = "/dev/lp3"

[ports]

;"read" = "0x779,0x379,0x280-0x2a0"

;"write" = "0x779,0x379,0x280-0x2a0"

[Debug]

;"RelayExclude" = "RtlEnterCriticalSection;RtlLeaveCriticalSection"

;"RelayInclude" = "user32.CreateWindowA"

;"RelayFromExclude" = "user32;x11drv"

;"RelayFromInclude" = "sol.exe"

;"SnoopExclude" = "RtlEnterCriticalSection;RtlLeaveCriticalSection"

;"SpyExclude" = "WM_SIZE;WM_TIMER;"

[registry]

;These are all booleans.  Y/y/T/t/1 are true, N/n/F/f/0 are false.

;Defaults are read all, write to Home

; Where to find the global registries

;"GlobalRegistryDir" = "/etc";

; Global registries (stored in /etc)

"LoadGlobalRegistryFiles" = "Y"

; Home registries (stored in ~user/.wine/)

"LoadHomeRegistryFiles" = "Y"

; Load Windows registries from the Windows directory

"LoadWindowsRegistryFiles" = "Y"

; TRY to write all changes to home registries

"WritetoHomeRegistryFiles" = "Y"

; Registry periodic save timeout in seconds

; "PeriodicSave" = "600"

; Save only modified keys

"SaveOnlyUpdatedKeys" = "Y"

[Tweak.Layout]

;; supported styles are 'Win31'(default), 'Win95', 'Win98'

;; this has *nothing* to do with the windows version Wine returns:

;; set the "Windows" value in the [Version] section if you want that.

"WineLook" = "Win98"

[Clipboard]

"ClearAllSelections" = "0"

"PersistentSelection" = "1"

; List of all directories directly contain .AFM files

[afmdirs]

"1" = "/usr/share/ghostscript/fonts"

"2" = "/usr/share/a2ps/afm"

"3" = "/usr/share/enscript"

"4" = "/usr/X11R6/lib/X11/fonts/Type1"

[WinMM]

; Uncomment the "Drivers" line matching your sound setting.

"Drivers" = "wineoss.drv"      ; default for most common configurations

;"Drivers" = "winearts.drv"    ; for KDE

;"Drivers" = "winealsa.drv"    ; for ALSA users

;"Drivers" = "winejack.drv"    ; for Jack sound server

;"Drivers" = "winenas.drv"     ; for NAS sound system

;"Drivers" = "wineaudioio.drv" ; for Solaris machines

;"Drivers" = ""                ; to disable sound

"WaveMapper" = "msacm.drv"

"MidiMapper" = "midimap.drv"

[dsound]

;; HEL only: Number of waveOut fragments ahead to mix in new buffers.

;"HELmargin" = "5"

;; HEL only: Number of waveOut fragments ahead to queue to driver.

;"HELqueue" = "5"

;; Max number of fragments to prebuffer

;"SndQueueMax" = "28"

;; Min number of fragments to prebuffer

;"SndQueueMin" = "12"

;; Forces emulation mode (using wave api)

;"HardwareAcceleration" = "Emulation"

;; Sets default playback device (0 - number of devices - 1)

;"DefaultPlayback" = "0"   ; use first device (/dev/dsp)

;"DefaultPlayback" = "1"    ; use second device (/dev/dsp1)

;"DefaultPlayback" = "2"    ; use third device (/dev/dsp2)

;; Sets default capture device (0 - number of devices - 1)

;"DefaultCapture" = "0"      ; use first device (/dev/dsp)

;"DefaultCapture" = "1"      ; use second device (/dev/dsp1)

;"DefaultCapture" = "2"      ; use third device (/dev/dsp2)

[Network]

;; Use the DNS (Unix) host name always as NetBIOS "ComputerName" (boolean, default "Y").

;; Set to N if you need a persistent NetBIOS ComputerName that possibly differs 

;; from the Unix host name. You'll need to set ComputerName in 

;; HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ComputerName\ComputerName, too.

;"UseDnsComputerName" = "N"

#########################################

# Application dependent sections follow #

#########################################

[AppDefaults\\_INS5576._MP\\x11drv]

; Lotus Notes R5 installer

; I'm quite not sure this will run on some other machine than mine, but it 

; can't hurt

"Managed" = "N"

"Desktop" = "N"

[AppDefaults\\nlnotes.exe\\x11drv]

"Desktop" = "800x600"

[AppDefaults\\explorer.exe\\x11drv]

"Desktop" = "800x600"

[AppDefaults\\notes.exe\\DllOverrides]

"msvcrt" = "native"

"msvcrt40" = "native"

"crtdll" = "native"

"imagehlp" = "native"

"rnaph" = "native"

[AppDefaults\\nlnotes.exe\\DllOverrides]

"msvcrt" = "native"

"msvcrt40" = "native"

"crtdll" = "native"

"imagehlp" = "native"

"rnaph" = "native"

[AppDefaults\\nhldaemn.exe\\DllOverrides]

"msvcrt" = "native"

"msvcrt40" = "native"

"crtdll" = "native"

"imagehlp" = "native"

"rnaph" = "native"

[AppDefaults\\DVD Shrink 3.2.exe\\Version]

"Windows" = "winxp"

# [/wineconf]

```

Any nudges in the right direction?

----------

