Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dvdfs

A 9P filesystem server for ripping DVDs. Exposes a Plan 9-style file interface over TCP that lets you drive DVD backup and MKV conversion by reading and writing files — no special CLI needed.

How it works

The server presents a filesystem with a clone-based session model (inspired by Plan 9 network devices):

/
├── clone          # read to create a new session, returns session ID
└── <id>/          # one directory per active session
    ├── ctl        # write commands here
    ├── log        # append-only log of command output
    ├── dev        # symlink/reference to the DVD device (set by "device" command)
    ├── output     # path of the output directory (set by "output" command)
    ├── info       # DVD metadata: name, titles, chapters (populated by "info" command)
    └── mkvs/      # MKV files appear here as they finish encoding

Session lifecycle

  1. Open clone — reading it allocates a new session and returns its numeric ID.
  2. Navigate to /<id>/ — your working directory for this rip.
  3. Write commands to ctl — one command per write, space-separated arguments.
  4. Read log for progress output from dvdbackup/lsdvd/mkvmerge.
  5. Write close to ctl when done — removes the session directory.

Control commands

Command Args Effect
device <path> Set DVD device (e.g. /dev/sr0). Adds a dev file.
output <dir> Set output directory (must exist and be writable). Adds an output file.
info Run lsdvd/dvdbackup -I and write info file with title list.
backup Run dvdbackup in the background; progress streams to log.
mkv [title [chapter]] Merge a VOB to MKV with mkvmerge; result appears in mkvs/. Defaults to main title.
close Remove this session.

Dependencies

Runtime tools must be in PATH:

Build & run

go build -o dvdfs .
./dvdfs                        # listens on localhost:8001 by default
./dvdfs -addr 0.0.0.0:9001    # custom address

Mounting

Mount with any 9P client. On Linux with 9pfuse (from 9mount) or v9fs:

# using 9pfuse
9pfuse 'tcp!localhost!8001' /mnt/dvdfs

# using the kernel 9P driver
mount -t 9p -o trans=tcp,port=8001 localhost /mnt/dvdfs

Example workflow

# Create a session
id=$(cat /mnt/dvdfs/clone)

# Configure it
echo "device /dev/sr0" > /mnt/dvdfs/$id/ctl
echo "output /tmp/rips" > /mnt/dvdfs/$id/ctl

# Read DVD metadata
echo "info" > /mnt/dvdfs/$id/ctl
cat /mnt/dvdfs/$id/info

# Back up the disc (streams to log)
echo "backup" > /mnt/dvdfs/$id/ctl
tail -f /mnt/dvdfs/$id/log

# Convert main title to MKV
echo "mkv" > /mnt/dvdfs/$id/ctl
# or a specific title: echo "mkv 3" > /mnt/dvdfs/$id/ctl
ls /mnt/dvdfs/$id/mkvs/

# Clean up
echo "close" > /mnt/dvdfs/$id/ctl

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages