Sony DCR-TRV30E and Linux
Accessing the Memory Stick
Accessing the MiniDV Tape Recordings
Other Things of Interest
The Sony DCR-TRV30E works just great with Linux. Unfortunately, it is
not as easy as it should be to get it up and running, though the
information is out there. Unfortunately, you have to read all kinds of
documents, though all you want to do is to get those darn pictures from
the camera. Hence I decided to put up this page that gets you to a
working setup so you can access your Sony DCR-TRV30E using Linux.
The TRV30E has two kinds of storage devices that must be accessible.
One is the memory stick which holds still pictures and short movies. The
other one would be the tape, which stores your footage. See the
respective sections below to learn how to access each.
The process should be generic to Sony DCR cameras, and has been
verified with other models as well. If you have a similar model, it is
worth to give it a try using these instructions.
Procedures described here were done on SuSE Linux 8.0, 8.1 and 8.2, but
it rather depends upon the kernel version included than on the
distribution's brand. Kernels 2.4.18 and later should all work, previous
versions were not tested.
If you succeed using these instructions with a different model or
another distribution, let me know and I will add it to the list.
The memory stick stores still pictures and short movies. It can be
accessed either via USB or Firewire (to be confirmed). Currently, only
To access the pictures, you got to have an USB adapter. There is a huge
range of adapters available, and it should not be a problem to get one
that works with Linux. The best address for information on which
adapters work and how to get them up and running is this page.
The other thing you need to have is USB Mass Storage support in your
kernel. To check whether you do have it or not, simply log in as root
and issue the following command: modprobe
usb-storage. If you do not receive an error message, you have
USB Mass Storage in your kernel. Otherwise, see Linux USB for further hints. For
information on USB Mass Storage, see this link.
Get it done
Once you have your USB adapter configured, connect the camera to your
box and turn it on to Memory
If everything went right, you will hear a beep after a few seconds,
informing you that the hotplugging capabilities of the Linux kernel have
successfully identified the camera. The USB Mass Storage module was
automatically loaded, and the Memory Stick is available in the file
system as /dev/sda1, provided
that it is the only USB device in your system so far. The hotplugging
feature will have created a respective link in your /etc/fstab to a place like /media/sda1 to mount the camera, and
all that is left to do for you is to type mount /media/sda1 as a regular user
(you do not have to be root to
do this). The only problem here could be that the automagically created
entry in the fstab is to a
different place than /media/sda1.
In that case simply look into /etc/fstab
and see where /dev/sda1 is
linked to. Most recent distributions like SuSE 8.0 or later should be
able to do this.
If things did not go so smooth, do not despair. First off, check if the usb-storage module is loaded. To do
so, log in as root and enter lsmod |
grep "usb-storage". If that does not yield any output, manually
load it via modprobe usb-storage.
Then try to mount the device via mount
-t vfat /dev/sda1 /media/sda1 (check that /media/sda1 exists. If not, create
that directory or mount it to a different place). If that works, you can
still manually add a respective entry to /etc/fstab. See the respective man
page on how to do that, and do not forget to make the entry noauto!
The content of the memory stick now resides under /media/sda1. For the DCR-TRV30E,
the content is split into two subdirectories:
- dcim/100msdcf will hold
the still pictures in jpg
- mssony/moml0001 will hold
the short movies in mpg format.
I do not know what the directory structure looks like for other models,
but it is most likely very similar.
The pictures and short movies can then be accessed like ordinary files
since they are part of the file system now. This includes deleting them,
which will save you some effort as you do not have to fiddle around with
the camera to delete the files manually after downloading them.
Here is a trivial script that will download
the pictures and short movies from the memory stick to the current
directory, no matter what the directory structure on your memory stick
looks like. Do not forget to make it executable via chmod +x grab.sh after downloading
Example: grab.sh /media/sda1
All your footage is stored on these.
To access your recordings you have to use a Firewire connection. First
off, note that Firewire is also
referenced to as 1394. The
reason is that Firewire is a registered trademark by Apple, who are very
strict regarding usage of the term Firewire. Most others use 1394
instead, as it is the ISO 1394 standard that defines Firewire. Sony does
not use any of the above, they use the term i.link. In the following
description, we will use the term Firewire, but when you read other
manuals or websites, remember that Firewire can be referenced to by
You have to get a Firewire adapter. Not all adapters work with linux,
but linux1394 provides a list of
supported hardware. It is basically a good idea to look for OHCI
compliant hardware, but always check that page to be sure that you buy
something you can use other than as a door stopper.
Firewire support comes with 2.4 series kernels. Development still
continues, but any recent distribution should work. Tests have been done
using a kernel of version 2.4.18. Similar to USB, hotplugging support
for Firewire exists, but is only recently available. SuSE 8.2 started to
bring hotplugging support for Firewire devices, other distributions can
be expected to follow.
If hotplugging dies not support Firewire on your box, other than USB
setting up Firewire support is not trivial. linux1394 has all the
answers you need and features an excellent tutorial for setting
up Firewire support. You can most probably skip the part about the
kernel configuration if you use the standard kernel of your
distribution. Make sure that the gscanbus
application works and remember how you got there!
The most common problem here is that the necessary kernel modules for
Firewire support are not always automatically loaded. In that case,
after connecting your camera (do not forget to switch it on!) to your
box, load the necessary modules manually.
Whether hotplugging works or not, make sure that gscanbus works.
If everything is right, gscanbus
should show your camera.Another common problem is user-rights related:
You might not have the necessary rights to access the Firewire device as
a regular user. In that case, either make the device accessible for all
users via the chmod command. Or
log in as root for further operations, which is strongly discouraged due
to security risks.
After that, you have two options to proceed: Use the command line tool dvgrab or opt for a fancy GUI-based
application and use kino. You
might have to compile these programs yourself, and since kino has way more dependencies than dvgrab and is hence harder to build,
inexperienced users might want to opt for dvgrab in that case. Equally, in
case one of these two applications is available as a package for your
distribution, inexperienced users should prefer whatever they can get
Another prerequisite for transmitting your footage to your box is a
huge and fast harddrive. As the footage is only slightly compressed,
even short sequences need a lot of space. You need approximately 15GB
for an hour of footage! A few seconds will immedialtely generate
hundreds of megabytes on your disk, so you have been warned. Also, your
harddrive has to be fast: It has to write all that data on your disk in
real time. Since there is only a tiny buffer available, what cannot be
written onto the harddrive in time will be discarded! Therefore it is
not a good idea to do backups of your harddrive while copying footage
from your MiniDV at the same time...
Get it done
In the best case, your distribution will provide a package for dvgrab.
Otherwise, download the sources from this page. After extracting the
files, find instructions on how to compile and install dvgrab in the INSTALL file included in the package.
Once you have successfully installed dvgrab,
it is time to grab some footage off your camera:
You can now find a new file test.avi
in your current directory, which contains what you have
- Connect your camera to your box, turn it on and set
- Use gscanbus to verify
that your camera is connected correctly
- Switch your camera to VCR mode or alternatively to camera mode.
Note that whatever you can see on the display of your camera is also
transmitted to your machine via Firewire. dvgrab will then write that stream
to your harddrive.
- Enter the following command to record what your camera is
--format dv1 test
See dvgrab --help for
explanation of parameters.
- Hit <CTRL> + C
to stop recording
In the best case, your distribution will provide a package for kino.
Otherwise, download the sources from this page.
Then, proceed like this:
The file you specified in step 5 contains what you have recorded.
- Connect your camera to your box, turn it on and set everything up
- Use gscanbus to verify
that your camera is connected correctly
- Switch your camera to VCR mode or alternatively to camera mode
- Start kino and select the tab labeled capture, located on the rightmost
side of the GUI. Whatever you can see on the display of your camera
should also be visible in kino
- Enter a filename in the edit field below
- You can now start recording by hitting the button labeled Capture
- Stop recording by hitting the button labeled xxx
Watch your Recordings
To watch what you have recorded on your harddrive, use your favorite
movie player. The most popular ones around are mplayer and xine,
and it is impossible to give a good suggestion on which one to use. mplayer supports nearly any video format out there and
pays a lot of attention to performance issues. It also has a pretty good
GUI. xine still supports many
video formats, though not as many as mplayer.
But the GUI is even more polished, and the overall usability is better.
Edit your Recordings
You may now want to edit what you have. There exist three tools so far
- kino, which was
already mentioned before. Capable of basic editing only, but very good
Firewire integration. If you go for kino and use it on a regular basis,
please consider to contribute to their PayPal account.
- Cinelerra, more
sophisticated editing as well as picture manipulations (eg. create
- Main Actor (demo version available, full version has to be paid
Replay the Videos to your Camera
kino, again, has the capability to do that, TBD
Other things of interest
- how to convert the raw dv files to mpegs or else (sample
scripts, etc.), TBD
- use the mini-DV to digitize your VHS recordings, TBD
11.5.2003 initial version
For feedback or comments, email here.