Postby rideallday » 25 May 2009 23:13
I am using an osprey 230 to do something similar.
This is how I'm getting the live stream out in h264 (and re-broadcasting through my Wowza server).
vlc -I dummy v4l2:// :v4l2-dev=/dev/video0 :v4l2-adev=/dev/audio1 :v4l2-standard=3 --sout "#transcode{venc=x264,vcodec=x264,vb=0,scale=1,acodec=mp4a,ab=32,channels=2,samplerate=22100}:rtp{dst=myserver,port-video=1234,port-audio=1236,sdp=file:///media/vlc.sdp}"
You may be able to use duplicate to stream and save to a file, but AFAIK the stream and file need a different container. Maybe someone else can explain it, but hopefully the above will get you going. I also use the same sout to re-broadcast MJPEG from an AXIS camera, so it works with multiple sources. You need a very recent version of x264, otherwise it won't work, in my experience:
vlc 0.9.9a
x264 encoder version x264 0.65.X
I'd be interested to hear how you are saving to file.