streaming AVC/H264 from analog on linux, advice needed

About encoding, codec settings, muxers and filter usage
cocoapepper
New Cone
New Cone
Posts: 6
Joined: 31 Mar 2009 15:17

streaming AVC/H264 from analog on linux, advice needed

Postby cocoapepper » 31 Mar 2009 15:27

I have been experimenting with streaming via VLC on (Slackware and Ubuntu) Linux for a few days. I have no problems using VLC to stream my existing AVC/H.264 files. I am having moderate success using an Osprey 210 analog video+audio capture card to record uncompressed to the HDD. However I would like to stream live from the capture card. In other words, live incoming analog video+audio would go through ffmpeg to be compressed as AVC/H.264 and then be saved to HDD and be streamed via VLC at the same time. How would I go about this? I'm having problems trying to get ffmpeg and/or VLC to work with the capture card in realtime, so far I am having to do each step (capture, encode, stream) by itself, which is not satisfactory. Any help or pointers would be appreciated, even if I need to get a different capture card. Thank you!!

rideallday
New Cone
New Cone
Posts: 3
Joined: 13 Nov 2008 02:18

Re: streaming AVC/H264 from analog on linux, advice needed

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.


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 14 guests