Streaming DV with VLC in Linux…..


Thought this might be useful for someone:

Install the libraw1394 and libavc1394

If you want to be able to stream from a DV camcorder, then you need to install the libraries libraw1394 and libavc1394:

If you use a Fedora Core distribution then you just need to install the libraries using:

%yum update
%yum install libraw1394 libavc1394

If you want to install the libraries from the source then you must download them from the libraw1394 and libavc1394 from their projects website. If you have a distribution that uses udev, then you must add/change the following line to the file 50-udev.rules in your /etc/udev/rules.d directory.

%vi /etc/udev/rules.d/50-udev.rules
# IEEE1394 (firewire) devices (must be before raw devices below)
KERNEL==”raw1394″, NAME=”%k”
KERNEL==”dv1394″, NAME=”dv1394/%k”
KERNEL==”video1394*”, NAME=”video1394/%n”

The following sections assume that you have a working linux installation with the IEEE 1394 (Firewire) libraries installed, either manually from the source code or through your distributions upgrade mechanism.

Stream with DV

Connect the DV camcorder with a Firewire cable to your computer, and check the creation of the file /dev/raw1394.

Run VLC with the following command line :

% vlc -vvv dv/rawdv:///dev/raw1394 -dv-caching 10000 –sout ‘#transcode{vcodec=WMV2,vb=512,scale=1,acodec=mp3,ab=192,channels=2}:std{access=mmsh,mux=asfh,url=:8080}’ –sout-transcode-fps=25.0

where:

  • dv/rawdv:// is the DV input and /dev/raw1394 the device file
  • dv-caching is the delay is miliseconds (ms) (start with a high value, 10s or so, and lower it later)
  • sout is the stream output chain that is used to stream the DV camcorder as a multimedia stream over the network. The transcode syntax is explained in the chapter about transcoding. The example as given above generates a multimedia stream that is compatible with Windows Media Player
  • sout-transcode-fps is the number of pictures per second 25.0 that the transcode module should generate of the requested audio/video codec.

6 responses to “Streaming DV with VLC in Linux…..”

  1. Hey there, thanks for the post. I’m trying to do exactly what you have decsribed here but can’t get it working. I want to stream dv through my firewire into vlc and then rebroadcast it on the net (obviously being compressed into something like h.264 with mpeg audio) on the fly.
    Kino streams the DV live for me using a library called libiec61883, but I don’t get a rawdv device.
    Any suggetions?

  2. Hi Andrew,

    First off, what distro are you using? I’ve only tried this on Redhat FC3-5.

    When you say you don’t have a raw device, does that mean when you do a “ls -l /dev/raw1394” that you get nothing?

    Is your distro udev based by chance, if so did you do the first portion of my post to get the raw1394 device setup under udev?

    TTYL
    Many

  3. Hi Many,
    i tried to follow your steps and been reading up on this topic for a while now. i use ubuntu studio and the 117ver of udev. my problem is that there is no 50-udev.rules file in that specified folder on my system.
    do you have any idea what i can do?

  4. Thanks Many,

    i checked out your other post. although in the meantime i actually installed fedora 9 and followed your steps. again, nothing. in /dev/ i only find dv1394. it never creates raw1394. is that a problem? i got DV to work in kino though so it seems i am on the right track. i need to get the VLC to play DV and stream it as mpg2 over UDP. is your transcode streaming blog straight forward if i decide to go back to ubuntu and follow your directions or will i need to do anything else? i know how to get DV capture to work in Kino in both distros but VLC is giving me a headache. lsmod lists all ieee1394 relevant inputs. thanks for your help.

    Egbert

  5. Hi Egbert,

    Okay, that raw1394 stuff is obviously too old now. If you have a dv1394/0 device you’re good to go. Use the link I sent you in my last comment and ignore pretty much everything until right after the “apt-get” commands. You already have the devices under FC9 from the sounds of it.

    If you run into trouble let me know, I got a spare machine that’s itching for Linux :-)……I can give it a try here and maybe do a seperate writeup on it. But the Ubuntu command (after the last apt-get) should work.

    TTYL
    Many

Leave a Reply